first add the standard DOMOutHandler to the list, all call the super.invoke()
method...just by extending it and overriding the invoke method you are doing
nothing.

On 3/27/07, Abid Hussain <[EMAIL PROTECTED]> wrote:

Hi again,

I now try to get the messages with the following DOMOutHandler (and did
almost the same with the DOMInHandler):

public class MyOutHandler extends DOMOutHandler {

        //...

        @Override
        public void invoke(MessageContext msgContext) throws Exception {

                AbstractMessage msg = msgContext.getCurrentMessage();
                logger.debug(msg);
                Document doc = (Document) msg.getProperty(
DOMOutHandler.DOM_MESSAGE);
                logger.debug(doc);
        }
}

No I initialize my client with the following code:

service = new ScatterwebServiceClient();
port = service.getScatterwebServiceHttpPort();
Client client = Client.getInstance(port);
client.addInHandler(new MyInHandler());
client.addOutHandler(new MyOutHandler());

Now I call a web service method (called "getNetwork") using:
wsn = port.getNetwork();

But the document which I want to log (see above logger.debug(doc)) is
null.

And this happens in both cases, when using the eclipse-plugin to
generate code and when I do it using an ant task.

How can this be respectively what am I doing wrong?

Best regards,

Abid


> Sorry, I forgot this:
>
> In the xfire-FAQ it says that one adds a handler using
> GeoIPServiceClient service = new GeoIPServiceClient();
> GeoIPServiceSoap geoIPClient = service.getGeoIPServiceSoap();
> Client client = Client.getInstance(geoIPClient);
> client.addInHandler(new DOMOutHandler());
>
> But in my ServiceClient (which i initialize: service = new
> ScatterwebServiceClient();) there is no method like
> service.get...ServiceSoap().
>
> I somehow don't get it...:-(
>
> Best regards,
>
> Abid
>
>> Hi again,
>>
>> thanks for help.
>> But I still don't get it. I'm using xfire 1.2.4 together with the
>> Eclipse-Plugin for Codegeneration and there is no possibility to add a
>> handler to my ...ServiceClient.
>>
>> May it be the case that in this version it works in another way (or
>> doesn't work at all) than with the newer versions?
>>
>> Best regards,
>>
>> Abid
>>
>> Tomek Sztelak schrieb:
>>> And you expected correctly, question was posted many times :)
>>>
>>> client.addInHandler(new org.codehaus.xfire.util.dom.DOMInHandler());
>>> client.addOutHandler(new org.codehaus.xfire.util.dom.DOMOutHandler());
>>>
>>> Then you can access current message with
>>>
>>> AbstractMessage sm = msgContext.getCurrentMessage();
>>>  Document doc = (Document) sm.getProperty(DOMInHandler.DOM_MESSAGE);
>>>
>>>
>>> OutMessage msg = context.getOutMessage();
>>> Document doc = (Document) msg.getProperty(DOMOutHandler.DOM_MESSAGE);
>>>
>>>
>>> On 3/22/07, Abid Hussain <[EMAIL PROTECTED]> wrote:
>>>> Hi everybody,
>>>>
>>>> I would expect this question to be posted already in the past, but I
>>>> didn't find anything when using google (the search in the archives
>>>> doesn't work currently).
>>>>
>>>> I'm using xfire as client in a desktop application and would like to
>>>> display the request/response SOAP Messages in the application's GUI.
>>>>
>>>> Is there a way to fetch those messages when incoming/outgoing?
>>>>
>>>> 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


Reply via email to