[ 
https://issues.apache.org/jira/browse/RAMPART-202?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bob Jacoby updated RAMPART-202:
-------------------------------

    Attachment: RampartEngineTest2.patch

Adds a new test to RampartEngineTest to use a SOAP 1.2 message. To do this 
needed to:
1. Add a new SOAP 1.2 message to test-resources/policy
2. Update MessageBuilderTestBase with new method to use this new message
3. RampartEngine test case to actually test

Added simplistic verification testing to verify that the results are as 
expected.


> 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: Nandana Mihindukulasooriya
>         Attachments: RampartEngineTest.patch, RampartEngineTest2.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