ws-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Veithen (JIRA)" <>
Subject [jira] [Commented] (AXIOM-362) SOAPHeader examineAllHeaderBlocks throws ClassCastException
Date Mon, 11 Apr 2011 18:21:06 GMT


Andreas Veithen commented on AXIOM-362:

Found an interesting comment in LLOM's SOAPHeaderImpl#addChild method:

        // Make sure a proper element is added.  The children of a SOAPHeader should be
        // SOAPHeaderBlock objects.
        // Due to legacy usages (AXIS2 has a lot of tests that violate this constraint)
        // I am only going to log an exception when debug is enabled. 

Action plan:
* Fix the Axis2 test cases that add plain OMElement instances to SOAPHeader.
* Change the addChild implementation to throw an exception if the child is not a SOAPHeaderBlock.

> SOAPHeader examineAllHeaderBlocks throws ClassCastException
> -----------------------------------------------------------
>                 Key: AXIOM-362
>                 URL:
>             Project: Axiom
>          Issue Type: Bug
>          Components: LLOM
>    Affects Versions: 1.2.11
>            Reporter: Auke Schrijnen
>            Priority: Minor
>         Attachments: axiom-soapheader.patch
> The llom SOAPHeaderImpl class throws a ClassCastException:
> java.lang.ClassCastException: cannot be cast
to org.apache.axiom.soap.SOAPHeaderBlock
> 	at org.apache.axiom.soap.impl.llom.SOAPHeaderImpl$HeaderIterator.<init>(
> 	at org.apache.axiom.soap.impl.llom.SOAPHeaderImpl.examineAllHeaderBlocks(
> 	at org.apache.synapse.core.axis2.Axis2MessageContext.toString(
> 	at java.lang.String.valueOf(
> 	at java.lang.StringBuilder.append(
> 	at org.apache.synapse.mediators.eip.aggregator.AggregateMediator.mediate(
> 	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 is automatically generated by JIRA.
For more information on JIRA, see:

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

View raw message