axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergio Bossa <sergio.bo...@gmail.com>
Subject Axis 1.2 RC3 and array deserialization problem
Date Wed, 27 Apr 2005 14:57:27 GMT
Hi all!

First of all, my web services use doc/literal wrapped style.
When I try to send a simple array of strings with Axis 1.2RC3, I get
the following exception:

org.xml.sax.SAXException: SimpleDeserializer encountered a child
element, which is NOT expected, in something it was trying to
deserialize.

If I do not send the array (leaving the parameter null), all works well.
This is a code snippet of the request SOAP envelope generated by Axis 1.2RC3:

<soapenv:Body>
<query xmlns="http://montag.sourceforge.net/ns/wsdl/local">
<arg0 xsi:type="xsd:string">/resources</arg0>
<arg1 xsi:type="xsd:string">&lt;test&gt; { //resource[@timestamp=$ts]
} &lt;/test&gt;</arg1>
<arg2 xsi:nil="true"/>
<arg3>
<item xsi:type="xsd:string" xmlns="">ts</item>
<item xsi:type="xsd:string" xmlns="">1113390437052</item>
</arg3>
</query>
</soapenv:Body>

Moreover, if I use Axis 1.2RC2, everything works, the array works
well, but the SOAP envelope slightly changes:

<arg3 xsi:type="soapenc:Array"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<item xsi:type="xsd:string" xmlns="">ts</item>
<item xsi:type="xsd:string" xmlns="">1113390437052</item>
</arg3>

I cannot understand this Axis problem.
Here is the service WSDL:

<?xml version="1.0" encoding="UTF-8"?>

<wsdl:definitions 
	targetNamespace="http://montag.sourceforge.net/ns/wsdl/local" 
	xmlns:tns="http://montag.sourceforge.net/ns/wsdl/local" 
	xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
	xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
	xmlns:xsd="http://www.w3.org/2001/XMLSchema">

	
	
<wsdl:types>

  <schema elementFormDefault="qualified"
xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://montag.sourceforge.net/ns/wsdl/local">

   <element name="query">
    <complexType>
     <sequence>
      <element name="collection" type="xsd:string"/>
      <element name="query" type="xsd:string"/>
      <element minOccurs="0" maxOccurs="unbounded" name="namespaces"
type="xsd:string"/>
      <element minOccurs="0" maxOccurs="unbounded" name="vars"
type="xsd:string"/>
     </sequence>
    </complexType>
   </element>
   
   <element name="queryResponse">
    <complexType>
     <sequence>
      <element name="queryReturn" type="xsd:string"/>
     </sequence>
    </complexType>
   </element>

   <element name="MontagSOAPFault">
   <complexType>
    <sequence/>
   </complexType>
   </element>
  
   <element name="soapHeader">
   <complexType>
    <sequence>
     <element name="username" type="xsd:string"/>
     <element name="password" type="xsd:string"/>    
    </sequence>
   </complexType>
   </element>
   
  </schema>

</wsdl:types>



   <wsdl:message name="queryRequest">

      <wsdl:part element="tns:query" name="parameters"/>

   </wsdl:message>
   
   <wsdl:message name="queryResponse">

      <wsdl:part element="tns:queryResponse" name="parameters"/>

   </wsdl:message>
   
   <wsdl:message name="montagHeader">

      <wsdl:part element="tns:soapHeader" name="header"/>

   </wsdl:message>

   <wsdl:message name="MontagSOAPFault">

      <wsdl:part element="tns:MontagSOAPFault" name="fault"/>

   </wsdl:message>
   
   

   <wsdl:portType name="XQueryService">

      <wsdl:operation name="query">

         <wsdl:input message="tns:queryRequest" name="queryRequest"/>

         <wsdl:output message="tns:queryResponse" name="queryResponse"/>

         <wsdl:fault message="tns:MontagSOAPFault" name="MontagSOAPFault"/>

      </wsdl:operation>

   </wsdl:portType>
   
   

   <wsdl:binding name="XQueryServiceSoapBinding" type="tns:XQueryService">

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

      <wsdl:operation name="query">

         <wsdlsoap:operation soapAction=""/>

         <wsdl:input name="queryRequest">

            <wsdlsoap:body use="literal"/>

            <wsdlsoap:header message="tns:montagHeader" part="header"
use="literal"/>

         </wsdl:input>

         <wsdl:output name="queryResponse">

            <wsdlsoap:body use="literal"/>

         </wsdl:output>

         <wsdl:fault name="MontagSOAPFault">

            <wsdlsoap:fault name="MontagSOAPFault" use="literal"/>

         </wsdl:fault>

      </wsdl:operation>

   </wsdl:binding>
   
   

   <wsdl:service name="XQueryServiceService">

      <wsdl:port binding="tns:XQueryServiceSoapBinding" name="XQueryService">

         <wsdlsoap:address
location="http://localhost:8084/montag/services/XQueryService"/>

      </wsdl:port>

   </wsdl:service>
   
</wsdl:definitions>

Hope someone could help.

Regards,

Sergio B.

-- 
Sergio Bossa
Author and Developer of:
- Montag, Web Services System for XML Database Interaction:
  http://montag.sourceforge.net
- QuickNote:
  http://quicknote.sourceforge.net

Mime
View raw message