You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Sergio Bossa (JIRA)" <ax...@ws.apache.org> on 2005/04/28 16:26:28 UTC

[jira] Created: (AXIS-1965) org.xml.sax.SAXException when trying to deserialize an array with Axis 1.2RC3

org.xml.sax.SAXException when trying to deserialize an array with Axis 1.2RC3 
------------------------------------------------------------------------------

         Key: AXIS-1965
         URL: http://issues.apache.org/jira/browse/AXIS-1965
     Project: Axis
        Type: Bug
  Components: Serialization/Deserialization  
    Versions: current (nightly), 1.2RC3    
 Environment: Linux
Apache Tomcat 5.0.x
    Reporter: Sergio Bossa
    Priority: Blocker


My web services are in doc/literal wrapped style, and they worked fine prior to RC3 version.

I have a method that accepts four parameters, two strings and two arrays of Strings, and here is how it's described in the service WSDL:

<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>

Now, when I call the method dynamically with Axis APIs, 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.

This is the SOAP request message, generated when I called the method above, passing the two strings, the first array as null and the second array with two elements:

<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>

This happens also with other methods accepting other parameters and only one array, and so on.

Hope someone could help.

Regards,

Sergio B.

-- 
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


[jira] Commented: (AXIS-1965) org.xml.sax.SAXException when trying to deserialize an array with Axis 1.2RC3

Posted by "Davanum Srinivas (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1965?page=comments#action_64152 ]
     
Davanum Srinivas commented on AXIS-1965:
----------------------------------------

Please try the nightly build / cvs and let me know if you still see the problem. Also check if the WSDL2Java generated code works fine. If it does, then browse the WSDL2Java generated code and do *EXACTLY* what is being done there by hand.

thanks,
dims

> org.xml.sax.SAXException when trying to deserialize an array with Axis 1.2RC3
> -----------------------------------------------------------------------------
>
>          Key: AXIS-1965
>          URL: http://issues.apache.org/jira/browse/AXIS-1965
>      Project: Axis
>         Type: Bug
>   Components: Serialization/Deserialization
>     Versions: current (nightly), 1.2RC3
>  Environment: Linux
> Apache Tomcat 5.0.x
>     Reporter: Sergio Bossa
>  Attachments: LocalXQueryService.wsdl
>
> My web services are in doc/literal wrapped style, and they worked fine prior to RC3 version.
> I have a method that accepts four parameters, two strings and two arrays of Strings, and here is how it's described in the service WSDL:
> <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>
> Now, when I call the method dynamically with Axis APIs, 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.
> This is the SOAP request message, generated when I called the method above, passing the two strings, the first array as null and the second array with two elements:
> <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>
> This happens also with other methods accepting other parameters and only one array, and so on.
> Hope someone could help.
> Regards,
> Sergio B.

-- 
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


[jira] Updated: (AXIS-1965) org.xml.sax.SAXException when trying to deserialize an array with Axis 1.2RC3

Posted by "Sergio Bossa (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1965?page=all ]

Sergio Bossa updated AXIS-1965:
-------------------------------

    Attachment: LocalXQueryService.wsdl

> org.xml.sax.SAXException when trying to deserialize an array with Axis 1.2RC3
> -----------------------------------------------------------------------------
>
>          Key: AXIS-1965
>          URL: http://issues.apache.org/jira/browse/AXIS-1965
>      Project: Axis
>         Type: Bug
>   Components: Serialization/Deserialization
>     Versions: current (nightly), 1.2RC3
>  Environment: Linux
> Apache Tomcat 5.0.x
>     Reporter: Sergio Bossa
>  Attachments: LocalXQueryService.wsdl
>
> My web services are in doc/literal wrapped style, and they worked fine prior to RC3 version.
> I have a method that accepts four parameters, two strings and two arrays of Strings, and here is how it's described in the service WSDL:
> <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>
> Now, when I call the method dynamically with Axis APIs, 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.
> This is the SOAP request message, generated when I called the method above, passing the two strings, the first array as null and the second array with two elements:
> <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>
> This happens also with other methods accepting other parameters and only one array, and so on.
> Hope someone could help.
> Regards,
> Sergio B.

