1 Reply Latest reply on Mar 3, 2005 4:42 PM by Thomas Diesler

    SOAP response does not conform to WSDL

    Ray Tomlinson Newbie

      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
      <?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">
       <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"/>
       <preferences xsi:nil="1"/>
       <description>An administrator</description>
       <description>A member</description>
       <schedule xsi:nil="1"/>