aspose file tools
The moose likes Web Services and the fly likes No Certificate in Header Exception(SOAP) Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "No Certificate in Header Exception(SOAP)" Watch "No Certificate in Header Exception(SOAP)" New topic
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");
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: No Certificate in Header Exception(SOAP)
 
Similar Threads
2-Way SSL Authentication and Web Services
SSLHandshakeException
2-Way SSL Authentication and Web Services
javax.rpc.call problem
2-Way SSL Authentication and Web Services