You can try something like this:

// create a configuration context for axis2 to be able to engage modules

ConfigurationContext ctx =
ConfigurationContextFactory.createConfigurationContextFromFileSystem(
"/Users/sverdianto/Documents/axis2-SNAPSHOT/repository",
"/Users/sverdianto/Documents/axis2-SNAPSHOT/conf/axis2.xml");


// change this to your generated stub class

EchoStub stub = new EchoStub(ctx, "
http://localhost:8888/axis2/services/echo?wsdl";);


ServiceClient sc = stub._getServiceClient();

sc.engageModule("addressing");

// sc.engageModule("rampart");

I hope this will help.

Regards,
Sukma

On Jan 9, 2008 12:14 PM, asd <[EMAIL PROTECTED]> wrote:

> i am an newbie to axis2.
> i had writen a simple program using SOAP with axis2,it work fine.
> then,i alert  the client code a litte to  like below:
>
> //....
> client = new ServiceClient();
> client.engageModule( Constants.MODULE_ADDRESSING);
> client.setOptions( options);
>
> OMElement result = client.sendReceive( methodE);
> //.....
>
> sometheing wrong occure.
> the exception lists:
>
> org.apache.axis2.AxisFault: Unable to engage module : addressing
>        at org.apache.axis2.client.ServiceClient.engageModule(
> ServiceClient.java:339)
>        at
> net.asd.study.soa.axiom.client.SayHelloClient.testRESTSayAXIOMHello(
> SayHelloClient.java:107)
>        at net.asd.study.soa.axiom.client.SayHelloClient.main(
> SayHelloClient.java:130)
>
>
> i google for the issue,and find that need add address module into my
> configure.
> but i do not know the detail way to do this.
> and  all of  my client configuration was a simple java class with some
> corresponded jar in my class path.i did not find a configuration to
> addin modules.
>
> can some friends help me how to confirue this in client,
> thanks a lot.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to