You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by franck tankoua <ft...@gmail.com> on 2010/06/23 21:45:07 UTC

Re: using the beanJsonConverter with httpclient to have a Json-rpc java client?

Hi,
Thanks I have thought that this was not able to handle request to custom
rpchandler inside shindig but it turned out I was wrong.
The unit testing below is working although I needed to changed the way
opensocial-java-client ( JsonParser) to handle the result correctly.
{{{
@Test
  public void testRpc() throws RequestException, IOException {
    Provider provider = new ShindigProvider();
    Client client = new Client(provider, new SecurityTokenScheme(""));
    Request request = new Request("/rpc/", "login.authenticate", "POST");

    //request.setFieldsParameter(new String[] {"field1", "field2"});
    request.addParameter("uid", "franck");
    request.addParameter("pwd", "goodPassword");
    Response res = client.send(request);
    System.out.println(res.getEntry());

  }
}}}

On Tue, Jun 22, 2010 at 10:45 PM, Paul Lindner <li...@inuus.com> wrote:

> Have you looked at this?
>
> http://code.google.com/p/opensocial-java-client/
>
>
> On Jun 22, 2010, at 11:06 AM, franck tankoua wrote:
>
> > Hi All,
> >
> > I have looked into a java JSON-RPC client I could use to talk to my
> shindig.
> > The XML-RPC implementation does not fit my needs because I would like to
> > communicate in JSON and not xml.
> >
> > I would like to know if someone  tried this before and if not, I am
> thinking
> > on implementing something based on the beanJsonConverter and httpclient.
> >
> > Thanks.
> >
> > --
> > Franck
>
>


-- 
Franck