views:

1084

answers:

0

I am using Apache Axis 1.4 and Netbeans 6.5 to develop and test a SOAP Web service and client. I generated the Java classes from the WSDL (see attachment). It builds and deploys without problem, but when I try to run the client to test the WS, I get an error. The namespace looks correct, so why does it say it can't find the dispatch method for my service?


Here is the client code I'm running:

MycoPerson person = ...; WsResponse response = null; ProfileServiceServiceLocator locator = new ProfileServiceServiceLocator(); ProfileServiceSoap_PortType service = null; try { service = locator.getProfileServiceSoap(); } catch (ServiceException ex) { Logger.getLogger(MycoWSClient.class.getName()).log(Level.SEVERE, null, ex); } try { response = service.createNewUser(person); } catch (RemoteException ex) { Logger.getLogger(MycoWSClient.class.getName()).log(Level.SEVERE, null, ex); } if( response == null ) { System.out.println( "Null response!"); }


Here is the console contents when it fails:

SEVERE: null

AxisFault faultCode: {h t t p://schemas.xmlsoap.org/soap/envelope/}Client faultSubcode: faultString: Cannot find dispatch method for {h t t p://ws.vap.myco.com/}createNewUser faultActor: faultNode: faultDetail: {h t t p://xml.apache.org/axis/}stackTrace:Cannot find dispatch method for {h t t p://ws.vap.myco.com/}createNewUser at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222) at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129) at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087) ... at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227) at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696) at org.apache.axis.Message.getSOAPEnvelope(Message.java:435) at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206) at org.apache.axis.client.Call.invokeEngine(Call.java:2784) ... at com.rxc.service.prescriber.generated.ProfileServiceSoap_BindingStub.createNewUser(ProfileServiceSoap_BindingStub.java:272) at com.myco.rxc.ws.client.RxcWSClient.main(RxcWSClient.java:62) {h t t p://xml.apache.org/axis/}hostname:RTPWL09D33309 Cannot find dispatch method for {h t t p://ws.vap.myco.com/}createNewUser at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222) at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129) at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087) ... at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62) Null response! at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206) at org.apache.axis.client.Call.invokeEngine(Call.java:2784) at org.apache.axis.client.Call.invoke(Call.java:2767) at org.apache.axis.client.Call.invoke(Call.java:2443) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) at com.rxc.service.prescriber.generated.ProfileServiceSoap_BindingStub.createNewUser(ProfileServiceSoap_BindingStub.java:272) at com.myco.rxc.ws.client.RxcWSClient.main(RxcWSClient.java:62)


Here is the WSDL

http://jax-ws.dev.java.net. RI version JAX-WS RI 2.1.4-b01-. --> ... ... This method allows you to give a person access to an online program.