TypeDesc.getFieldNameForAttribute partial match should account for multiRef
attributes
--------------------------------------------------------------------------------------
Key: AXIS-2053
URL: http://issues.apache.org/jira/browse/AXIS-2053
Project: Apache Axis
Type: Bug
Components: Serialization/Deserialization
Versions: 1.2RC2
Environment: n/a
Reporter: Mark Ford
The BeanDeserializer uses TypeDesc.getFieldNameForAttribute(QName) to
deserialize attributes for the bean. The code in TypeDesc looks for an exact
match on the attribute QName but failing that it falls back to find a partial
match based on the local name only. Given the following element, it's possible
for the deserializer to match the "id" attribute incorrectly:
<multiRef id="id0" ns1:id="SomeValue">TextValue</multiRef>
Given the above, the BeanDeserializer will feed the first id attribute into
TypeDesc.getFieldNameForAttribute(QName) as new QName("", "id") and it will
match against the field name for the namespace qualified id value.
The workaround is to not have an attribute named "id", regardless of whether it
is namespace qualified. The fix would be to add "id" as an exception to the
partial match since it's a well known attribute from the SOAP Encoding rules OR
to make this partial match routine optional.
--
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