Axis
  1. Axis
  2. AXIS-2614

soap:fault element not recognized for soap 1.2 binding

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.4
    • Fix Version/s: None
    • Component/s: WSDL processing
    • Labels:
      None
    • Environment:
      JDK 1.4.2
      Windows XP

      Description

      When you have a soap 1.2 binding with soap fault, the fault element is not correctly extracted, resulting in error

      ERROR: Missing <soap:fault> element inFault "..." in operation "...", in binding ...

      This is caused by the missing statement that sets the local variable foundSOAPFault in the faultsFromSOAPFault method of the org.apache.axis.wsdl.symbolTable.SymbolTable class.

      In particular, the current 1.4 code shows:

      if (obj instanceof SOAPFault)

      { foundSOAPFault = true; soapFaultUse = ((SOAPFault) obj).getUse(); soapFaultNamespace = ((SOAPFault) obj).getNamespaceURI(); break; }

      else if (obj instanceof UnknownExtensibilityElement) {

      // TODO: After WSDL4J supports soap12, change this code
      UnknownExtensibilityElement unkElement =
      (UnknownExtensibilityElement) obj;
      QName name =
      unkElement.getElementType();

      if (name.getNamespaceURI().equals(Constants.URI_WSDL12_SOAP)
      && name.getLocalPart().equals("fault")) {
      if (unkElement.getElement().getAttribute("use")
      != null)

      { soapFaultUse = unkElement.getElement().getAttribute("use"); }

      if (unkElement.getElement().getAttribute("namespace")
      != null) { soapFaultNamespace = unkElement.getElement().getAttribute( "namespace"); }
      }
      }
      }

      // Check to make sure we have a soap:fault element
      if (!foundSOAPFault) { throw new IOException( Messages.getMessage( "missingSoapFault00", faultName, bindOp.getName(), binding.getQName().toString())); }

      Note that variable foundSOAPFault is not set for the SOAP 1.2 binding. This causes a WSDL with soap fault to throw an missingSoapFault00 exception.

      Adding the statement foundSOAPFault = true, as shown below, will fix this problem.
      ...
      } else if (obj instanceof UnknownExtensibilityElement) {

      // TODO: After WSDL4J supports soap12, change this code
      UnknownExtensibilityElement unkElement =
      (UnknownExtensibilityElement) obj;
      QName name =
      unkElement.getElementType();

      if (name.getNamespaceURI().equals(Constants.URI_WSDL12_SOAP)
      && name.getLocalPart().equals("fault")) {
      foundSOAPFault = true;
      if (unkElement.getElement().getAttribute("use")
      != null) { soapFaultUse = unkElement.getElement().getAttribute("use"); }

      if (unkElement.getElement().getAttribute("namespace")
      != null)

      { soapFaultNamespace = unkElement.getElement().getAttribute( "namespace"); }

      }
      }
      ...

      1. test.wsdl
        3 kB
        Aki Yoshida
      2. SymbolTable.java
        137 kB
        Aki Yoshida

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Aki Yoshida
          • Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:

              Development