This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Web Services and the fly likes Java 1.3 client code to call a web service in secured mode Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "Java 1.3 client code to call a web service in secured mode "(using ssl)" Watch "Java 1.3 client code to call a web service in secured mode "(using ssl)" New topic
Author

Java 1.3 client code to call a web service in secured mode "(using ssl)

Krishnamurthy Subramanian K
Greenhorn

Joined: Jan 12, 2009
Posts: 5
A web service is already running in my customer's machine. My customer has given a SSL certificate to me which I need to put in the folder from where, I should execute a client side java 1.3 code to call methods which was exposed as web service in a secured mode. Can I have any sample code for the same.
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2906
"Java Web Services in a Nutshell" Sample: Chapter 3 SAAJ (PDF)
Using SAAJ with Secure Connections - Setting up the client system p.156 (73)

You are going to need
  • JSSE
  • The Axis 1.x distribution includes a saaj.jar.
  • An XML parser (Xerces Java Parser).


  • It may be simpler to get the code to work with the JDK 1.4.2 (which has JSSE built in) + SAAJ - then later try to get the code to work under JDK 1.3 + JSSE 1.0.3 + SAAJ + Xerces-J.

    Creating a Client Certificate for Mutual Authentication

    You have to set up some properties so that the trustStore (containing the client/server certificate) is available for the SSL/TLS connection:


    SAAJ Client
    Though you may be able to use an Axis 1.x client
    Building with JSSE
    WSDL2Java: Building stubs, skeletons, and data types from WSDL


    "Don't succumb to the false authority of a tool or model. There is no substitute for thinking."
    Andy Hunt, Pragmatic Thinking & Learning: Refactor Your Wetware p.41
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: Java 1.3 client code to call a web service in secured mode "(using ssl)
     
    Similar Threads
    How to run a secured ws client on a stand alone JVM?
    How to call webservice from Oracle without using Oracle Wallet & UTL_DBWS &UTL_HTTP package with SSL
    2 technical questions for the techies
    Security on applet calling web service (different servers)
    Consuming secure web-services (Axis2 + Rampart)