[prev in list] [next in list] [prev in thread] [next in thread]
List: xmlrpc-user
Subject: RE: why is executeAsync() nort working?
From: "Dan Robinson \(Contractor\)" <robinson () enews ! nrl ! navy ! mil>
Date: 2007-04-09 17:59:41
Message-ID: 3207e47e7bfa468016c8af40cb936aa8461a8041 () enews ! nrl ! navy ! mil
[Download RAW message or body]
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)
> <robinson@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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic