[prev in list] [next in list] [prev in thread] [next in thread]
List: xmlrpc-user
Subject: [jira] [Resolved] (AXIOM-394) Axiom should not allow creation of SOAPFaultSubCode elements for SOAP
From: "Andreas Veithen (JIRA)" <jira () apache ! org>
Date: 2014-05-31 17:07:02
Message-ID: JIRA.12528417.1319382035696.53904.1401556022150 () arcas
[Download RAW message or body]
[ https://issues.apache.org/jira/browse/AXIOM-394?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel \
]
Andreas Veithen resolved AXIOM-394.
-----------------------------------
Resolution: Fixed
Assignee: Andreas Veithen
> Axiom should not allow creation of SOAPFaultSubCode elements for SOAP 1.1
> -------------------------------------------------------------------------
>
> Key: AXIOM-394
> URL: https://issues.apache.org/jira/browse/AXIOM-394
> Project: Axiom
> Issue Type: Bug
> Components: API
> Affects Versions: 1.2.12
> Reporter: Andreas Veithen
> Assignee: Andreas Veithen
> Priority: Minor
> Fix For: 1.2.15
>
>
> 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);
> factory.createSOAPFaultSubCode(code);
> System.out.println("Using serialize:");
> fault.serialize(System.out);
> System.out.println();
> System.out.println("Using pull parser:");
> XMLStreamWriter writer = StAXUtils.createXMLStreamWriter(System.out);
> new StreamingOMSerializer().serialize(fault.getXMLStreamReader(), writer);
> writer.close();
> System.out.println();
> System.out.println("Using SAXSource:");
> TransformerFactory.newInstance().newTransformer().transform(fault.getSAXSource(true), \
> new StreamResult(System.out)); The output is:
> Using serialize:
> <soapenv:Fault xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><faultcode></faultcode></soapenv:Fault>
> Using pull parser:
> <soapenv:Fault xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><faultcode><Subcode \
> /></faultcode></soapenv:Fault> Using SAXSource:
> <?xml version="1.0" encoding="UTF-8"?><soapenv:Fault \
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><faultcode><Subcode/></faultcode></soapenv:Fault>
> This behavior is inconsistent and Axiom should forbid creating SOAPFaultSubCode \
> objects for SOAP 1.1.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic