Follow these steps:

1. Compile WSDL using WSDL2Java tool. This generates stubs with all the
necessary code to call your web service.

2. If the server needs a client certificate for mutual authentication, set
JSSE properties as follows:

propreties.setProperty("javax.net.ssl.keyStoreType", "myKeyStore*.jks*");
propreties.setProperty("javax.net.ssl.keyStore", "jks");
propreties.setProperty("javax.net.ssl.keyStorePassword", "mypassword**");

propreties.setProperty("javax.net.ssl.trustStoreType", "myTrustStore.jks");
propreties.setProperty("javax.net.ssl.trustStore", "jks");
propreties.setProperty("javax.net.ssl.trustStorePassword", "mypassword2");

Google for generating a certificate and creating jks keystore if you don't
have these handy.

3. Instantiate Stub with the HTTPS URL, and call the stub method

SSL connection is figured out by JSSE/Axis2 (internally Apache HTTPClient).

Best,

Mahesh



On 4/10/07, Eric Chow <[EMAIL PROTECTED]> wrote:

Hello,

How can write a axis2 client to invoke a web service through SSL?
Any simple exampl, please ?


Best regards,
Eric

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to