Hi Joe,
If you are using Axis2-1.3, addressing can be engaged directly as follows.
stub._getServiceClient().engageModule(new
QName(Constants.MODULE_ADDRESSING));
In the older (prior to axis2-1.3) axis2 distributions, you need to have
a client repo when engaging addressing. Therefore, you can create a
configurationContext from the file system as follows and pass it to the
constructor of the stub
ConfigurationContext configContext =
ConfigurationContextFactory.createConfigurationContextFromFileSystem("C:\\webservices\\client-repo","C:\\webservices\\client-repo\\axis2.xml");
MyserviceStub stb1 = new MyserviceStub(configContext,
"http://10.100.1.118:9762/services/spsessionservgroupservice");
ServiceClient sc = stb1._getServiceClient();
sc.engageModule("addressing");
Hope the above will help you.
regards
Charitha
Joe S wrote:
Hello everyone and Happy New Year!
I am working on a SOAP client application using the generated code by
wsdl2java. The server does have repository, service, modules, etc. and
the client doesn't. I'm wondering if the client also needs repository
( axis2.xml, services, modules, etc.). I looked at the documentation
but still not clear whether clients need them and how to configure it.
I encountered this issue while I tried to engage addressing to use
non-blocking calls.
This is the Exception:
org.apache.axis2.AxisFault: Unable to engage module : addressing
at
org.apache.axis2.client.ServiceClient.engageModule(ServiceClient.java:339)
at org.apache.axis2.client.ServiceClient.engageModule
(ServiceClient.java:324)
I'd appreciate your help.
Joe
--
Charitha Kankanamge
WSO2 inc.
Flower Road, Colombo 07
+94 714268070
A bug in the hand is better than one as yet undetected
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]