• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • paul wheaton
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • Mikalai Zaikin
  • Himai Minh

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

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
     
    I promise I will be the best, most loyal friend ever! All for this tiny ad:
    Thread Boost feature
    https://coderanch.com/t/674455/Thread-Boost-feature
    reply
      Bookmark Topic Watch Topic
    • New Topic