What is the correct WSDL snippet for this XML SOAP Message?

Discussion in 'XML' started by Philluminati, May 8, 2008.

  1. Philluminati

    Philluminati Guest

    I have a Perl SOAP Server which returns this SOAP Message when
    invoked:

    <?xml version="1.0" encoding="UTF-8"?><soap:Envelope 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" soap:encodingStyle="http://schemas.xmlsoap.org/soap/
    encoding/" xmlns:soap="http://schemas.xmlsoap.org/soap/
    envelope/"><soap:Body><GetActiveUserListResponse
    xmlns="AMSession"><listretval xsi:type="xsd:string">test</
    listretval><listretval xsi:type="xsd:string">again</listretval></
    GetActiveUserListResponse></soap:Body></soap:Envelope>

    The body of the SOAP message returns 1 value (named
    GetActiveUserListResponse) which is an array of strings, each one
    defined inside <listretval>.

    What would be the correct WSDL text to tell clients about that this is
    the return type?

    Just as a helper I have pasted my WSDL file below, as an attempt. The
    function is called GetActiveUsersList and takes no arguments. Feel
    free to ignore it if it isn't relevent to answering the question.

    Any help would be really appreciated.

    <?xml version="1.0" encoding="UTF-8"?>

    <definitions name="AMSession"
    targetNamespace="http://wwwpreview.###DELETED###.co.uk/
    ~ptaylor/poc2/AMSession.wsdl"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:tns="http://wwwpreview.###DELETED###.co.uk/~ptaylor/poc2/
    AMSession.wsdl"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsd1="http://wwwpreview.###DELETED###.co.uk/~ptaylor/
    poc2/AMSession.wsdl"

    >


    <types>
    <schema targetNamespace="http://www.w3.org/2001/XMLSchema">
    <complexType name="ArrayOfstring">
    <complexContent>
    <restriction base="soapenc:Array">
    <!--
    <sequence>
    <element name="listretval"
    type="xsd:string"
    minOccurs="0"
    maxOccurs="unbounded" nillable="true"/>
    </sequence> -->
    <attribute ref="soapenc:arrayType"
    wsdl:arrayType="xsd:string[]"
    xmlns:wsdl="http://
    schemas.xmlsoap.org/wsdl/"/>
    </restriction>
    </complexContent>
    </complexType>
    </schema>
    </types>

    <message name="void">
    </message>

    <message name="loginParams">
    <part name="username" type="xsd:string" />
    <part name="password" type="xsd:string" />
    </message>

    <message name="sessionKey">
    <part name="sessionkey" type="xsd:string" />
    </message>

    <message name="getVersionRetval">
    <part name="retval" type="xsd:string" />
    </message>

    <message name="GetActiveUserListRetval">
    <part name="GetActiveUserListResponse"
    type="xsd:ArrayOfstring" />
    </message>

    <portType name="amsession_port_type">
    <operation name="Login">
    <input message="tns:loginParams" />
    <output message="tns:sessionKey" />
    </operation>
    <operation name="Logout">
    <input message="tns:sessionKey" />
    <output message="tns:void" />
    </operation>
    <operation name="GetActiveUserList">
    <input message="tns:void" />
    <output message="tns:GetActiveUserListRetval" />
    </operation>
    <operation name="GetServerVersion">
    <input message="tns:void" />
    <output message="tns:getVersionRetval" />
    </operation>
    </portType>

    <binding name="amsession_binding" type="tns:amsession_port_type">
    <soap:binding style="rpc" transport="http://
    schemas.xmlsoap.org/soap/http" />

    <operation name="Login">
    <soap:eek:peration soapAction="urn:AMSession#Login" />
    <input>
    <soap:body
    encodingStyle="http://schemas.xmlsoap.org/soap/
    encoding/"
    namespace="urn:AMSession"
    use="encoded" />
    </input>
    <output>
    <soap:body
    encodingStyle="http://schemas.xmlsoap.org/soap/
    encoding/"
    namespace="urn:AMSession"
    use="encoded" />
    </output>
    </operation>

    <operation name="Logout">
    <soap:eek:peration soapAction="urn:AMSession#Logout" />
    <input>
    <soap:body
    encodingStyle="http://schemas.xmlsoap.org/soap/
    encoding/"
    namespace="urn:AMSession"
    use="encoded" />
    </input>
    <output>
    <soap:body
    encodingStyle="http://schemas.xmlsoap.org/soap/
    encoding/"
    namespace="urn:AMSession"
    use="encoded" />
    </output>
    </operation>

    <operation name="GetActiveUserList">
    <soap:eek:peration soapAction="urn:AMSession#GetActiveUserList" /
    >

    <input>
    <soap:body
    encodingStyle="http://schemas.xmlsoap.org/soap/
    encoding/"
    namespace="urn:AMSession"
    use="encoded" />
    </input>
    <output>
    <soap:body
    encodingStyle="http://schemas.xmlsoap.org/soap/
    encoding/"
    namespace="urn:AMSession"
    use="encoded" />
    </output>
    </operation>
    <operation name="GetServerVersion">
    <soap:eek:peration soapAction="urn:AMSession#GetServerVersion" />
    <input>
    <soap:body
    encodingStyle="http://schemas.xmlsoap.org/soap/
    encoding/"
    namespace="urn:AMSession"
    use="encoded" />
    </input>
    <output>
    <soap:body
    encodingStyle="http://schemas.xmlsoap.org/soap/
    encoding/"
    namespace="urn:AMSession"
    use="encoded" />
    </output>
    </operation>
    </binding>

    <service name="SessionService">
    <documentation>Allows users to validate and get session keys
    for accessing subsystems</documentation>
    <port binding="tns:amsession_binding" name="amsession_port">
    <soap:address
    location="http://wwwpreview.###DELETED###.co.uk/cgi-
    bin/poc2/AMSession.cgi" />
    </port>
    </service>
    </definitions>
    Philluminati, May 8, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chris Bedford
    Replies:
    0
    Views:
    569
    Chris Bedford
    Aug 21, 2003
  2. jm
    Replies:
    4
    Views:
    557
    GIMME
    Jan 6, 2004
  3. Tomislav Lepusic

    WSDL/SOAP/XML-RPC HELP

    Tomislav Lepusic, Aug 20, 2004, in forum: XML
    Replies:
    1
    Views:
    810
    Simon Andrew
    Aug 22, 2004
  4. Peter van der veen

    How to add SOAP header to a SOAP message?

    Peter van der veen, Nov 8, 2006, in forum: ASP .Net Web Services
    Replies:
    6
    Views:
    562
    J. Dudgeon
    Nov 14, 2006
  5. Me
    Replies:
    2
    Views:
    421
Loading...

Share This Page