[
https://issues.apache.org/jira/browse/AXIOM-362?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andreas Veithen resolved AXIOM-362.
-----------------------------------
Resolution: Fixed
Assignee: Andreas Veithen
Fix Version/s: 1.3.0
An attempt to add a plain OMElement to a SOAPHeader using the Axiom API will
now trigger an exception. Elements added using the DOM API will be converted on
the fly to SOAPHeaderBlock instances by the iterators returned by methods
defined by SOAPHeader.
> SOAPHeader examineAllHeaderBlocks throws ClassCastException
> -----------------------------------------------------------
>
> Key: AXIOM-362
> URL: https://issues.apache.org/jira/browse/AXIOM-362
> Project: Axiom
> Issue Type: Bug
> Components: LLOM
> Affects Versions: 1.2.11
> Reporter: Auke Schrijnen
> Assignee: Andreas Veithen
> Priority: Minor
> Fix For: 1.3.0
>
> Attachments: axiom-soapheader.patch
>
>
> The llom SOAPHeaderImpl class throws a ClassCastException:
> java.lang.ClassCastException: org.apache.axiom.om.impl.llom.OMElementImpl
> cannot be cast to org.apache.axiom.soap.SOAPHeaderBlock
> at
> org.apache.axiom.soap.impl.llom.SOAPHeaderImpl$HeaderIterator.<init>(SOAPHeaderImpl.java:181)
> at
> org.apache.axiom.soap.impl.llom.SOAPHeaderImpl.examineAllHeaderBlocks(SOAPHeaderImpl.java:358)
> at
> org.apache.synapse.core.axis2.Axis2MessageContext.toString(Axis2MessageContext.java:485)
> at java.lang.String.valueOf(String.java:2826)
> at java.lang.StringBuilder.append(StringBuilder.java:115)
> at
> org.apache.synapse.mediators.eip.aggregator.AggregateMediator.mediate(AggregateMediator.java:249)
> at ...
> The HeaderIterator does check for nodes other than a SOAPHeaderBlock node,
> except for the first element. The method 'hasNext' does check if nodes are
> SOAPHeaderBlock nodes.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]