Hi, all

Is there any configuration to prevent the empty namespace generatation of
array element for Axis1.4 when use basic type array with document/literal
style? For example,
The client soap request message is:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
   <soapenv:Body>
      <ns:echoIntArrayResponse xmlns:ns="http://quickstart.samples/xsd";>
         <ns:return>1</ns:return>
         <ns:return>2</ns:return>
         <ns:return>5</ns:return>
         <ns:return>8</ns:return>
         <ns:return>99</ns:return>
      </ns:echoIntArrayResponse>
   </soapenv:Body>
</soapenv:Envelope>


and axis serve side response:

<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>
      <aReturn xmlns="http://math.samples";>
         <item xmlns="">1</item>
         <item xmlns="">2</item>
         <item xmlns="">5</item>
         <item xmlns="">8</item>
         <item xmlns="">99</item>
      </aReturn>
   </soapenv:Body>
</soapenv:Envelope>

This won't interop with some web service client for the element <item> has a
empty namespace instead of the default one("http://math.samples";). I have
also tested with Axis2-1.3, it responses OK with the following message:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
   <soapenv:Body>
      <ns:echoIntArrayResponse xmlns:ns="http://quickstart.samples/xsd";>
         <ns:return>1</ns:return>
         <ns:return>2</ns:return>
         <ns:return>5</ns:return>
         <ns:return>8</ns:return>
         <ns:return>99</ns:return>
      </ns:echoIntArrayResponse>
   </soapenv:Body>
</soapenv:Envelope>

So for Axis 1.4, is there any configuration to make the namespace of element
<item> right? Thanks a lot!

Terry


FYI, WSDL file for the web service.

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://math.samples/";
xmlns:apachesoap="http://xml.apache.org/xml-soap";
xmlns:impl="http://math.samples/"; xmlns:intf="http://math.samples/";
xmlns:tns1="http://math.samples";
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
<!--WSDL created by Apache Axis version: 1.4
Built on Apr 22, 2006 (06:55:48 PDT)-->
 <wsdl:types>
  <schema elementFormDefault="qualified"
targetNamespace="http://math.samples";
xmlns="http://www.w3.org/2001/XMLSchema";>
   <element name="a">
    <complexType>
     <sequence>
      <element maxOccurs="unbounded" minOccurs="0" name="item" type="xsd:int"/>
     </sequence>

    </complexType>
   </element>
  </schema>
  <schema elementFormDefault="qualified"
targetNamespace="http://math.samples/";
xmlns="http://www.w3.org/2001/XMLSchema";>
   <element name="echoIntArrayReturn">
    <complexType>
     <sequence>
      <element maxOccurs="unbounded" minOccurs="0" name="item" type="xsd:int"/>
     </sequence>

    </complexType>
   </element>
  </schema>
 </wsdl:types>

   <wsdl:message name="echoIntArrayResponse">

      <wsdl:part element="impl:echoIntArrayReturn" name="echoIntArrayReturn"/>

   </wsdl:message>

   <wsdl:message name="echoIntArrayRequest">

      <wsdl:part element="tns1:a" name="a"/>

   </wsdl:message>

   <wsdl:portType name="Math">

      <wsdl:operation name="echoIntArray" parameterOrder="a">

         <wsdl:input message="impl:echoIntArrayRequest"
name="echoIntArrayRequest"/>

         <wsdl:output message="impl:echoIntArrayResponse"
name="echoIntArrayResponse"/>

      </wsdl:operation>

   </wsdl:portType>

   <wsdl:binding name="MathSoapBinding" type="impl:Math">

      <wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>

      <wsdl:operation name="echoIntArray">

         <wsdlsoap:operation soapAction=""/>

         <wsdl:input name="echoIntArrayRequest">

            <wsdlsoap:body use="literal"/>

         </wsdl:input>

         <wsdl:output name="echoIntArrayResponse">

            <wsdlsoap:body use="literal"/>

         </wsdl:output>

      </wsdl:operation>

   </wsdl:binding>

   <wsdl:service name="MathService">

      <wsdl:port binding="impl:MathSoapBinding" name="Math">

         <wsdlsoap:address location="http://localhost:8080/axis/services/Math"/>

      </wsdl:port>

   </wsdl:service>

</wsdl:definitions>

Reply via email to