-- 
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


[jira] Resolved: (AXIS-1965) org.xml.sax.SAXException when trying to deserialize an array with Axis 1.2RC3

Posted by "Davanum Srinivas (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1965?page=all ]
     
Davanum Srinivas resolved AXIS-1965:
------------------------------------

    Resolution: Fixed

Closing the bug as fixed :) when i doubt, check the wsdl2java generated sources. (lots of reasons for the changes :)

-- dims

> org.xml.sax.SAXException when trying to deserialize an array with Axis 1.2RC3
> -----------------------------------------------------------------------------
>
>          Key: AXIS-1965
>          URL: http://issues.apache.org/jira/browse/AXIS-1965
>      Project: Axis
>         Type: Bug
>   Components: Serialization/Deserialization
>     Versions: current (nightly), 1.2RC3
>  Environment: Linux
> Apache Tomcat 5.0.x
>     Reporter: Sergio Bossa
>  Attachments: LocalXQueryService.wsdl
>
> My web services are in doc/literal wrapped style, and they worked fine prior to RC3 version.
> I have a method that accepts four parameters, two strings and two arrays of Strings, and here is how it's described in the service WSDL:
> <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>
> Now, when I call the method dynamically with Axis APIs, 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.
> This is the SOAP request message, generated when I called the method above, passing the two strings, the first array as null and the second array with two elements:
> <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>
> This happens also with other methods accepting other parameters and only one array, and so on.
> Hope someone could help.
> Regards,
> Sergio B.

-- 
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


[jira] Updated: (AXIS-1965) org.xml.sax.SAXException when trying to deserialize an array with Axis 1.2RC3

Posted by "Davanum Srinivas (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1965?page=all ]

Davanum Srinivas updated AXIS-1965:
-----------------------------------

    Priority: Major  (was: Blocker)

Please upload the complete WSDL. Am downgrading this till there is a way to reproduce the problem.

thanks,
dims

> org.xml.sax.SAXException when trying to deserialize an array with Axis 1.2RC3
> -----------------------------------------------------------------------------
>
>          Key: AXIS-1965
>          URL: http://issues.apache.org/jira/browse/AXIS-1965
>      Project: Axis
>         Type: Bug
>   Components: Serialization/Deserialization
>     Versions: current (nightly), 1.2RC3
>  Environment: Linux
> Apache Tomcat 5.0.x
>     Reporter: Sergio Bossa

>
> My web services are in doc/literal wrapped style, and they worked fine prior to RC3 version.
> I have a method that accepts four parameters, two strings and two arrays of Strings, and here is how it's described in the service WSDL:
> <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>
> Now, when I call the method dynamically with Axis APIs, 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.
> This is the SOAP request message, generated when I called the method above, passing the two strings, the first array as null and the second array with two elements:
> <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>
> This happens also with other methods accepting other parameters and only one array, and so on.
> Hope someone could help.
> Regards,
> Sergio B.

-- 
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


[jira] Commented: (AXIS-1965) org.xml.sax.SAXException when trying to deserialize an array with Axis 1.2RC3

Posted by "Jason Williams (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS-1965?page=comments#action_12355872 ] 

Jason Williams commented on AXIS-1965:
--------------------------------------

There seem to be several serialization related errors that are not easily reproduceable, and are closed without any true fix.  Is this being investigated to determine if it is related to WSDL2Java emitted classes or a bug with the core Axis code?

