António Ribeiro [
https://community.jboss.org/people/while_true] created the discussion
"Retrieve SOAPMessage from WrappedMessageContext using SOAPMessageContextImpl, in
JBoss 6.1"
To view the discussion, visit:
https://community.jboss.org/message/752382#752382
--------------------------------------------------------------
Hey guys,
I don't know if the subject of the discussion is clear enough but I'll do my best
to explain what is happening.
I've a web service deployed into JBoss 6.1 and I'm trying to retrieve the
SOAPMessage (javax.xml.ws) from my WebServiceContext (javax.xml.ws).
@Resource
private WebServiceContext wsctx;
The thing is that, in JBoss 6.1, we no longer are able to do what, for instance, one could
do in JBoss 5.1. In JBoss 5.1, to attain the SOAPMessage we could do the following:
SOAPMessageContext msgContext = (SOAPMessageContext) wsctx.getMessageContext();
SOAPMessage soapMessage = msgContext.getMessage();
Now, in JBoss 6.1, the +SOAPMessageContext+ is no longer support hence, and according to
what is available throughout the Web, one has to do the following:
WrappedMessageContext wmc = (WrappedMessageContext) wsctx.getMessageContext();
Message message = wmc.getWrappedMessage();
SOAPMessageContextImpl smci = new SOAPMessageContextImpl(message);
SOAPMessage soapMessage = smci.getMessage();
The problem is that, when doing +smci.getMessage();+ it is returned a
+*org.w3c.dom.DOMException*+ saying +*WRONG_DOCUMENT_ERR: A node is used in a different
document than the one that created it.*+
Can you please enlighten me in what I'm doing wrong?
Grateful for your attention.
Best regards
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/752382#752382]
Start a new discussion in JBoss Web Services at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]