Fascinating that Axis knows to return my response in the namespace 
"http://www.foo.com";.  Axis knows nothing about the WSDL I've generated or 
targetNamespaces of the schema and without any beanMappings/typeMappings -- I wonder 
what assumptions it makes?

-----Original Message-----
From: Cory Wilkerson 
Sent: Wednesday, August 27, 2003 4:31 PM
To: '[EMAIL PROTECTED]'
Subject: wrapped style serialization


I've created the following schema in my WSDL types:
--------------------------------------
    <xs:schema targetNamespace="http://www.foo.com";>
      <xs:element name="process">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="bar" type="xs:string"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="processResponse">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="response">
              <xs:complexType>
                  <xs:sequence>
                    <xs:element name="returnedItem" type="xs:string" minOccurs="0" 
maxOccurs="unbounded"/>
                  </xs:sequence> 
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:schema>
--------------------------------------

Dumped the following in server-config:
--------------------------------------
  <service name="FooTest" provider="java:RPC" style="wrapped" use="literal">
    <parameter name="allowedMethods" value="*"/>
    <parameter name="scope" value="appliation"/>
    <parameter name="className" value="com.travelnow.xml.test.FooTest"/>
  </service>
--------------------------------------

The response generated by Axis seems to think it needs to encode the response as a 
soap encoded array type:
--------------------------------------
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"mlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
 <soapenv:Body>
  <processResponse xmlns="http://www.foo.com";>
   <processReturn soapenc:arrayType="xsd:string[2]" 
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"; xmlns="">
    <item>FOO</item>
    <item>FOO</item>
   </processReturn>
  </processResponse>
 </soapenv:Body>
</soapenv:Envelope>

If I change my schema to just make response contain a simpleType = xsd:string (and my 
method signature), I have no issues whatsoever.  Is there a serializer available in 
the Axis distribution to appropriately serialize arrays outside of soap encoding 
rules?  I would expect to see it seriously much like it currently is with I would 
expect at the very least the "xmlns" attribute to be dropped?

Thanks for any input,
Cory

Reply via email to