2
I'm trying to connect to a local dogecoin server with jsonRPC.
The dogecoin daemon is launched with the following parameters:
dogecoin-qt -server -testnet -gen -debug -debugnet -printtoconsole -rpcuser=user -rpcpassword=user
The following Java code is used to connect to the server:
I'm using com.googlecode.jsonrpc4j.JsonRpcHttpClient
JsonRpcHttpClient client = new JsonRpcHttpClient(new URL("http://user:user@localhost:22555"));
String response = "";
client.invoke("getinfo()", response);
System.out.println(response);
It just won't accept any credentials at all, I've tried setting them on the conf file, command-line, etc.
Server returned HTTP response code: 401 for URL: http://user:user@localhost:22555
Any ideas ?
So... does it work now or what? – Jori – 2014-02-15T21:33:27.587
The authentication part yes. (I cannot answer it myself within 8 hours). However you should take a look at this post http://bitcoin.stackexchange.com/questions/7528/bitcoind-returning-invalid-json-rpc-2-0-response?rq=1
– pelican_george – 2014-02-15T22:26:01.457