Added here: http://xfire.codehaus.org/MessageContext

BTW, the site is a Wiki if you ever feel like adding documentation. Just click on edit on the bottom right.

Regarding the book, I'm not sure. We'll see, I don't have time to write it and am trying to track down someone who can.

- Dan

Danny Trieu wrote:
Dan,

These info are valuable. How come I don't see anywhere in the doc? I mean I know about MessageContext and MessageBinnding thing but not how you get the document and then access it property stuff. Anyway, when is the book coming out again?... and will it be called "XFire in Action"???

Thanks Dan,

--danny

-----Original Message-----
From: Dan Diephouse [mailto:[EMAIL PROTECTED] Sent: Friday, May 05, 2006 7:36 AM
To: [email protected]
Subject: Re: [xfire-user] accessing soap message

There are two ways you can do it:
1. Use getXMLStreamReader() - but by the time you get the MessageContext in your service, it will already have read all the parameters unless you are using the MessageBinding (see the binding docs). 2. Use the DOMInHandler/DOMOutHandler. These create Documents of the message and stash them in the message. so you can retrieve them like:

Document msg = (Document) context.getInMessage().getProperty(DOMInHandler.DOM_MESSAGE);

- Dan

Iván Herrero wrote:
Hi,
I need to access de soap message to check its digital signature, but I
 haven't managed to do it. I've tried using:
        StaxBuilder sb = new StaxBuilder();
        Document d=sb.build(mc.getInMessage().getXMLStreamReader());
The returned document is always empty, although the XMLStreamReader element
shows the contents in a debugging console. I've also tried accessing the
header and the body separatedly, and then joining them in a document to
validate the body's signature, but I've found out that the method
messageContext.getInMessage().getBody() returns an Object, and don't know
what it should be casted to. I've tried casting to Element, suppossing an
analogue behavior to the getHeader() method, but I got an exception.
What is the best way to do it?
Thanks,
Iván.





--
Dan Diephouse
Envoi Solutions
http://envoisolutions.com
http://netzooid.com/blog

Reply via email to