axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jared Betteridge <>
Subject serialization problem in axis 1.3 with bean that includes an array of strings
Date Mon, 27 Feb 2006 00:22:47 GMT

I'm using the axis 1.3 java2wsdl tool (with -y WRAPPED) to create a wsdl
from an existing java class which has a method that returns a bean
object that contains an array of strings. My client is written in gsoap
(2.7.6e), and the problem I am having is that my gsoap client is unable
to deserialize the array inside the returned bean object.  The reason is
that the name of the XML elements for the strings inside the array do
not match what the WSDL specifies.

Here is a snippet from my wsdl showing the response to an "orderMeal"
method that returns a Meal bean object containing an array of strings:

   <element name="orderMealResponse">
      <element name="orderMealReturn" type="impl:Meal"/>

   <complexType name="Meal">
     <element name="appetizers" nillable="true"
     <element name="mainCourse" nillable="true" type="xsd:string"/>

   <complexType name="ArrayOf_xsd_string">
     <element maxOccurs="unbounded" minOccurs="0" name="item"

The body of an actual SOAP response that my gsoap client receives is:

  <orderMealResponse xmlns="urn:Tarray">

My gsoap client does not like the fact that the name of the XML element
for the string array members is "appetizers".  According to the WSDL
these array members should be named "item".  If I intercept the SOAP
response using WebScarab and change the array part of the response to  be:


then my gsoap client is happy and everything works.  So why isn't axis
naming these array elements "item" as specified in the WSDL?  Is this a
bug in axis? How can I get my gsoap client to work with this axis web



View raw message