axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Sanne (JIRA)" <>
Subject [jira] Created: (AXIS-2095) Items in an array seems to have the wrong name compared to what the WSDL says.
Date Thu, 30 Jun 2005 12:49:57 GMT
Items in an array seems to have the wrong name compared to what the WSDL says.

         Key: AXIS-2095
     Project: Apache Axis
        Type: Bug
    Versions: 1.2.1    
    Reporter: Ted Sanne

My WSDL describes an array (this is only a small fragment of the complete WSDL):

<complexType name="PropertyValueDTO">
<element name="URI" type="xsd:boolean"/>
<element name="dateTime" type="xsd:boolean"/>
<element name="hasHistory" type="xsd:boolean"/>
<element name="id" nillable="true" type="xsd:string"/>
<element name="label" nillable="true" type="xsd:string"/>
<element name="source" nillable="true" type="xsd:string"/>
<element name="timestamp" nillable="true" type="xsd:dateTime"/>
<element name="unit" nillable="true" type="xsd:string"/>
<element name="updated" nillable="true" type="xsd:dateTime"/>
<element name="value" nillable="true" type="xsd:string"/>

<complexType name="ArrayOfPropertyValueDTO">
             <element maxOccurs="unbounded" minOccurs="0" name="item" type="impl:PropertyValueDTO"/>

<complexType abstract="true" name="TraceableDetailsDTO">
   <element name="hasExternalLinks" type="xsd:boolean"/>
   <element name="label" nillable="true" type="xsd:string"/>
   <element name="properties" nillable="true" type="impl:ArrayOfPropertyValueDTO"/>

When calling the webservice the return looks like this:

and the client throws the following:
org.xml.sax.SAXException: Invalid element in com.tracetracker.enterprise.twa.ArrayOfPropertyValueDTO
- properties
	at org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(
	at org.apache.axis.encoding.DeserializationContext.startElement(
	at org.apache.axis.message.SAX2EventRecorder.replay(
	at org.apache.axis.message.MessageElement.publishToHandler(

It seems the client expects a structure like this:

Having a go at debugging the ArraySerializer I can see in my debugger that both itemQName
and componentQName is null, so elementName is never changed from "properties" to "item":

// For the maxOccurs case, each item is named with the QName

// we got in the arguments.  For normal array case, we write an element with

// that QName, and then serialize each item as <item>

QName elementName = name;

Attributes serializeAttr = attributes;

if (!maxOccursUsage) {

      serializeAttr = null;  // since we are putting them here

      context.startElement(name, attributes);

      if (itemQName != null)

             elementName = itemQName;

      else if(componentQName != null)

              elementName = componentQName;


Can anyone tell me what has gone wrong here?

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message