cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lalit Kapoor (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CXF-1511) WrappedMessageContext does not implement SOAPMessageContext
Date Mon, 30 Nov 2009 16:03:20 GMT

    [ https://issues.apache.org/jira/browse/CXF-1511?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12783718#action_12783718
] 

Lalit Kapoor commented on CXF-1511:
-----------------------------------

The following is a way to get to the soap message (in accordance with what Alessio Soldano
said above), hope it helps:

import javax.xml.WebServiceContext;
import javax.xml.soap.SOAPMessage;
import javax.xml.soap.SOAPHeader;
import javax.xml.soap.SOAPException;
import org.apache.cxf.jaxws.context.WrappedMessageContext;
import org.apache.cxf.jaxws.handler.soap.SOAPMessageContextImpl;
import org.apache.cxf.message.Message;
...



@Resource
public WebServiceContext context;

WrappedMessageContext wmc = (WrappedMessageContext)context.getMessageContext();
Message msg = wmc.getWrappedMessage();
SOAPMessageContextImpl smci = new SOAPMessageContextImpl(msg);

try {
    //To get the headers
    SOAPMessage soapMsg = smci.getMessage();
    SOAPHeader header = soapMsg.getSOAPHeaders();
} catch (SOAPException e) {
e.printStackTrace();
}

> WrappedMessageContext does not implement SOAPMessageContext
> -----------------------------------------------------------
>
>                 Key: CXF-1511
>                 URL: https://issues.apache.org/jira/browse/CXF-1511
>             Project: CXF
>          Issue Type: Sub-task
>          Components: JAX-WS Runtime
>            Reporter: Thomas Diesler
>            Assignee: Alessio Soldano
>             Fix For: Invalid
>
>
> [tdiesler@tddell trunk]$ ant -Dtest=jaxws/binding test
> tests-run-internal:
>     [junit] Running org.jboss.test.ws.jaxws.binding.SOAPBindingTestCase
>     [junit] Retrieving document at 'http://localhost:8080/jaxws-binding?wsdl'.
>     [junit] Tests run: 2, Failures: 1, Errors: 1, Time elapsed: 6.716 sec
>     [junit] Test org.jboss.test.ws.jaxws.binding.SOAPBindingTestCase FAILED

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


Mime
View raw message