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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Philluminati

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

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

    <?xml version="1.0" encoding="UTF-8"?><soap:Envel ope 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:encodingSt yle="http://schemas.xmlsoap .org/soap/
    encoding/" xmlns:soap="htt p://schemas.xmlsoap .org/soap/
    envelope/"><soap:Body><G etActiveUserLis tResponse
    xmlns="AMSessio n"><listretv al xsi:type="xsd:s tring">test</
    listretval><lis tretval xsi:type="xsd:s tring">again</listretval></
    GetActiveUserLi stResponse></soap:Body></soap:Envelope>

    The body of the SOAP message returns 1 value (named
    GetActiveUserLi stResponse) 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 GetActiveUsersL ist 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.###D ELETED###.co.uk/
    ~ptaylor/poc2/AMSession.wsdl"
    xmlns="http://schemas.xmlsoap .org/wsdl/"
    xmlns:soap="htt p://schemas.xmlsoap .org/wsdl/soap/"
    xmlns:tns="http ://wwwpreview.###D ELETED###.co.uk/~ptaylor/poc2/
    AMSession.wsdl"
    xmlns:xsd="http ://www.w3.org/2001/XMLSchema"
    xmlns:xsd1="htt p://wwwpreview.###D ELETED###.co.uk/~ptaylor/
    poc2/AMSession.wsdl"
    >
    <types>
    <schema targetNamespace ="http://www.w3.org/2001/XMLSchema">
    <complexType name="ArrayOfst ring">
    <complexContent >
    <restriction base="soapenc:A rray">
    <!--
    <sequence>
    <element name="listretva l"
    type="xsd:strin g"
    minOccurs="0"
    maxOccurs="unbo unded" nillable="true"/>
    </sequence-->
    <attribute ref="soapenc:ar rayType"
    wsdl:arrayType= "xsd:string[]"
    xmlns:wsdl="htt p://
    schemas.xmlsoap .org/wsdl/"/>
    </restriction>
    </complexContent>
    </complexType>
    </schema>
    </types>

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

    <message name="loginPara ms">
    <part name="username" type="xsd:strin g" />
    <part name="password" type="xsd:strin g" />
    </message>

    <message name="sessionKe y">
    <part name="sessionke y" type="xsd:strin g" />
    </message>

    <message name="getVersio nRetval">
    <part name="retval" type="xsd:strin g" />
    </message>

    <message name="GetActive UserListRetval" >
    <part name="GetActive UserListRespons e"
    type="xsd:Array Ofstring" />
    </message>

    <portType name="amsession _port_type">
    <operation name="Login">
    <input message="tns:lo ginParams" />
    <output message="tns:se ssionKey" />
    </operation>
    <operation name="Logout">
    <input message="tns:se ssionKey" />
    <output message="tns:vo id" />
    </operation>
    <operation name="GetActive UserList">
    <input message="tns:vo id" />
    <output message="tns:Ge tActiveUserList Retval" />
    </operation>
    <operation name="GetServer Version">
    <input message="tns:vo id" />
    <output message="tns:ge tVersionRetval" />
    </operation>
    </portType>

    <binding name="amsession _binding" type="tns:amses sion_port_type" >
    <soap:binding style="rpc" transport="http ://
    schemas.xmlsoap .org/soap/http" />

    <operation name="Login">
    <soap:operati on soapAction="urn :AMSession#Logi n" />
    <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:operati on soapAction="urn :AMSession#Logo ut" />
    <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="GetActive UserList">
    <soap:operati on soapAction="urn :AMSession#GetA ctiveUserList" /
    >
    <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="GetServer Version">
    <soap:operati on soapAction="urn :AMSession#GetS erverVersion" />
    <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="SessionSe rvice">
    <documentation> Allows users to validate and get session keys
    for accessing subsystems</documentation>
    <port binding="tns:am session_binding " name="amsession _port">
    <soap:address
    location="http://wwwpreview.###D ELETED###.co.uk/cgi-
    bin/poc2/AMSession.cgi" />
    </port>
    </service>
    </definitions>
Working...