This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Hands On Software Engineering with Python and have Brian Allbey on-line!
See this thread for details.
Win a copy of Hands On Software Engineering with Python this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

HTTPS soap call using SAAJ  RSS feed

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

We are currently having a soap client as below

SOAPConnectionFactory soapConnFactory = SOAPConnectionFactory.newInstance();
SOAPConnection connection = soapConnFactory.createConnection();

URL url = new URL("http://localhost:8001/ws/services/TestService");


SOAPMessage msg = message;
msg.writeTo(System.out);

SOAPMessage reply = connection.call(msg,url );

This works fine for HTTp connection. Now we need to change it to HTTS connection.
We have installed the server certificate in our local machine.
now we need to change the above client code to support https.
One solution is to set the system properties
(System.setProperty("javax.net.ssl.keyStore", "")
System.setProperty("javax.net.ssl.keyStorePassword", "")
System.setProperty("javax.net.ssl.trustStore", "")
System.setProperty("javax.net.ssl.trustStorePassword", ""))

Is there any other way other than setting the system property to achieve https connection in SAAJ ?

 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
Have you seen this webpage? http://java.sun.com/webservices/docs/2.0/saaj/saaj-security.html
Best wishes!
 
It will give me the powers of the gods. Not bad for a tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!