| 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
JSSEThe 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
|
 |
 |
|
|
subject: Java 1.3 client code to call a web service in secured mode "(using ssl)
|
|
|