views:

256

answers:

3

Hello guys,

i'm trying to develop a simple Hello World web service using Axis2 v1.5, Tomcat6 and Java 1.6, according to the following tutorial.

However, i'm getting an error in the client-side code compilation:

javac -extdirs C:\\axis2-1.5 org/apache/axis2/*.java  -d temp/

returns

code\src\org\apache\ws\axis2\Client.java:13: cannot find symbol
symbol  : method setParam0(java.lang.String)
location: class org.apache.axis2.TempStub.Echo
        request.setParam0("Hello world");

as you can see, i've made a couple of changes to the original tutorial, however, even after following the instructions exactly i still get the same error.

I also tried using an older version of Java with the -source 1.3 and -target 1.3 parameters for javac, but the issue remains.

Any ideas? For a simple tutorial, this crap has given me a lotta headaches...

Cheers and thanks in advance

+2  A: 

The tutorial has a typo, it should be setValue, not setParam0, as in:

  HelloWorldStub.Echo request = new HelloWorldStub.Echo();
  request.setValue("My Parameter Value");
Mark Wald
A: 

use this stmt "request.setArgs0("Hello World"); "

bheemanna
A: 

I agree with Mark, that's a tutorial typo. The tutorial ws method was:

public String echo(String value) {
 return value;
}

so the associated client instruction should be: request.setValue("My Parameter Value");

Basically, if the web service method was:

public String echo(String whatever) {
 return whatever;
}

the associated client call would be: request.setWhatever("My Parameter Value");

Bob Yoplait