cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guillaume Duchesneau (JIRA)" <j...@apache.org>
Subject [jira] Created: (CXF-2037) SoapFault subcode not outputted correctly in Soap12FaultOutInterceptor
Date Wed, 11 Feb 2009 20:58:59 GMT
SoapFault subcode not outputted correctly in Soap12FaultOutInterceptor
----------------------------------------------------------------------

                 Key: CXF-2037
                 URL: https://issues.apache.org/jira/browse/CXF-2037
             Project: CXF
          Issue Type: Bug
    Affects Versions: 2.1.3
            Reporter: Guillaume Duchesneau


Soap 1.2 spec for faults (http://www.w3.org/TR/soap12-part1/#soapfault) says that a soap fault
sub code should be formatted like this:

<Subcode><Value>m:MySubCode</Value></Subcode>

but org.apache.cxf.binding.soap.interceptor.Soap12FaultOutInterceptor does this (inner Value
element is absent):

<Subcode>m:MySubCode</Subcode>

By looking at the code, it would be very simple to fix this:

Starting at line 75 in release 2.1.3, code is :
            if (fault.getSubCode() != null) {
                writer.writeStartElement(defaultPrefix, "Subcode", ns);
                writer.writeCharacters(fault.getSubCodeString(getFaultCodePrefix(writer, fault.getSubCode()),

                                                              defaultPrefix));           
    
                writer.writeEndElement();
            }

... and it would become something like this:
            if (fault.getSubCode() != null) {
                writer.writeStartElement(defaultPrefix, "Subcode", ns);
                writer.writeStartElement(defaultPrefix, "Value", ns);
                writer.writeCharacters(fault.getSubCodeString(getFaultCodePrefix(writer, fault.getSubCode()),

                                                              defaultPrefix));           
    
                writer.writeEndElement();
                writer.writeEndElement();
            }

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


Mime
View raw message