1

So after 2 days of researching and experimenting I have finally come to the conclusion that at the moment there is no working JSON RPC client for windows phones.. Both Jayrock and AustinHarris give me countless of errors while trying to reference them in my app.

Does somebody have some insider knowledge of how to handle these kinds of requests since it is new matter to me. The company I worked for gave me some webservices to connect to through JSON RPC, starting with a simple Ping webservice :

{"transport":"POST","envelope":"JSON-RPC-2.0","contentType":"application\/json","SMDVersion":"2.0","services":{"ping":{"envelope":"JSON-RPC-2.0","transport":"POST","parameters":[{"type":"any","name":"mirror","optional":true}],"returns":["array","array","any","any"]}},"methods":{"ping":{"envelope":"JSON-RPC-2.0","transport":"POST","parameters":[{"type":"any","name":"mirror","optional":true}],"returns":["array","array","any","any"]}}}

Now while researching I did find some very handy made clients, but none of them seem to work with the windows phone assembly... http://code.google.com/p/jayrock/source/browse/src/Jayrock.Sandbox/JsonRpcClient.cs like this one.

Pay attention to the fact the client requires references made from Jayrock, but taking the source and building it myself causes a plethora of other errors; (Solution folder and www folder not supported in this version of the application(Visual Studio 2010 for Windows Phone)

Any help on how to acces this webservice through JSON RPC would be highly appreciated!

EDIT ----

Finally found a working client; NewtonSoft, still have no idea how to implement the pingservice though ... my knowledge of this matter is too limited ..

NoxBene
  • 94
  • 1
  • 12
  • JSON-RPC is an extremely simple protocol. You could knock up a 30-line client in 15 minutes, if you already have a JSON (de-)serializer library that doesn't give you build errors. – David-SkyMesh Apr 06 '12 at 04:48

1 Answers1

1

I have just updated the sources for JSON-RPC.NET to include a Windows Phone 7 build of the client library. The Windows Phone 7 client is still beta quality, and needs more testing, but you may have luck with it. I did some very basic testing with it, and it seems to work, but it will take me a few days before I have time to prove it.

Here is a direct link to the source for the Windows Phone 7 class for reference, or if you want to implement a client that is not based on the Reactive Extensions.

This JSON-RPC client does depend on the Newtonsoft JSON.NET library for serialization and deserialization.

I hope this helps.

Austin Harris
  • 1,676
  • 1
  • 17
  • 22