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

P

Philluminati

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>

<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>
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,154
Members
46,702
Latest member
LukasConde

Latest Threads

Top