You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@xml.apache.org by Aczel Csilla <ac...@freemail.hu> on 2001/12/10 15:22:15 UTC
return type: array of Strings
Hi All,
I would like to write a web service with a String parameter and with
String[] return value.
I don't know how should I write wsdl documents for the service, how can I
define array in it.
My wsdl-interface docoment is:
*********************************************
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="Echo_Service"
targetNamespace="http://www.echoservice.com/Echo-interface"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://www.echoservice.com/Echo"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<types>
<xsd:schema
targetNamespace="http://www.echoservice.com/Echo"
xmlns="http://www.w3.org/1999/XMLSchema/">
</xsd:schema>
</types>
<message
name="InechomessageRequest">
<part name="meth1_inType1"
type="xsd:string"/>
</message>
<message
name="OutechomessageResponse">
<part name="meth1_outType"
type="java.lang.String"/> ************* I would like to use
String[] here!
</message>
<portType
name="Echo_Service">
<operation name="echomessage">
<input
message="InechomessageRequest"/>
<output
message="OutechomessageResponse"/>
</operation>
</portType>
<binding
name="Echo_ServiceBinding" type="Echo_Service">
<soap:binding
style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
<operation
name="echomessage">
<soap:operation
soapAction="urn:echo-service"/>
<input>
<soap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:echo-service"
use="encoded"/>
</input>
<output>
<soap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:echo-service" use="encoded"/>
</output>
</operation>
</binding>
</definitions>
********************************************
Any help is appreciated, thanks,
Csilla
Re: return type: array of Strings
Posted by Aczel Csilla <ac...@freemail.hu>.
Hi Paramdeep,
Thank you for your immediate response!
I will study your wsdl file and I let you know about my result.
Thanks and best regards:
Csilla
Re: return type: array of Strings
Posted by Aczel Csilla <ac...@freemail.hu>.
Hi Paramdeep,
Thank you for your immediate response!
I will study your wsdl file and I let you know about my result.
Thanks and best regards:
Csilla
Re: return type: array of Strings
Posted by Paramdeep Singh <ma...@yahoo.com>.
Hi Csilla,
Array is NOT a simple type, supported by SOAP.
You need to define a types tag for it.
I am attaching a WSDL file, which takes a string as an [out] parameter, and
has an array of strings as return value.
If you want this string parameter as an in parameter, then simply copy it to
the input message.
Hope that it helps.
Feel free to ask any further queries.
with warm regards,
Paramdeep.
NOTE: I have put it as pd.xml. simply change it to pd.wsdl
----- Original Message -----
From: "Aczel Csilla" <ac...@freemail.hu>
To: <so...@xml.apache.org>
Sent: Monday, December 10, 2001 7:52 PM
Subject: return type: array of Strings
> Hi All,
>
> I would like to write a web service with a String parameter and with
> String[] return value.
> I don't know how should I write wsdl documents for the service, how can I
> define array in it.
>
> My wsdl-interface docoment is:
>
> *********************************************
> <?xml version="1.0" encoding="UTF-8"?>
> <definitions name="Echo_Service"
> targetNamespace="http://www.echoservice.com/Echo-interface"
> xmlns="http://schemas.xmlsoap.org/wsdl/"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:tns="http://www.echoservice.com/Echo"
> xmlns:xsd="http://www.w3.org/1999/XMLSchema">
>
> <types>
> <xsd:schema
> targetNamespace="http://www.echoservice.com/Echo"
> xmlns="http://www.w3.org/1999/XMLSchema/">
> </xsd:schema>
> </types>
>
> <message
> name="InechomessageRequest">
> <part name="meth1_inType1"
> type="xsd:string"/>
> </message>
>
> <message
> name="OutechomessageResponse">
> <part name="meth1_outType"
> type="java.lang.String"/> ************* I would like to use
> String[] here!
> </message>
>
>
> <portType
> name="Echo_Service">
> <operation name="echomessage">
> <input
> message="InechomessageRequest"/>
> <output
> message="OutechomessageResponse"/>
> </operation>
> </portType>
>
>
>
> <binding
> name="Echo_ServiceBinding" type="Echo_Service">
> <soap:binding
> style="rpc"
> transport="http://schemas.xmlsoap.org/soap/http"/>
> <operation
> name="echomessage">
> <soap:operation
> soapAction="urn:echo-service"/>
> <input>
> <soap:body
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="urn:echo-service"
> use="encoded"/>
> </input>
> <output>
> <soap:body
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="urn:echo-service" use="encoded"/>
> </output>
> </operation>
> </binding>
>
> </definitions>
>
> ********************************************
>
> Any help is appreciated, thanks,
> Csilla
>
>
Re: return type: array of Strings
Posted by Paramdeep Singh <ma...@yahoo.com>.
Hi Csilla,
Array is NOT a simple type, supported by SOAP.
You need to define a types tag for it.
I am attaching a WSDL file, which takes a string as an [out] parameter, and
has an array of strings as return value.
If you want this string parameter as an in parameter, then simply copy it to
the input message.
Hope that it helps.
Feel free to ask any further queries.
with warm regards,
Paramdeep.
NOTE: I have put it as pd.xml. simply change it to pd.wsdl
----- Original Message -----
From: "Aczel Csilla" <ac...@freemail.hu>
To: <so...@xml.apache.org>
Sent: Monday, December 10, 2001 7:52 PM
Subject: return type: array of Strings
> Hi All,
>
> I would like to write a web service with a String parameter and with
> String[] return value.
> I don't know how should I write wsdl documents for the service, how can I
> define array in it.
>
> My wsdl-interface docoment is:
>
> *********************************************
> <?xml version="1.0" encoding="UTF-8"?>
> <definitions name="Echo_Service"
> targetNamespace="http://www.echoservice.com/Echo-interface"
> xmlns="http://schemas.xmlsoap.org/wsdl/"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:tns="http://www.echoservice.com/Echo"
> xmlns:xsd="http://www.w3.org/1999/XMLSchema">
>
> <types>
> <xsd:schema
> targetNamespace="http://www.echoservice.com/Echo"
> xmlns="http://www.w3.org/1999/XMLSchema/">
> </xsd:schema>
> </types>
>
> <message
> name="InechomessageRequest">
> <part name="meth1_inType1"
> type="xsd:string"/>
> </message>
>
> <message
> name="OutechomessageResponse">
> <part name="meth1_outType"
> type="java.lang.String"/> ************* I would like to use
> String[] here!
> </message>
>
>
> <portType
> name="Echo_Service">
> <operation name="echomessage">
> <input
> message="InechomessageRequest"/>
> <output
> message="OutechomessageResponse"/>
> </operation>
> </portType>
>
>
>
> <binding
> name="Echo_ServiceBinding" type="Echo_Service">
> <soap:binding
> style="rpc"
> transport="http://schemas.xmlsoap.org/soap/http"/>
> <operation
> name="echomessage">
> <soap:operation
> soapAction="urn:echo-service"/>
> <input>
> <soap:body
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="urn:echo-service"
> use="encoded"/>
> </input>
> <output>
> <soap:body
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="urn:echo-service" use="encoded"/>
> </output>
> </operation>
> </binding>
>
> </definitions>
>
> ********************************************
>
> Any help is appreciated, thanks,
> Csilla
>
>