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" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> 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 > >
<definitions name = 'myService' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:xsd='http://www.w3.org/2001/XMLSchema' targetNamespace='http://tempuri.org/wsdl/' xmlns:typens='http://tempuri.org/type'> <types> <schema targetNamespace='http://tempuri.org/type' xmlns='http://www.w3.org/2001/XMLSchema' xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/' xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/' elementFormDefault='qualified'></schema> </types><message name= 'Inmeth1Request'></message> <message name= 'Outmeth1Response'><part name='meth1_RetValue' type='typens:ArrayOfstring'/><part name='param2' type='xsd:string'/></message> <portType name='myService'> <operation name='meth1' parameterOrder='param2 '> <documentation>This is the first method. It has an array as return value, and a string as out param</documentation><input message='Inmeth1Request'/> <output message='Outmeth1Response'/> </operation> </portType> <binding name='myServiceBinding' type='myService'> <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/> <operation name='meth1'> <soap:operation soapAction='myService'/> <input> <soap:body use='encoded' namespace='myService ' encodingStyle='http://schemas.xmlsoap.org/soap/encoding/' /> </input> <output> <soap:body use='encoded' namespace='myService ' encodingStyle='http://schemas.xmlsoap.org/soap/encoding/' /> </output> </operation> </binding><service name='myService'> <documentation>This is a unit test prog.!!</documentation><port name='myServicePort' binding='myServiceBinding'> <soap:address location='http://localhost/server.asp'/> </port> </service> </definitions>