> org.xml.sax.SAXException when trying to deserialize an array with Axis 1.2RC3
> -----------------------------------------------------------------------------
>
>          Key: AXIS-1965
>          URL: http://issues.apache.org/jira/browse/AXIS-1965
>      Project: Apache Axis
>         Type: Bug
>   Components: Serialization/Deserialization
>     Versions: current (nightly), 1.2RC3
>  Environment: Linux
> Apache Tomcat 5.0.x
>     Reporter: Sergio Bossa
>  Attachments: LocalXQueryService.wsdl
>
> My web services are in doc/literal wrapped style, and they worked fine prior to RC3 version.
> I have a method that accepts four parameters, two strings and two arrays of Strings, and here is how it's described in the service WSDL:
> <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>
> Now, when I call the method dynamically with Axis APIs, 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.
> This is the SOAP request message, generated when I called the method above, passing the two strings, the first array as null and the second array with two elements:
> <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>
> This happens also with other methods accepting other parameters and only one array, and so on.
> Hope someone could help.
> Regards,
> Sergio B.

-- 
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


[jira] Commented: (AXIS-1965) org.xml.sax.SAXException when trying to deserialize an array with Axis 1.2RC3

Posted by "Sergio Bossa (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1965?page=comments#action_64146 ]
     
Sergio Bossa commented on AXIS-1965:
------------------------------------

I'm uploading the complete WSDL.
To reproduce the bug, just make a call to the method using the Call interface, passing some arrays.
If you leave null the array parameters, the method works.

Regards,

Sergio B.

> org.xml.sax.SAXException when trying to deserialize an array with Axis 1.2RC3
> -----------------------------------------------------------------------------
>
>          Key: AXIS-1965
>          URL: http://issues.apache.org/jira/browse/AXIS-1965
>      Project: Axis
>         Type: Bug
>   Components: Serialization/Deserialization
>     Versions: current (nightly), 1.2RC3
>  Environment: Linux
> Apache Tomcat 5.0.x
>     Reporter: Sergio Bossa
>  Attachments: LocalXQueryService.wsdl
>
> My web services are in doc/literal wrapped style, and they worked fine prior to RC3 version.
> I have a method that accepts four parameters, two strings and two arrays of Strings, and here is how it's described in the service WSDL:
> <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>
> Now, when I call the method dynamically with Axis APIs, 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.
> This is the SOAP request message, generated when I called the method above, passing the two strings, the first array as null and the second array with two elements:
> <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>
> This happens also with other methods accepting other parameters and only one array, and so on.
> Hope someone could help.
> Regards,
> Sergio B.

-- 
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


[jira] Commented: (AXIS-1965) org.xml.sax.SAXException when trying to deserialize an array with Axis 1.2RC3

Posted by "Sergio Bossa (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1965?page=comments#action_64166 ]
     
Sergio Bossa commented on AXIS-1965:
------------------------------------

I've tried the latest nightly build and also the official RC3 build, generating the code with WSDL2Java, and ... the client works!
So, browsing the stubs code, I've found that now I must specify more information about input parameters, using the Call addParameter() method!
This solved the problem with both versions ....
Now, a question: why wasn't this necessary with RC2?

> org.xml.sax.SAXException when trying to deserialize an array with Axis 1.2RC3
> -----------------------------------------------------------------------------
>
>          Key: AXIS-1965
>          URL: http://issues.apache.org/jira/browse/AXIS-1965
>      Project: Axis
>         Type: Bug
>   Components: Serialization/Deserialization
>     Versions: current (nightly), 1.2RC3
>  Environment: Linux
> Apache Tomcat 5.0.x
>     Reporter: Sergio Bossa
>  Attachments: LocalXQueryService.wsdl
>
> My web services are in doc/literal wrapped style, and they worked fine prior to RC3 version.
> I have a method that accepts four parameters, two strings and two arrays of Strings, and here is how it's described in the service WSDL:
> <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>
> Now, when I call the method dynamically with Axis APIs, 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.
> This is the SOAP request message, generated when I called the method above, passing the two strings, the first array as null and the second array with two elements:
> <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>
> This happens also with other methods accepting other parameters and only one array, and so on.
> Hope someone could help.
> Regards,
> Sergio B.

-- 
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