Hi,
I found the problem. I was using the Xfire API to add the handler to the service with the method setInHandlers <http://envoisolutions.com/xfire/api/org/codehaus/xfire/handler/Abstract HandlerSupport.html#setInHandlers(java.util.List)> (java.util.List inHandlers) and In this case I got the Exception described in the last message. Adding the handler with the method addInHandler(Handler <http://envoisolutions.com/xfire/api/org/codehaus/xfire/handler/Handler. html> handler) solved the problem. I am not sure why the second method works but this is the case. Thanks, Liav -----Original Message----- From: Liav Elias [mailto:[EMAIL PROTECTED] Sent: Sunday, May 06, 2007 5:49 PM To: [email protected] Subject: [xfire-user] Error in add handler to service Hi, I am adding a handler to a simple service. The handler has its invoke(MessageContext context) method defined which only prints a debug message (for now). I add the handler object to the service inside a servlet and register the service. While debugging I get to the invoke method and it works ok, the only problem is after the execution continues I get the following exception and the service is not completed: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: ParseError at [row,col]:[1,1] Premature end of file Message: Premature end of file. at org.codehaus.xfire.fault.XFireFault.createFault(XFireFault.java:89) at org.codehaus.xfire.client.Client.onReceive(Client.java:391) at org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel. java:139) at org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48) at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java :26) at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:1 31) at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:75) at org.codehaus.xfire.client.Client.invoke(Client.java:335) at org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77) at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57) Note: running the service without the handler works fine. Any ideas? Thanks, Liav
