Uploaded image for project: 'Axis2'
  1. Axis2
  2. AXIS2-5802

ADBException on parsing valid response

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.7.2
    • Fix Version/s: 1.7.4
    • Component/s: adb
    • Labels:
      None

      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

        1. RescueTrackConnectorV4.wsdl
          51 kB
          Phil Mueller

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                ise-mueller Phil Mueller
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: