SAXParserException while trying to send a SOAP request containing an array of 
elements
--------------------------------------------------------------------------------------

         Key: AXIS-2348
         URL: http://issues.apache.org/jira/browse/AXIS-2348
     Project: Apache Axis
        Type: Bug
  Components: Serialization/Deserialization  
    Versions: 1.2.1, 1.3    
 Environment: Windows XP, Websphere Studio Application Developer 5.1.1
    Reporter: Juan Jesús García Jiménez


I have created an axis 1.3 web service using wrapped/literal style.
I generated server and client stubs whith axis-wsdl2java and axis-java2wsdl, 
and specified some typeMappings.
I obtain the wsdl dinamically by deploying the wsdd file.

Here is a portion of my wsdl file:

 <complexType name="Module">
    <sequence>
     <element name="bkideId" nillable="true" type="xsd:string"/>
     <element name="dependencies" nillable="true" type="impl:ArrayOfModule"/>
     <element name="deployedApplications" nillable="true" 
type="impl:ArrayOfDeployedApplication"/>
     <element name="fechaCreacion" nillable="true" type="xsd:dateTime"/>
     <element name="fechaModificacion" nillable="true" type="xsd:dateTime"/>
     <element name="id" type="xsd:long"/>
     <element name="name" nillable="true" type="xsd:string"/>
     <element name="uri" nillable="true" type="xsd:string"/>
     <element name="usuarioCreacion" nillable="true" type="xsd:string"/>
     <element name="usuarioModificacion" nillable="true" type="xsd:string"/>
    </sequence>
   </complexType>
   <complexType name="ArrayOfModule">
    <sequence>
     <element maxOccurs="unbounded" minOccurs="0" name="item" 
type="impl:Module"/>
    </sequence>
   </complexType>
   <complexType name="DeployedApplication">
    <sequence>
     <element name="application" nillable="true" type="impl:Application"/>
     <element name="applicationServer" nillable="true" 
type="impl:ApplicationServer"/>
     <element name="environment" nillable="true" type="impl:Environment"/>
     <element name="estado" nillable="true" type="xsd:string"/>
     <element name="fechaCreacion" nillable="true" type="xsd:dateTime"/>
     <element name="fechaModificacion" nillable="true" type="xsd:dateTime"/>
     <element name="id" nillable="true" type="impl:DeployedAppCompositeId"/>
     <element name="modules" nillable="true" type="impl:ArrayOfModule"/>
     <element name="usuarioCreacion" nillable="true" type="xsd:string"/>
     <element name="usuarioModificacion" nillable="true" type="xsd:string"/>
    </sequence>
   </complexType>
 <complexType name="ArrayOfDeployedApplication">
    <sequence>
     <element maxOccurs="unbounded" minOccurs="0" name="item" 
type="impl:DeployedApplication"/>
    </sequence>
   </complexType>

The problem occurs when I try to sent a SOAP request containing an array of 
elements:
(I send an object Module containing an array of DeployedApplication)
The array elements are included in the soap request message as an "item" 
element, and this produce a SAXParserException. when trying to deserialize on 
the server side.

org.xml.sax.SAXException: Invalid element in 
com.bankinter.mga.model.sdo.DeployedApplication - item

If I query for this object, the server returns the element in a different soap 
element form. (Server side doesn't produce any "item" element.)
Why the same instance of  Module has different appearence in SOAP request and 
response Message?

Where is the problem? On client or server side?

Is this a  bug? If not, please could someone tell me what i did wrong?
I was working some days on this whithout success.
Thanks a lot. And sorry for my english.


These are the SOAP request and response messages:

Here is the request:

<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>
    <instalarModulo xmlns="http://core.mga.bankinter.com";>
      <modulo xsi:type="ns1:Ejb" xmlns:ns1="http://core.mga.bankinter.com";>
        <bkideId xsi:type="xsd:string" xsi:nil="true"/>
        <dependencies xsi:type="ns1:Module" xsi:nil="true"/>
        <deployedApplications xsi:type="ns1:DeployedApplication">
          <item xsi:type="ns1:DeployedApplication">                             
                       At this point SAXParser throwsan Exception
            <application xsi:type="ns1:Application" xsi:nil="true"/>
            <applicationServer xsi:type="ns1:ApplicationServer" xsi:nil="true"/>
            <environment xsi:type="ns1:Environment" xsi:nil="true"/>
            <estado xsi:type="xsd:string">creada</estado>
            <fechaCreacion 
xsi:type="xsd:dateTime">2005-11-28T16:52:11.087Z</fechaCreacion>
            <fechaModificacion xsi:type="xsd:dateTime" xsi:nil="true"/>
            <id xsi:type="ns1:DeployedAppCompositeId" xsi:nil="true"/>
            
              .........
             ...........

Here, the response of querying the same object:

<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>
    <consultaModuloResponse xmlns="http://core.mga.bankinter.com";>
      <consultaModuloReturn xsi:type="ns1:Ejb" 
xmlns:ns1="http://core.mga.bankinter.com";>
        <bkideId xsi:type="xsd:string" xsi:nil="true"/>
        <dependencies xsi:type="ns1:ArrayOfModule" xsi:nil="true"/>
        <deployedApplications xsi:type="ns1:ArrayOfDeployedApplication">
          <deployedApplications xsi:type="ns1:DeployedApplication">
            <application xsi:type="ns1:Application" xsi:nil="true"/>
            <applicationServer xsi:type="ns1:ApplicationServer" xsi:nil="true"/>
            <environment xsi:type="ns1:Environment" xsi:nil="true"/>
            <estado xsi:type="xsd:string">creada</estado>
            <fechaCreacion 
xsi:type="xsd:dateTime">2005-11-28T16:52:11.087Z</fechaCreacion>
            <fechaModificacion xsi:type="xsd:dateTime" xsi:nil="true"/>
            <id xsi:type="ns1:DeployedAppCompositeId" xsi:nil="true"/>
            <modules xsi:type="ns1:ArrayOfModule">
              <modules xsi:type="ns1:Module" xsi:nil="true"/>
              <modules xsi:type="ns1:Module" xsi:nil="true"/>
          ...........
           ..........





-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to