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

[1753 byte] By [jphilli9a] at [2007-11-27 5:32:39]
# 1
Just add setters/getters to TestClass for a and b and it should work fine.For example, public String getA() { return a; } public void setA(String a) {this.a = a; } public String getB() { return b; } public void setB(String b) {this.b = b; }
dkohlerta at 2007-7-12 14:59:03 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2
Thanks, that helped.
jphilli9a at 2007-7-12 14:59:03 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...