axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dobri Kitipov (JIRA)" <>
Subject [jira] Created: (AXIS2-4216) Axis2, SOAP 1.2 SOAP Fault and the Subcode element issue
Date Tue, 20 Jan 2009 09:15:59 GMT
Axis2, SOAP 1.2 SOAP Fault and the Subcode element issue

                 Key: AXIS2-4216
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: kernel
    Affects Versions: nightly
            Reporter: Dobri Kitipov
             Fix For: nightly

Hi everybody,

What I have observed is that the Axis2 interpretation of subcodes is not compliant with the
SOAP 1.2 spec (ref.  

Currently, if we look into the org.apache.axis2.util.MessageContextBuilder createFaultEnvelope(MessageContext
context, Throwable e) method we will see that when List faultSubCodes is iterated the subcode
is set to the Code with the following lines:

                    SOAPFactory sf = (SOAPFactory)envelope.getOMFactory();
                    SOAPFaultSubCode soapFaultSubCode = sf.createSOAPFaultSubCode(fault.getCode());
                    SOAPFaultValue saopFaultValue = sf.createSOAPFaultValue(fault.getCode());

In fact only the first subcode should be added to the fault.getCode() (, or <soapenv:Code>)
then every next one should be added to the preceding subcode (,or <soapenv:Subcode>
- in other words its parent one subcode).
I did a fix locally and it works for me. Without the fix every next subcode replaces the previous
one appended to the <soapenv:Code>. At the end the last one wins and it is set as the
single one subcode to the <soapenv:Code> element.

Here is a sample of a SOAP 1.2 Fault with two subcodes using the fix. Without the fix the
second subcode will replace the one appended to the <soapenv:Code> which is not correct:

<soapenv:Envelope xmlns:soapenv="">
    <soapenv:Header xmlns:wsa="">
        <soapenv:Fault xmlns:axis2ns2="">
                    <soapenv:Value xmlns:wsse="">wsse:MyException</soapenv:Value>
                        <soapenv:Value xmlns:wsse="">wsse:InvalidSecurity</soapenv:Value>
                <soapenv:Text xml:lang="en-US">Cannot load password callback class:

Thank you,

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message