468,777 Members | 2,315 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,777 developers. It's quick & easy.

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: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:operation 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:operation 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:operation 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:operation 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>
Jun 27 '08 #1
0 2433

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by relaxedrob | last post: by
reply views Thread by Sonna Nach | last post: by
1 post views Thread by easoft | last post: by
2 posts views Thread by Ryan Folstad | last post: by
reply views Thread by Elhanan | last post: by
6 posts views Thread by Naveed Anwar | last post: by
reply views Thread by Andrew Brook | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.