1 Reply Latest reply on Mar 3, 2005 4:42 PM by thomas.diesler

    SOAP response does not conform to WSDL

    rtomlinson

      I have created a web service from a Remote interface using wscompile
      to create the WSDL and mapping.xml files. The web service deploys ok.
      I have also created a stand-alone application to consume the web service
      using JWSDP-1.5 to create stubs and such from the WSDL.
      When I run the client, an exception is thrown in a client deserializer
      while reading the response from the webservice because (it claims) the
      wrong element is present in the response. The relevant bits of the WSDL
      and SOAP message are below. If I read the WSDL correctly, the
      ...Response element should followed by a result element whereas the
      SOAP message follows the ...Response element with a ns2:User element.
      Not being an expert I don't know whether the soap message is wrong, the
      deserializer, or the wsdl

      WSDL Fragment:
       <message name="DarWorld_getCurrentUserResponse">
       <part name="result" type="ns3:User"/></message>


      and the SOAP response message:
      HTTP/1.1 200 OK
      X-Powered-By: Servlet 2.4; Tomcat-5.0.28/JBoss-4.0.1 (build: CVSTag=JBoss_4_0_1 date=200412230944)
      Content-Type: text/xml;charset=utf-8
      Transfer-Encoding: chunked
      Date: Wed, 02 Mar 2005 20:03:40 GMT
      Server: Apache-Coyote/1.1
      
      3b1
      <?xml version="1.0" encoding="UTF-8"?>
      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <soapenv:Body>
       <ns1:getCurrentUserResponse xmlns:ns1="http://darworld.bbn.com/service">
       <ns2:User xmlns:ns2="http://darworld.bbn.com">
       <background xsi:nil="1"/>
       <email xsi:nil="1"/>
       <firstname xsi:nil="1"/>
       <interests xsi:nil="1"/>
       <lastname xsi:nil="1"/>
       <nickname>Admin</nickname>
       <password>admin</password>
       <preferences xsi:nil="1"/>
       <roles>
       <description>An administrator</description>
       <rolename>admin</rolename>
       </roles>
       <roles>
       <description>A member</description>
       <rolename>member</rolename>
       </roles>
       <schedule xsi:nil="1"/>
       <username>administrator</username>
       </ns2:User>
       </ns1:getCurrentUserResponse>
       </soapenv:Body>
      </soapenv:Envelope>
      0