Phil Mueller created AXIS2-5802:
-----------------------------------
Summary: ADBException on parsing valid response
Key: AXIS2-5802
URL: https://issues.apache.org/jira/browse/AXIS2-5802
Project: Axis2
Issue Type: Bug
Components: adb
Affects Versions: 1.7.2
Reporter: Phil Mueller
With classes generated with 1.7.2 i get the following error:
{code}
org.apache.axis2.databinding.ADBException: Required attribute Id is missing
at
ise.device.fms.rescuetrack.gen.TrackingObject$Factory.parse(TrackingObject.java:822)
{code}
when Axis tries to parse the valid (validation in SoapUI) response of the
GetObjectsList-Operation:
{code}
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<GetObjectsListResponse xmlns="http://www.rescuetrack.de/">
<GetObjectsListResult>
<Objects>
<TrackingObject Id="10561" Name="Test" ShortName="Test"
Icon="fw">
<Telemetry />
<Attributes />
</TrackingObject>
</Objects>
<Error>
<ErrorNumber>0</ErrorNumber>
<ErrorString>No Error</ErrorString>
</Error>
</GetObjectsListResult>
</GetObjectsListResponse>
</soap:Body>
</soap:Envelope>
{code}
Generated client code from Axis 1.6.1 parses the response successful.
Generated Code-part from TrackingObject in 1.7.2:
{code}
// handle attribute "Id"
java.lang.String tempAttribId =
reader.getAttributeValue("http://www.rescuetrack.de/", "Id");
if (tempAttribId != null)
{
java.lang.String content = tempAttribId;
object.setId(org.apache.axis2.databinding.utils.ConverterUtil
.convertToInt(tempAttribId));
}
else
{
throw new org.apache.axis2.databinding.ADBException(
"Required attribute Id is missing");
}
handledAttributes.add("Id");
{code}
Generated Code-part from TrackingObject in 1.6.1:
{code}
// handle attribute "Id"
java.lang.String tempAttribId = reader.getAttributeValue(null, "Id");
if (tempAttribId != null)
{
java.lang.String content = tempAttribId;
object.setId(org.apache.axis2.databinding.utils.ConverterUtil
.convertToInt(tempAttribId));
}
else
{
throw new org.apache.axis2.databinding.ADBException(
"Required attribute Id is missing");
}
handledAttributes.add("Id");
{code}
The first argument of getAttributeValue is different ..
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]