• Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Krishnamurthy Subramanian K
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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
     
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!