Hello all: I have deployed a secure webservice as described in the
tutorial http://wso2.org/library/3190 using rampart. However when I invoke the
webservice from the client it hangs on the call to invoke the method from the
webservice. Any tips on resolving this will be appreciated. Here is my client
code:
package helloworld;
import org.apache.axis2.client.Options;import
org.apache.axis2.client.ServiceClient;import
org.apache.axis2.context.ConfigurationContext;import
org.apache.axis2.context.ConfigurationContextFactory;
/** * Created by IntelliJ IDEA. * User: mxshah * Date: Mar 29, 2010 * Time:
3:42:52 PM * To change this template use File | Settings | File
Templates. */public class HelloWorldClient {
public static void main(String[] args) throws Exception {
ConfigurationContext ctx =
ConfigurationContextFactory.createConfigurationContextFromFileSystem("C:\\Documents
and Settings\\mxshah\\HelloWorld\\repo", null); HelloWorldServiceStub
stub = new HelloWorldServiceStub(ctx,
"https://localhost:8443/axis2/services/HelloWorldService"); ServiceClient
sc = stub._getServiceClient();
sc.engageModule("rampart");
Options options = sc.getOptions();
options.setUserName("apache"); options.setPassword("password");
System.setProperty("javax.net.ssl.trustStore",
"C:\\WebServiceSecurity\\article-transport\\keys\\server.jks");
System.setProperty("javax.net.ssl.trustStorePassword", "password");
int a = 3; int b = 4;
int result = stub.add(a, b ); // the client hangs here????
System.out.println(a + " + " + b + " = " + result); }
}
--- On Tue, 3/23/10, Nandana Mihindukulasooriya <[email protected]> wrote:
From: Nandana Mihindukulasooriya <[email protected]>
Subject: Re: Deploying Axis2 and Secure web service
To: [email protected], [email protected]
Date: Tuesday, March 23, 2010, 4:56 PM
Hi Monisha,
Apache Rampart is the module which is used to secure Axis2 based web
services and the information here [1],[2] will be useful.
Best regards,
Nandana
[1] - http://ws.apache.org/rampart/articles.html
[2] - http://wso2.org/library/3190
On Wed, Mar 24, 2010 at 12:43 AM, SM <[email protected]> wrote:
Hi all,
Is there a tutorial that any of u can point me to so that I can create a
secure web service. That is a web service incorporating the ws-security
standards when creating the webservice and also when creating the client that
communicates with this web service.
Your response in this regards will be appreciated.
Best,
Monisha