Hi, I am trying to call a webservice as follows: package student;public class
Student {public String name = 'student';public String id = 'five'; public
String getName() {return name;}public String getID() {return id;}public Student
getStudent(){return new Student();}} i am actually trying to return an object
instead of just a string, so this was just a test. I generated a stub of this
file, and used my client as follows: package student;import
student.StudentStudentSOAP12PortStub.GetStudent;import
student.StudentStudentSOAP12PortStub.GetStudentResponse; public class
Client{public static void main(java.lang.String
args[]){try{StudentStudentSOAP12PortStub stub =new
StudentStudentSOAP12PortStub('http://localhost:8080/axis2/services/Student');getStudent(stub);}
catch(Exception e){e.printStackTrace();System.out.println('\n\n\n');}}/* call
an object*/public static void getStudent(StudentStudentSOAP12PortStub
stub){try{getStudent req = new getStudent();GetStudentResponse res =
stub.getStudent(req); System.out.println(res.get_return()); } catch(Exception
e){ e.printStackTrace(); System.out.println('\n\n\n'); }}} however, i keep
getting this error when using ant to build the client into a jar file :
C:\Axis2 1.3\bin>antBuildfile: build.xmlinit:pre.compile.test: [echo] Stax
Availability= true [echo] Axis2 Availability= truecompile.src: [javac]
Compiling 3 source files to C:\Axis2 1.3\bin\build\classes [javac] C:\Axis2
1.3\bin\src\student\Client.java:3: cannot find symbol [javac] symbol :
class GetStudent [javac] location: class
student.StudentStudentSOAP12PortStub [javac] import
student.StudentStudentSOAP12PortStub.GetStudent; [javac]
^ [javac] C:\Axis2
1.3\bin\src\student\Client.java:28: cannot find symbol [javac] symbol :
class getStudent [javac] location: class student.Client [javac]
getStudent req = new getStudent(); [javac] ^ [javac] C:\Axis2
1.3\bin\src\student\Client.java:28: cannot find symbol [javac] symbol :
class getStudent [javac] location: class student.Client [javac]
getStudent req = new getStudent(); [javac]
^ [javac] Note: Some input files use unchecked or unsafe
operations. [javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 3 errorsBUILD FAILEDC:\Axis2 1.3\bin\build.xml:43: Compile failed; see
the compiler error output for details.Total time: 4 secondsC:\Axis2 1.3\bin>
i tried to fix this error many times, by changing the small g to a capital G as
it sometimes shows in the stub, but doesnt work.
i will attach the webserivce, client and stub files. if anyone has a working
example of a web service returning a simple object, please let me know,
thanks!
_________________________________________________________________
Feel like a local wherever you go.
http://www.backofmyhand.com
Student.rar
Description: Binary data
clientplusstub.rar
Description: Binary data--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
