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 "seba.wagner@gmail.com" <se...@gmail.com> on 2012/11/04 10:02:20 UTC

Sample code not working, API change in ServiceClient:engangeModule

http://axis.apache.org/axis2/java/core/docs/rest-ws.html#rest_with_post

Throws and error, as

engageModule(QName moduleName)

does no more exist.

Error:
The method engageModule(String) in the type ServiceClient is not applicable
for the arguments
 (QName)

https://svn.apache.org/repos/asf/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/client/ServiceClient.java

public void engageModule(String moduleName)

Is the new signature.

I guess it should be:
sender.engageModule(new QName(Constants.MODULE_ADDRESSING).getLocalPart());

I would suggest fixing this by adding a wrapper method:

public void engageModule(QName moduleName) {
   engageModule(moduleName.getLocalPart());
}

Otherwise the new Axis2 library will require all old Clients to be no more
working!
Same for disengageModule.
Or is there a special reason why QName is no more allowed?

Sebastian

-- 
Sebastian Wagner
https://twitter.com/#!/dead_lock
http://www.webbase-design.de
http://www.wagner-sebastian.com
seba.wagner@gmail.com