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

SOAP Fault Detail element cannot have more than one child

    XMLWordPrintableJSON

Details

    Description

      The source code of axis2 1.5.x has a problem in AxisFault.java (located in org.apache.axis2.AxisFault.java): the Detail element of the SOAP Fault can only have one child. It can cause a problem when, for example, a MessageNumberRollover fault is generated in a Web Service, because as stated in WS Reliable Messaging profile, the Detail element must include two childs, a "wsrm:Identifier" and a "wsrn:MaxMsgNumber" element.

      The code where it is considered, marked as "TODO" issue, is the following:

      private void initializeValues(SOAPFaultCode soapFaultCode,
      SOAPFaultReason soapFaultReason,
      SOAPFaultNode soapFaultNode,
      SOAPFaultRole soapFaultRole,
      SOAPFaultDetail soapFaultDetail) {
      this.soapFaultCode = soapFaultCode;
      this.soapFaultReason = soapFaultReason;
      this.soapFaultNode = soapFaultNode;
      this.soapFaultRole = soapFaultRole;
      this.soapFaultDetail = soapFaultDetail;

      if (soapFaultDetail != null) {
      // OMElement exceptionElement = soapFaultDetail.getFirstChildWithName(
      // new QName(SOAPConstants.SOAP_FAULT_DETAIL_EXCEPTION_ENTRY));
      // if (exceptionElement != null && exceptionElement.getText() != null)

      { // cause = new Exception(exceptionElement.getText()); // }

      // TODO - Wha? Details can have multiple elements, why take the first child here?
      // TODO - Review the API for details
      // setting the first child element of the fault detail as this.detail
      this.detail = soapFaultDetail.getFirstElement();

      }

      Attachments

        Activity

          People

            veithen Andreas Veithen
            franvila Francisco Vila
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: