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 Oliver Rettig <Ol...@telda.net> on 2001/08/22 10:26:01 UTC
Re: Help!
Hi Luyantao,
> I am sorry to brother you. I had read your mail_lists about using string[] as parameter on ms_client invoking apache on Apache Soap mail list. And I met the same problem as yours.I wonder if you have solved the problem. If you hava , I hope you can tell me the solution. Thank you very much in advance.
This is part of my wsdl-file:
<?xml version="1.0" ?>
<definitions name="urn:KlickBlick"
targetNamespace="urn:KlickBlickOperator"
xmlns:wsdlns='urn:KlickBlickOperator'
xmlns:tns="urn:xml-klickblick"
xmlns:xsd="http://www.w3.org/1999/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns="http://schemas.xmlsoap.org/wsdl/">
<types>
<xsd:schema targetNamespace='urn:xml-klickblick'
xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/'
xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
elementFormDefault='qualified'>
<xsd:complexType name='arrayOfString'>
<xsd:complexContent>
<xsd:restriction base='SOAP-ENC:Array'>
<xsd:attribute ref='SOAP-ENC:arrayType' wsdl:arrayType='xsd:string[]'/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
</xsd:schema>
</types>
<!-- message declns -->
<message name='stringArrayRequest'>
<part name='arrayOfString' type='tns:arrayOfString'/>
</message>
<message name='stringArrayResponse'>
<part name='return' type='tns:arrayOfString'/>
</message>
<!-- port type declns -->
<portType name="KlickBlickPortType">
<operation name='dummy'>
<input message='stringArrayRequest'/>
<output message='stringArrayResponse'/>
</operation>
<!-- binding declns -->
<binding name="KlickBlickSOAPBinding" type="KlickBlickPortType">
<soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="dummy">
<soap:operation soapAction=""/>
<input>
<soap:body use="encoded"
namespace="urn:KlickBlickOperator"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>
<output>
<soap:body use="encoded"
namespace="urn:KlickBlickOperator"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>
This is part of my Deploymentdescriptor:
<isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
id="urn:KlickBlickOperator">
<isd:provider type="java"
scope="Application"
methods="dummy">
<isd:java class="KlickBlick.Soap.KlickBlickSoapService" static="false"/>
</isd:provider>
<isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultListener>
<isd:mappings>
<isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="" qname="tns:arrayOfString"
java2XMLClassName="org.apache.soap.encoding.soapenc.ArraySerializer"
xml2JavaClassName="org.apache.soap.encoding.soapenc.ArraySerializer"/>
The important thing is that xmlns:tns="": donĀ“t use a real namespace here. So the QName of the array is "arrayOfString. This QName you have to use in the wsdl-file for the name of the request parameter. Thats a trick. ms-soap-toolkit does not send the type of the request parameter. But if we use as name of the
request-parameter the type apache-soap can map it.
Hope I cauld help you. Good luck. I had a lot of trubble with it but now it works really fine. If you try to work with String[][] you get further problems. If you get a solution of it please tell it to me. I think I will need it in the next few month.
best regards
Oliver