0 Replies Latest reply on Mar 14, 2003 5:58 AM by Dann Pool

    Can't invoke a message literal service ... please help

    Dann Pool Newbie

      Hi there,

      Our current client is making some existing webservices available to us via SOAP, and are constrained to doing this as message literals. In order to test out 'client' application, i'm replicating an example request/response via an instance of jboss running a very simple webservice. However I've been having problems trying to deploy a message style web service on jboss (I'm currently trying to get the message sample from axis rc1 working) and haven't had any luck.

      I've taken the sample provided with axis and deployed it on jBoss/jetty 3.0.5. When i use the style="message" in the web-service.xml jboss fails to deploy the service saying that it only supports rpc, wrapped, or document styles ... when i replace the style attribute with provider="java:MSG" the service actually deploys but the wsdl output says that it has been deployed as an rpc service. As seen in the following wsdl generated by jboss:

      -
      <wsdl:definitions targetNamespace="http://localhost:8080/axis/services/MessageService">
      +

      -

      -

      -

      -

      <attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns1:Element[]"/>






      +
      <wsdl:message name="echoElementsResponse">
      <wsdl:part name="return" type="intf:ArrayOf_tns1_Element"/>
      </wsdl:message>
      +
      <wsdl:message name="echoElementsRequest">
      <wsdl:part name="elems" type="intf:ArrayOf_tns1_Element"/>
      </wsdl:message>
      +
      <wsdl:portType name="MessageService">
      -
      <wsdl:operation name="echoElements" parameterOrder="elems">
      <wsdl:input message="intf:echoElementsRequest"/>
      <wsdl:output message="intf:echoElementsResponse"/>
      </wsdl:operation>
      </wsdl:portType>
      -
      <wsdl:binding name="MessageServiceSoapBinding" type="intf:MessageService">
      <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
      -
      <wsdl:operation name="echoElements">
      <wsdlsoap:operation soapAction=""/>
      -
      <wsdl:input>
      <wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://localhost:8080/axis/services/MessageService"/>
      </wsdl:input>
      -
      <wsdl:output>
      <wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://localhost:8080/axis/services/MessageService"/>
      </wsdl:output>
      </wsdl:operation>
      </wsdl:binding>
      +
      <wsdl:service name="MessageServiceService">
      -
      <wsdl:port name="MessageService" binding="intf:MessageServiceSoapBinding">
      <wsdlsoap:address location="http://localhost:8080/axis/services/MessageService"/>
      </wsdl:port>
      </wsdl:service>
      </wsdl:definitions>

      Running the client for this test from the command line i get the following stack trace.

      java.lang.NoSuchMethodException: samples.message.MessageService.echoElements(org.apache.axis.MessageContext, org.w3c.dom.Document)tried class: samples.message.MessageService, method name: echoElements.
      at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:135)
      at org.apache.axis.encoding.DeserializationContextImpl.endElement(DeserializationContextImpl.java:942)
      at org.apache.crimson.parser.Parser2.maybeElement(Unknown Source)
      at org.apache.crimson.parser.Parser2.content(Unknown Source)
      at org.apache.crimson.parser.Parser2.maybeElement(Unknown Source)
      at org.apache.crimson.parser.Parser2.content(Unknown Source)
      at org.apache.crimson.parser.Parser2.maybeElement(Unknown Source)
      at org.apache.crimson.parser.Parser2.parseInternal(Unknown Source)
      at org.apache.crimson.parser.Parser2.parse(Unknown Source)
      at org.apache.crimson.parser.XMLReaderImpl.parse(Unknown Source)
      at javax.xml.parsers.SAXParser.parse(Unknown Source)
      at org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:232)
      at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:546)
      at org.apache.axis.Message.getSOAPEnvelope(Message.java:377)
      at org.apache.axis.client.Call.invokeEngine(Call.java:2132)
      at org.apache.axis.client.Call.invoke(Call.java:2102)
      at org.apache.axis.client.Call.invoke(Call.java:1296)
      at samples.message.TestMsg.doit(TestMsg.java:99)
      at samples.message.TestMsg.main(TestMsg.java:120)

      Any help that you can give would be very much appriciated.

      (NB: I'm using the default config, but have copied across all the jars, sars, and configs that i need. I've also been able to successfully deploy and test an RPC webservice)

      Thanks
      ~Dann