Hi Guys,
Is there a problem with Axis 1.3 returning a Bean Array using docment/literal wrapped ?.
It is only a simple Test operation
Employe[] getEmployees ( String department, String section )
I have found the the SOAP response contains an extra getEmployeeRetun element
=========================================================================
BAD RESPONSE
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<getEmployeesResponse xmlns="http://server.soap.acme.com">
<getEmployeesReturn> <<< ====
<getEmployeesReturn xsi:type="ns1:Employee" xmlns:ns1="http://server.soap.acme.com">
<ns1:employee_id xsi:type="xsd:string">A1001</ns1:employee_id>
<ns1:first_name xsi:type="xsd:string">BEN</ns1:first_name>
<ns1:salary xsi:type="xsd:double">2345.82</ns1:salary>
<ns1:surname xsi:type="xsd:string">JONES</ns1:surname>
</getEmployeesReturn>
<getEmployeesReturn xsi:type="ns2:Employee" xmlns:ns2="http://server.soap.acme.com">
<ns2:employee_id xsi:type="xsd:string">A1012</ns2:employee_id>
<ns2:first_name xsi:type="xsd:string">PATRICK</ns2:first_name>
<ns2:salary xsi:type="xsd:double">26456.04</ns2:salary>
<ns2:surname xsi:type="xsd:string">PAUL</ns2:surname>
</getEmployeesReturn>
</getEmployeesReturn> <<< ====
</getEmployeesResponse>
</soapenv:Body>
</soapenv:Envelope>
=========================================================================
GOOD RESPONSE
When I remove the extra getEmployeeReturn element, .Net receives the array.
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<getEmployeesResponse xmlns="http://server.soap.acme.com">
<getEmployeesReturn xsi:type="ns1:Employee" xmlns:ns1="http://server.soap.acme.com">
<ns1:employee_id xsi:type="xsd:string">A1001</ns1:employee_id>
<ns1:first_name xsi:type="xsd:string">BEN</ns1:first_name>
<ns1:salary xsi:type="xsd:double">2345.82</ns1:salary>
<ns1:surname xsi:type="xsd:string">JONES</ns1:surname>
</getEmployeesReturn>
<getEmployeesReturn xsi:type="ns2:Employee" xmlns:ns2="http://server.soap.acme.com">
<ns2:employee_id xsi:type="xsd:string">A1012</ns2:employee_id>
<ns2:first_name xsi:type="xsd:string">PATRICK</ns2:first_name>
<ns2:salary xsi:type="xsd:double">26456.04</ns2:salary>
<ns2:surname xsi:type="xsd:string">PAUL</ns2:surname>
</getEmployeesReturn>
</getEmployeesResponse>
</soapenv:Body>
</soapenv:Envelope>
=========================================================================
The WSDL was created by the Java2WSDL program
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://server.soap.acme.com" xmlns:impl="http://server.soap.acme.com" xmlns:intf="http://server.soap.acme.com" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<!--WSDL created by Apache Axis version: 1.3
Built on Oct 05, 2005 (05:23:37 EDT)-->
<wsdl:types>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://server.soap.acme.com" elementFormDefault="qualified">
<element name="getEmployees">
<complexType>
<sequence>
<element name="department_code" type="xsd:string"/>
<element name="section_code" type="xsd:string"/>
</sequence>
</complexType>
</element>
<element name="getEmployeesResponse">
<complexType>
<sequence>
<element name="getEmployeesReturn" type="impl:Employee" maxOccurs="unbounded"/>
</sequence>
</complexType>
</element>
<complexType name="Employee">
<sequence>
<element name="employee_id" nillable="true" type="xsd:string"/>
<element name="first_name" nillable="true" type="xsd:string"/>
<element name="salary" type="xsd:double"/>
<element name="surname" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
</schema>
</wsdl:types>
<wsdl:message name="getEmployeesResponse">
<wsdl:part name="parameters" element="impl:getEmployeesResponse"/>
</wsdl:message>
<wsdl:message name="getEmployeesRequest">
<wsdl:part name="parameters" element="impl:getEmployees"/>
</wsdl:message>
<wsdl:portType name="EmployeeServerServicePortType">
<wsdl:operation name="getEmployees">
<wsdl:input name="getEmployeesRequest" message="impl:getEmployeesRequest"/>
<wsdl:output name="getEmployeesResponse" message="impl:getEmployeesResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="EmployeeServerServiceBinding" type="impl:EmployeeServerServicePortType">
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="getEmployees">
<wsdlsoap:operation soapAction="getEmployees"/>
<wsdl:input name="getEmployeesRequest">
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output name="getEmployeesResponse">
<wsdlsoap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="EmployeeServerServiceService">
<wsdl:port name="EmployeeServerServicePort" binding="impl:EmployeeServerServiceBinding">
<wsdlsoap:address location="http://lansa11:1099/cgi-bin/jsmdirect?employee"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
=========================================================================
regards
Alick Buckley
LANSA Research and Development
LANSA Pty Ltd
Phone: +61289070243
http://www.lansa.com
mailto:Alick.Buckley@lansa.com.au
