I'm new to web services and I created a basic project in eclipse with one exposed method. I was able to deploy my webservice and it works fine. The code is below.
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
@WebService(targetNamespace="http://test.com", name="testService")
public class WebService {
@WebMethod(operationName="start")
public String start(@WebParam(name="inputParameter") String inputParameter) {
return startMethod(inputParameter);
}
}
My question is how do I set up this method to deal with complex types. I want to receive a number of parameters, but I don't want to just receive them as a bunch of strings. I was thinking of having some sort of wrapper object that contained all the parameters I need for my method. Any advice on how to do this? Do I need additional annotations to create the WSDL? Thanks!