How do you pass classes as parameters to web services?
I want to pass the following class as a parameter to a web service operation
publicclass TestClass{
private String a;
private String b;
public TestClass(){
}
public TestClass(String s1, String s2){
a = s1;
b = s2;
}
public String concat(){
return a+b;
}
}
the web method looks like this
@WebMethod
public String testMethodA(TestClass test){
return test.concat();
}
@WebMethod
public String testMethodB(String s1, String s2){
return s1 + s2;
}
I can get testMethodB to work just fine but I cant get testMethodA working. Is it possible to do something like this? When I try to instantiate TestClass in the client and pass it to the web method I get an undefined symbol error. It says that it cant find the constructor that takes two strings. Can anyone point me in the right direction or even show me where I can see an example of a web method that takes a class as a parameter? thanks for the help

