You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Gupta, Ankit" <an...@informatica.com> on 2003/09/26 10:47:41 UTC

Axis using wrong encoding for array in Doc/literal

Hi everyone,

I am using an axis webservice (wrapped/literal) return a bean(object) containing an array 
of integers. 

This service works fine with Axis client but when I try to use this service using .Net client,  I get the following error:


-------
"message=(0x04a772d0) "There is an error in XML document (8, 7)."
 "innerException=(0x04a72918) <System.Xml.XmlException>"
-------

I think this error is due to the fact that Axis uses * soapenc:arrayType * in the Soap response to encode the array, which is not correct in a doc/literal web service

The response from the axis service is as follows:

-------------------------

<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>
  <returnarrResponse xmlns="http://DefaultNamespace">
   <returnarrReturn>
    <a>6</a>
    <myArr soapenc:arrayType="xsd:int[3]" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
     <item xmlns="">1</item>
     <item xmlns="">2</item>
     <item xmlns="">3</item>
    </myArr>
   </returnarrReturn>
  </returnarrResponse>
 </soapenv:Body>
</soapenv:Envelope>
--------------------------
Any help will be greatly appreciated.

Thanks,
Ankit Gupta