You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Joe S <jo...@gmail.com> on 2008/01/03 20:41:06 UTC

Does client need repository?

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

Re: Does client need repository?

Posted by Charitha Kankanamge <ch...@wso2.com>.
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: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Does client need repository?

Posted by Afkham Azeez <af...@gmail.com>.
You need not have a repository or axis2.xml. You could create a config ctx
as follows:

ConfigurationContextFactory.createEmptyConfigurationContext()

Since you need to use addressing, make sure that the axis2.jar is in the
classpath of the client. This jar file contains the addressing
module.xmlfile, hence the addressing module will be loaded from the
classpath on the
client side. Now, engaging addressing should work.

HTH
Azeez

On Jan 4, 2008 1:11 AM, Joe S <jo...@gmail.com> 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
>



-- 
Thanks
Afkham Azeez

http://www.wso2.org
GPG Fingerprint: 643F C2AF EB78 F886 40C9  B2A2 4AE2 C887 665E 0760