The function is called here into the axis2-kernel-1.5.1.jar package, we can successfully find org.apache.axis2.client, Stub.class and its method addAnonymousOperations().
Read the error message carefully: the class that's missing the addAnonymousOperations method is not Stub, but helloworld.Axis2TomcathelloworldStub.
Amit ChaudhariC
Ranch Hand
Joined: Aug 06, 2009
Posts: 33
posted
0
Hi,
Also , check the echo command output and the command by which you are running the client.
Please check whether D:\downloads\axis2-1.4.1-bin\axis2-1.4.1\lib exists? as i can see the echo command points to a diff axis path altogether.
Regards,
Amit
Remi Desreumaux
Greenhorn
Joined: Sep 23, 2010
Posts: 19
posted
0
I know but despite that the function is called from helloworld.Axis2TomcathelloworldStub, it makes reference to an other class in a library.
Look at the code of helloworld.Axis2TomcathelloworldStub here : (in client_src)
The helloworld.Axis2TomcathelloworldStub class you posted neither has nor calls the addAnonymousOperations method. Somewhere you have mismatched class and/or library files (as is invariably the case when encountering NoSuchMethodError). Start by deleting all your class files and recompiling them. Make sure you're using the same Axis version for creating the stubs, compiling your code, and running your code (from your post it looks like you're mixing Axis2 1.4.1 and Axis2 1.5.1 - you can't do that).
Amit ChaudhariC
Ranch Hand
Joined: Aug 06, 2009
Posts: 33
posted
0
Hi Remi,
I see no issues with the code .
I am sure the classpath and using proper versions for compiling and running the code with solve your issues.
To set the classpath correctly i suggest you refer the script provided under AXIS2_HOME/bin
Also in the classpath you mentioned , please check the section in the bold.
<soapenv:Reason>
−
<soapenv:Text xml:lang="en-US">
The service cannot be found for the endpoint reference (EPR) /axis2/services/axis2tomcathelloworld.axis2tomcathelloworldHttpSoap12Endpoint/
</soapenv:Text>
</soapenv:Reason>
and if I do that :
original Axis2TomcathelloworldStub stub = new Axis2TomcathelloworldStub();
modified Axis2TomcathelloworldStub stub =
new Axis2TomcathelloworldStub("http://127.0.0.1:8081/axis2/services/axis2tomcathelloworld.axis2tomcathelloworldHttpSoap12Endpoint/");
and execution :
To me it does not sound that bad cause i se the xml response in my client but I dont hace what it is expected, namely hello back as the tuto said.