Loading ...
Sorry, an error occurred while loading the content.

5772Re: newbie WSDL problems

Expand Messages
  • martinh2osport
    Dec 28, 2006
    • 0 Attachment
      I've got this going now, someone sent me a good link;

      http://www-128.ibm.com/developerworks/webservices/library/ws-whichwsdl/

      After reading this I decided to switch my WSDL style to document/literal.

      I re-worked the schema(which makes more sense to me in this style) to
      suit the messages sent and returned and it works fine. Mindreef was
      very strict about the WSDL but hopefully it made me do it right.
      Anyway, SOAP::Lite, XMLspy and Mindreef as clients all understand the
      WSDL and act accordingly.

      If anybody is interested in the code or WSDL I'll just reply to this
      post and I'll add it.





      --- In soaplite@yahoogroups.com, "martinh2osport" <martin@...> wrote:
      >
      > Hi,
      >
      > I'm having a few problems getting my WSDL to match the return value
      > from a SOAP::Lite daemon v0.67. I am using the examples on the quick
      > start guide, namely the http daemon and calling a simple package the
      > returns what you send it.
      >
      > The XML I get back from v0.60 on my debian system has the hiResponse
      > prefixed(see below (1), the XML I get from 0.67 on my solaris system
      > is not prefixed (2), I'm using midreef to test and it complains that
      > the hiResonse section does not match the schema, as far as I can see
      > the schema loooks ok(newbie opinion). If I use the mindreef simulator
      > it sends back code that looks more like that of v0.60 and passes, i.e.
      > the elements are prefixed (3). WSDL is pasted below (4).
      >
      > I think that I need to get SOAP::Lite to send back my response(2) to
      > like (3) i.e prefixed or adjust my WSDL, any help or examples would be
      > appreciated.
      >
      >
      > (1)
      >
      > SOAPServer: SOAP::Lite/Perl/0.60
      >
      > <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
      > xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
      > xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
      > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
      > xmlns:xsd="http://www.w3.org/1999/XMLSchema"
      >
      SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><namesp1:hiResponse
      > xmlns:namesp1="http://www.soaplite.com/Demo"><param1
      > xsi:type="xsd:string">echo
      > me</param1></namesp1:hiResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
      >
      >
      > (2)
      >
      > <soap:Envelope
      > soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
      > xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      > <soap:Body>
      > <hiResponse xmlns="PerlMQ_WS">
      > <innerResponse xsi:type="xsd:string">sd</innerResponse>
      > </hiResponse>
      > </soap:Body>
      > </soap:Envelope>
      >
      >
      > (3)
      >
      > <s0:hiResponse
      > xmlns:s0="PerlMQ_WS"
      > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
      > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      > xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      > <innerResponse>123</innerResponse>
      > </s0:hiResponse>
      >
      > (4)
      >
      > <?xml version="1.0"?>
      > <definitions name="WSMQ_Service" targetNamespace="PerlMQ_WS"
      > xmlns:tns="PerlMQ_WS" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
      > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      >
      > xmlns="http://schemas.xmlsoap.org/wsdl/">
      > <types>
      > <xsd:schema targetNamespace="PerlMQ_WS"
      > elementFormDefault="qualified">
      > <xsd:complexType
      > name="MyResponseType">
      > <xsd:all>
      > <xsd:element
      > name="innerResponse" type="xsd:string"/>
      > </xsd:all>
      > </xsd:complexType>
      >
      > </xsd:schema>
      > </types>
      >
      > <message name="RequestMessage">
      > <part name="Request" type="xsd:string"/>
      > </message>
      >
      > <message name="ResponseMessage">
      > <part name="hiResponse" type="tns:MyResponseType"/>
      > </message>
      >
      > <portType name="WSMQPortType">
      > <operation name="hi">
      > <input message="tns:RequestMessage"/>
      > <output message="tns:ResponseMessage"/>
      > </operation>
      > </portType>
      >
      > <binding name="WSMQSoapBinding" type="tns:WSMQPortType">
      > <soap:binding style="rpc"
      > transport="http://schemas.xmlsoap.org/soap/http"/>
      > <operation name="hi">
      > <soap:operation soapAction="PerlMQ_WS#hi"/>
      > <input>
      > <soap:body use="encoded"
      > namespace="PerlMQ_WS"
      > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
      >
      > </input>
      > <output>
      > <soap:body use="encoded"
      > namespace="PerlMQ_WS"
      > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
      >
      > </output>
      >
      > </operation>
      > </binding>
      >
      > <service name="WSMQService">
      > <documentation>My first service</documentation>
      > <port name="WSMQPort" binding="tns:WSMQSoapBinding">
      > <soap:address location="http://hostname:5010"/>
      > </port>
      > </service>
      > </definitions>
      >
    • Show all 2 messages in this topic