Description
With classes generated with 1.7.2 i get the following error:
org.apache.axis2.databinding.ADBException: Required attribute Id is missing at ise.device.fms.rescuetrack.gen.TrackingObject$Factory.parse(TrackingObject.java:822)
when Axis tries to parse the valid (validation in SoapUI) response of the GetObjectsList-Operation:
<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>
Generated client code from Axis 1.6.1 parses the response successful.
Generated Code-part from TrackingObject in 1.7.2:
// 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");
Generated Code-part from TrackingObject in 1.6.1:
// 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");
The first argument of getAttributeValue is different ..
Attachments
Attachments
Issue Links
- duplicates
-
AXIS2-5799 Axis2 xsd2java - namespace prefix added to inherited attributes
- Resolved