ws-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Veithen (Created) (JIRA)" <>
Subject [jira] [Created] (AXIOM-394) Axiom should not allow creation of SOAPFaultSubCode elements for SOAP 1.1
Date Sun, 23 Oct 2011 15:02:32 GMT
Axiom should not allow creation of SOAPFaultSubCode elements for SOAP 1.1

                 Key: AXIOM-394
             Project: Axiom
          Issue Type: Bug
          Components: API
    Affects Versions: 1.2.12
            Reporter: Andreas Veithen
            Priority: Minor

Axiom currently allows creating and adding SOAPFaultSubCode elements to SOAP 1.1 faults, although
the concept of subcode doesn't exist in SOAP 1.1. To avoid generating invalid SOAP messages,
the SOAP11FaultCodeImpl classes in LLOM and DOOM override the internalSerialize method to
silently skip the SOAPFaultSubCode node. However, the element is still visible when requesting
an XMLStreamReader or a SAXSource. 

This can be shown using the following code:

SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
SOAPFault fault = factory.createSOAPFault();
SOAPFaultCode code = factory.createSOAPFaultCode(fault);
System.out.println("Using serialize:"); 
System.out.println("Using pull parser:"); 
XMLStreamWriter writer = StAXUtils.createXMLStreamWriter(System.out); 
new StreamingOMSerializer().serialize(fault.getXMLStreamReader(), writer); 
System.out.println("Using SAXSource:");
TransformerFactory.newInstance().newTransformer().transform(fault.getSAXSource(true), new

The output is:

Using serialize:
<soapenv:Fault xmlns:soapenv=""><faultcode></faultcode></soapenv:Fault>
Using pull parser:
<soapenv:Fault xmlns:soapenv=""><faultcode><Subcode
Using SAXSource:
<?xml version="1.0" encoding="UTF-8"?><soapenv:Fault xmlns:soapenv=""><faultcode><Subcode/></faultcode></soapenv:Fault>

This behavior is inconsistent and Axiom should forbid creating SOAPFaultSubCode objects for
SOAP 1.1.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message