I want to create a "document literal" Web Service. My goal is to have one service with several operations. But Axis seems to insist that I have a single method in my implementation class.
public class TestService { public void methodA(SOAPEnvelope request, SOAPEnvelope response) throws Exception { System.out.println("You have reached TestService#methodA"); } public void methodB(SOAPEnvelope request, SOAPEnvelope response) throws Exception { System.out.println("You have reached TestService#methodB"); } }
Coded like this, the Axis-generated WSDL shows two operations, methodA and methodB. But running the service generates:
<soapenv:Fault> <faultcode>soapenv:Server.generalException</faultcode> <faultstring> Couldn't find an appropriate operation for XML QName {http://schemas.xmlsoap.org/soap/envelope/}getQuote </faultstring> <detail/> </soapenv:Fault>
If I *remove* one of the methods it runs fine!
To summarize: is there a way to configure things to have a 'style="message"' service with multiple methods? If not, is there a down-side to simply coding one Web Service, containing a single method, for each operation I want to provide to my users?