Hi,
thanks for help.
When I got it right, one first has to add the DOMIn/OutHandler to the
service (like it is said in the user guide to switch to DOM Mode) and
then add my own Handlers in which I access the messages.
I did it like this:
service = new ScatterwebServiceClient();
port = service.getScatterwebServiceHttpPort();
Client client = Client.getInstance(port);
client.addInHandler(new DOMInHandler());
client.addOutHandler(new DOMOutHandler());
client.addInHandler(new MyInHandler());
client.addOutHandler(new MyOutHandler());
But what I'm wondering is:
- In the user guide (http://xfire.codehaus.org/MessageContext) it is
described that one adds the handlers to an object of type service, which
one retrieves from the ServiceRegistry. I'm adding the handlers to an
object of type Client. Am I doing it the right way?
- How do I retrieve the service registry?
Best regards,
Abid
Tomek Sztelak schrieb:
You must create your own Handler class and add it to handler chain.
Each handler have public void invoke(MessageContext context) method,
inside which you can access DOM objects.
On 4/11/07, Abid Hussain <[EMAIL PROTECTED]> wrote:
Hi everybody,
I posted that question some time ago, but still didn't find a solution
even though people gave me some hints after my posting. I have to
confess that I'm not an expert in xfire.
In the user guide article about the message context
(http://xfire.codehaus.org/MessageContext) it says that in order to get
the message xml one can use the DOMIn/OutHandler like:
service.addInHandler(new DOMInHandler())
service.addOutHandler(new DOMInHandler())
Ok, that's simple. But then it is written that one can access the xml
document like:
public void invoke(MessageContext context) {
Document inputDoc =
context.getInMessage().getProperty(DOMInHandler.DOM_MESSAGE):
Document outputDoc =
context.getOutMessage().getProperty(DOMOutHandler.DOM_MESSAGE):
}
What I don't understand is, where in my code I should actually put the
invoke() method. I mean, there is an invoke() methode inside the
DOMIn/OutHandler, but as far as I understood the case, it is not meant
to extend the DOMIn/OutHandler.
Best regards,
Abid
--
Abid Hussain
Mail: [EMAIL PROTECTED]
Web: http://www.abid76.de
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email
--
Abid Hussain
Mail: [EMAIL PROTECTED]
Web: http://www.abid76.de
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email