| Author |
No Certificate in Header Exception(SOAP)
|
yashika kady
Greenhorn
Joined: Jun 07, 2012
Posts: 7
|
|
i am using axis 2 webservices client and have added certificate to trust store.,i have been getting no certificate found in header in both soap UI and as well my in my java class,can someone please help me how to set my client certificate so that i can make a successful connection to server,thankyou.
//main method
public static void main(String args[]) throws RemoteException{
System.setProperty(
"axis.socketSecureFactory",
"org.apache.axis.components.net.SunFakeTrustSocketFactory");
System.setProperty(
"javax.net.ssl.trustStore","C:/cert/identity.jks");
System.setProperty(
"javax.net.ssl.trustStorePassword","importkey");
DeviceMgmtServiceProxy dm=
new DeviceMgmtServiceProxy();
dm.setEndpoint(
"https://xxx.25.130.501/sident/services/iceMgmtService");
System.out.println("###########################################################"+dm.getDeviceStatus("614","22"));}
//error i get:
Exception in thread "main" AxisFault
faultCode: {
http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
faultSubcode:
faultString: No Certificate in header.
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}hostname:dhcp-172-25-100-201.jnpr.net
No Certificate in header.
at org.apache.axis.message.SOAPFaultBuilder.createFault(
SOAPFaultBuilder.java:222)
at org.apache.axis.message.SOAPFaultBuilder.endElement(
SOAPFaultBuilder.java:129)
at org.apache.axis.encoding.DeserializationContext.endElement(
DeserializationContext.java:1087)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
|
 |
yashika kady
Greenhorn
Joined: Jun 07, 2012
Posts: 7
|
|
|
posted another
|
 |
yashika kady
Greenhorn
Joined: Jun 07, 2012
Posts: 7
|
|
|
a
|
 |
yashika kady
Greenhorn
Joined: Jun 07, 2012
Posts: 7
|
|
This one worked for me.
System.setProperty("javax.net.ssl.trustStoreType", "JKS");
System.setProperty("javax.net.ssl.trustStore", "keystore.jks");
System.setProperty("javax.net.ssl.trustStorePassword", "password");
System.setProperty("javax.net.ssl.keyStoreType", "pkcs12");
System.setProperty("javax.net.ssl.keyStore", "client.p12");
System.setProperty("javax.net.ssl.keyStorePassword", "password");
DeServiceProxy d=new DeServiceProxy ();
dm.setEndpoint("https://xxx.xx.100.xxx/services/DmtService");
dm.getDeviceStatus("61656","2256");
|
 |
 |
|
|
subject: No Certificate in Header Exception(SOAP)
|
|
|