You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Lalit Kapoor (JIRA)" <ji...@apache.org> on 2009/11/30 17:03:20 UTC
[jira] Commented: (CXF-1511) WrappedMessageContext does not
implement SOAPMessageContext
[ 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.