RampartEngine throws ClassCastException retrieving SOAPHeaderBlocks
-------------------------------------------------------------------

                 Key: RAMPART-202
                 URL: https://issues.apache.org/jira/browse/RAMPART-202
             Project: Rampart
          Issue Type: Bug
          Components: rampart-core
    Affects Versions: 1.4
            Reporter: Bob Jacoby
            Assignee: Ruchith Udayanga Fernando
         Attachments: RampartEngineTest.patch

I would like to be able to run the RampartReceiver via a test case in order to 
build some tests against a custom Axis2 handler. I need RampartReceiver to run 
in order to set the WSHandlerConstants.RECV_RESULTS. However, this encounters 
an error in RampartEngine.

java.lang.ClassCastException: org.apache.axiom.om.impl.dom.ElementImpl 
incompatible with org.apache.axiom.soap.SOAPHeaderBlock
        at org.apache.rampart.RampartEngine.process(RampartEngine.java:109)
        at 
org.apache.rampart.RampartEngineTest.testValidSOAPMessage(RampartEngineTest.java:60)

The steps to reproduce are:
1. Load a message context using MessageBuilderTestBase
2. Build it using MessageBuilder
3. Process the resultant messageContext via the RampartEngine.

Will provide a patch which adds a test case to the RampartEngineTest class. I'm 
not exactly sure of the expected output of the test method so I don't have any 
assertions verifying the output. However, the test fails with the above error. 
Once the test runs without error I can add new assertions.



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to