[
https://issues.apache.org/jira/browse/WSCOMMONS-104?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12475920
]
Ruchith Udayanga Fernando commented on WSCOMMONS-104:
-----------------------------------------------------
Hi,
Right now we hold SOAP 1.1 fault information in an object structure similar to
that of SOAP12. And in building a SOAP 1.1 fault message we use the
SOAP11BuilderHelper to properly setup this structure. And in serializing a
fault the internalSerialize method is overridden in SOAP11FaultCodeImpl and
SOAP11FaultReasonImpl to properly serialize themselves as SOAP 1.1 elements.
However if we try to get the StAX events generated from the SOAP envelope we
run into an issue. This is because OMStAXWrapper that generates the events is
only aware of the OM not SOAP. Therefore when generating events from an OM-SOAP
structure representing a SOAP 1.1 fault we end up creating a set of OMElements
by SOAP 1.2 names within the SOAP 1.1 Fault element (e.g. Code/Value, Reason
instead of faultcode and faultstring).
I approached the issue as follows:
- Get rid of trying to maintain the SOAP 1.2 child elements (Value and Text
within Code and Reason objects respectively) and override getLocalName() of
SOAP11FaultCodeImpl and SOAP11FaultReasonImpl to return faultcode and
faultstring respectively. Here I modifier SOAP11BuilderHelper and the
internalSerialize() methods of both impl classes to build and serialize the
faults properly.
- Update SOAP11FaultImpl to override getCode() and getReason() methods to
return the correct child elements.
- Updated the test cases to support the changes.
- Update Axis2 code and tests to support AXIOM changes.
So what do you folks think?
Axiom changes are done and am still going through the axis2 changes. Will
submit the axiom patch now for review by interested folks.
Thanks,
Ruchith
> StAX events generated by a faultCode element of a SOAP11 Envelope is incorrect
> ------------------------------------------------------------------------------
>
> Key: WSCOMMONS-104
> URL: https://issues.apache.org/jira/browse/WSCOMMONS-104
> Project: WS-Commons
> Issue Type: Bug
> Components: AXIOM
> Reporter: Ruchith Udayanga Fernando
> Assigned To: Ruchith Udayanga Fernando
> Priority: Blocker
> Attachments: axiom.patch.txt
>
>
> A SOAP11 SOAPEnvelope carrying a SOAP Fault returns incorrect events for
> "faultcode". It returns events such that the local name is "Code". This is
> because the OMelement representing fault code has the local name "Code" and
> it also holds a "Value" first child (as in SOAP 12).
> This is because the
> org.apache.axiom.soap.impl.builder.SOAP11BuilderHelper#handleEvent() creates
> "Value" element and adds it into the "Code" element.
> The SOAP11FaultCodeImpl holds local name "Code" since its parent class
> SOAPFaultCodeImpl, sets the local name to code.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]