[ 
https://issues.apache.org/jira/browse/AXIS-2614?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Akitoshi Yoshida updated AXIS-2614:
-----------------------------------

    Attachment: SymbolTable.java

> soap:fault element not recognized for soap 1.2 binding
> ------------------------------------------------------
>
>                 Key: AXIS-2614
>                 URL: https://issues.apache.org/jira/browse/AXIS-2614
>             Project: Apache Axis
>          Issue Type: Bug
>          Components: WSDL processing
>    Affects Versions: 1.4
>         Environment: JDK 1.4.2
> Windows XP
>            Reporter: Akitoshi Yoshida
>         Attachments: SymbolTable.java
>
>
> 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");
>                         }
>                     }
>                 }
>                 ...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to