axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dies Koper (JIRA)" <>
Subject [jira] Commented: (AXIS-2280) Array elements of derived (XSD extension type) are not serialized correctly
Date Sat, 21 Jan 2006 14:03:42 GMT
    [ ] 

Dies Koper commented on AXIS-2280:

I have reproduced this problem in my environment and would like to note something that I think
is rather important to this issue.

Base class: Data (field: String name)
Subclass: MoreData (field: int size)
method parameter: Data[]

client test 1 (OK):
creates Data array with "new Data{xx}" passing Data instance
SOAP message shows data field; impl receives data instance

client test 2 (NG<- point of this Bug):
creates Data array with "new Data{xx}" passing MoreData instance
SOAP message shows data field, no size field; impl receives Data instance

client test 3 ((almost)OK<- I added as missing link):
creates MoreData array with "new MoreData{xx}" passing MoreData instance
SOAP message shows data and size fields; impl receives MoreData instance
BUT: the array containing the MoreData instance is of type Data[], not MoreData[], so returning
this to the client gives the same problem as in test 2 again.

=> I assume Axis serializer checks instance of the array, not of its elements, and assumes
all elements would be of the same type. Also, should the deserializer create the array (not
just the elements) using the same type as the elements, not the base type?

See client test 3: use the same (sub)type for the array reference as the elements you want
to transmit.
#What if you have elements of different subclasses of the base class? Hmm..

[Relevant parts of SOAP requests]
test 1:
<data xmlns="">

test 2:
<data xmlns="">

<data xsi:type="ns1:MoreData" xmlns="" xmlns:ns1="urn:arrayExtensionTest">
  <name xsi:type="xsd:string">moreData</name>
  <size xsi:type="xsd:int">11</size>

> Array elements of derived (XSD extension type) are not serialized correctly
> ---------------------------------------------------------------------------
>          Key: AXIS-2280
>          URL:
>      Project: Apache Axis
>         Type: Bug
>   Components: Serialization/Deserialization
>     Versions: 1.3
>     Reporter: Peter Canning
>     Priority: Blocker
>  Attachments: arrayExtensionTest.wsdl,,
> This is a regression from Axis (Java) 1.2.1.
> If an operation take a parameter whose type is an array (maxOccurs="unbounded") of a
base type, and the client passes an array containing a value whose type is derived (an XSD
extension) from the base type, the value is serialized as the base type, and the additional
elements in the derived type are omitted.  In addtion the element  for the value is missing
the expected xsi:type attribute.
> I will attach an example to demonstate the problem.

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