vb service

79 views
Skip to first unread message

khessels

unread,
Sep 9, 2008, 8:30:20 AM9/9/08
to Jayrock
Hi there

Is there an example to use jarock for a vb windows service (or vb
forms app) ?
Or of that is not possible, can anyone point me to the right direction
on how to achieve this?

thnx, Kees.

Atif Aziz

unread,
Sep 10, 2008, 5:06:57 PM9/10/08
to jay...@googlegroups.com
>>
Is there an example to use jarock for a vb windows service (or vb
forms app) ?
Or of that is not possible, can anyone point me to the right direction
on how to achieve this?
<<

It's really quite simple. The simplest way would be to use System.Net.WebClient, JSON-encode the request and JSON-decode the response. For encoding and decoding JSON, you can use Jayrock.Json.dll on the client in your VB Windows service. For understanding how to setup the request and response objects in JSON, see the JSON-RPC specification at http://json-rpc.org/wiki/specification, which is a light and easy read.

- Atif

C.B.M. Hessels

unread,
Sep 11, 2008, 7:34:08 AM9/11/08
to jay...@googlegroups.com
Thanks Atif, for pointing me in the right direction...
I'll get on it.

C.B.M. Hessels

unread,
Sep 11, 2008, 10:14:13 AM9/11/08
to jay...@googlegroups.com
Hei Atif,

Do you know some vb.net example(s) on how to create a json object from a
string and string to json object

I have build a json-rpc server which works fine for my ajax app, and
using webclient on vb.net works,
but i need to create a json object to be read by my json-rpc server and
i need to process the responce (which is in json)

All the examples i see are in c# and i can't find a decent example for
vb.net

Could you plz help a vb newbie, i realy dont want to go back to the
server and write a soap or xml solution...

Atif Aziz

unread,
Sep 13, 2008, 6:53:21 AM9/13/08
to jay...@googlegroups.com
Hessels,

>>
using webclient on vb.net works,
but i need to create a json object to be read by my json-rpc server and
i need to process the responce (which is in json)

All the examples i see are in c# and i can't find a decent example for
vb.net
<<

I've taken the C# sample in Jayrock that allows you to call a JSON-RPC service and converted it to Visual Basic. You can find it attached to this post and online here:
http://gist.github.com/10588

Hope this helps,
JayrockVbClientDemo.vb.txt

C.B.M. Hessels

unread,
Sep 13, 2008, 7:15:36 AM9/13/08
to jay...@googlegroups.com
Thanks Atif, You have helped me out in a big way, thanks.
Reply all
Reply to author
Forward
0 new messages