You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xmlrpc-dev@ws.apache.org by Jochen Wiedmann <jo...@gmail.com> on 2007/04/09 19:48:44 UTC
Re: why is executeAsync() nort working?
On 4/9/07, Dan Robinson (Contractor) <ro...@enews.nrl.navy.mil> wrote:
> I get the following error:
>
> [Fatal Error] :-1:-1 Premature end of file.
This looks very much like an error on the server side, which causes an
invalid response. (Invalid response = not even an error message). See
the servers log file.
--
My cats know that I am a loser who goes out for hunting every day
without ever returning as much as a single mouse. Fortunately, I've
got a wife who's a real champ: She leaves the house and returns within
half an hour, carrying whole bags full of meal.
---------------------------------------------------------------------
To unsubscribe, e-mail: xmlrpc-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: xmlrpc-dev-help@ws.apache.org
RE: why is executeAsync() nort working?
Posted by "Dan Robinson (Contractor)" <ro...@enews.nrl.navy.mil>.
I've basically copied the server straight out of the examples and the
same server code works with the synchronous client.execute() calls.
Where does the webserver log live?
Dan
------
public class MyServer {
public static void main(String[] args) {
WebServer webserver= new WebServer(8080);
XmlRpcServer xmlrpcserver = webserver.getXmlRpcServer();
ProperyHandlerMapping phm = new
PropertyHandlerMapping();
phm.addHandler("myObjectHandle", myObject.class);
xmlrpcserver.setHandlerMapping(phm);
XmlRpcServerConfigImpl serverconfig =
(XmlRpcServerConfigImpl) xmlrpcserver.getConfig();
serverconfig.setEnabledForExtension(true);
serverconfig.setContentLengthOptional(false);
webserver.start();
}
}
----------
public class MyClient {
public MyClient() {
XmlRpcClientConfigImpl config = new
XmlRpcClientConfigImpl();
config.setServerURL(new
URL("http://localhost:8080/myObjectHandle"));
XmlRpcClient client = new XmlRpcClient();
client.setConfig(config);
client.executeAsync("myObjectHandle.someMethod", new
Object[] { }, this);
}
public static void main(String[] args) {
new MyClient();
}
public void handleResult(XmlRpcRequest req, Object result) {
// do some work
}
public void handleError(XmlRpcRequest req, Throwable err) {
err.printStackTrace();
}
}
> -----Original Message-----
> From: Jochen Wiedmann [mailto:jochen.wiedmann@gmail.com]
> Sent: Monday, April 09, 2007 1:49 PM
> To: xmlrpc-dev@ws.apache.org
> Subject: Re: why is executeAsync() nort working?
>
> On 4/9/07, Dan Robinson (Contractor)
> <ro...@enews.nrl.navy.mil> wrote:
>
> > I get the following error:
> >
> > [Fatal Error] :-1:-1 Premature end of file.
>
> This looks very much like an error on the server side, which
> causes an invalid response. (Invalid response = not even an
> error message). See the servers log file.
>
>
> --
>
> My cats know that I am a loser who goes out for hunting every
> day without ever returning as much as a single mouse.
> Fortunately, I've got a wife who's a real champ: She leaves
> the house and returns within half an hour, carrying whole
> bags full of meal.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xmlrpc-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: xmlrpc-dev-help@ws.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: xmlrpc-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: xmlrpc-dev-help@ws.apache.org