wood burning stoves 2.0*
The moose likes Web Services and the fly likes java.security.PrivilegedActionException: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "java.security.PrivilegedActionException: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl:" Watch "java.security.PrivilegedActionException: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl:" New topic
Author

java.security.PrivilegedActionException: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl:

Ranjandev shukla
Greenhorn

Joined: Dec 01, 2010
Posts: 3
Hi,

I am having https service url. I wrote java client using SAAJ. but i am getting the below exception:--

java.security.PrivilegedActionException: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Message send failed
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

>> I exported the certificate from service URL (using browser.) and saved as jssecacerts
>>Then imporetd this by using the following command--> keytool -import -file jssecacerts -keystore cacerts

Now I wrote the java client using SAAJ as below:-

System.setProperty("javax.net.ssl.keyStore", "C:/Program Files/Java/jre6/lib/security/cacerts");
System.setProperty("javax.net.ssl.keyStorePassword", "changeit");
URL url = new URL("https://whaever.com/service");
SOAPConnectionFactory scf = SOAPConnectionFactory.newInstance();
connection = scf.createConnection();
response = connection.call(message, url);

I dont know where I am wrong...Please help...me....I am in seriously in trouble..
Thanks in Advance..
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
Have you tried using the following VM arguments when launching the client (removing the code that sets the properties in your code)?
-Djavax.net.ssl.trustStore=C:/Program Files/Java/jre6/lib/security/cacerts
-Djavax.net.ssl.trustStorePassword=changeit
-Djavax.net.debug=all

The last property is for debug output of SSL handshaking, so it may be omitted.
Best wishes!


My free books and tutorials: http://www.slideshare.net/krizsan
Ranjandev shukla
Greenhorn

Joined: Dec 01, 2010
Posts: 3
Thanks.........

Anyhow I fixed it...Thanks to all..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java.security.PrivilegedActionException: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl:
 
Similar Threads
java.security.PrivilegedActionException(502Proxy Error )
SOAP web service
Connecting to HTTPS webservice (through oracle- OC4J Jdeveloper)
Connecting to HTTPS WebService
SOAPConnection call with ip address