Kiefer Beckett
Confused
Join date: 22 Jun 2004
Posts: 106
|
07-30-2009 06:37
(if this is the wrong forum or duplicate i do apologize...) I wanted to create a webservice to be consumed in LSL script. I know how to write WCF (.NET C#) webservices. But do not know how to consume them in LSL script. I know I call them via the llHttpRequest method. But I do not know how to format it right so that it works. Assume I have this service http://www.mysite.com/LSLService.svc and it contains on operation called DoWork takes string input (aka DoWork(string data)) how do I call that in the llHttpRequest? Thnx Kiefer
_____________________
A tired mind become a shape shifter Everybody need a mood lifter [Rush - Vital Signs]
|
RobbyRacoon Olmstead
Red warrior is hungry!
Join date: 20 Sep 2006
Posts: 1,821
|
07-30-2009 08:00
I don't have a public-facing website running .NET that I can throw test code on at the moment, so I'm afraid I can't be very much help, but I do wonder why it is that you want to use a webservice specifically. Using a straight .aspx page and grabbing the variables from the Request.Parameters or Request.Form collections is fairly straightforward, and there are plenty of examples of this (here's one such: http://blogs.ipona.com/chris/archive/2008/02/17/8465.aspx). It's not quite as nice as having a webservice automagically parse the params and validate the data types, but it is quick and easy to implement. .
|
Kiefer Beckett
Confused
Join date: 22 Jun 2004
Posts: 106
|
07-30-2009 09:01
here's an example of what I might like to do: http://services.quartersforhomies.com/Trivia.svc see the CreatePlayerAccount method. What I want to know is how I call that method in the LSL script.....
_____________________
A tired mind become a shape shifter Everybody need a mood lifter [Rush - Vital Signs]
|
Tali Rosca
Plywood Whisperer
Join date: 6 Feb 2007
Posts: 767
|
07-30-2009 11:32
LSL has no built-in functionality to hook up to SOAP, and parsing the protocol "by hand" is a *huge* hassle. (Actually, doing it by built-in tools can be just about as much of a hassle with all the ambiguity and compatibility problems between versions). You are much better off simply handing the data you need off as pure text on a web page, possibly in a format which can be cast directly to a relevant datatype in LSL if you need anything but strings. SOAP has *no* purpose unless you can automatically hook up strongly typed stubs in both ends; otherwise, it's just so much XML soup you need to wade through to try and find the data you actually need.
|
Kiefer Beckett
Confused
Join date: 22 Jun 2004
Posts: 106
|
07-30-2009 12:20
Thnx for that info  Yeah I dont wanna handle soap by hand lol. not this kinda soap anyways. K
_____________________
A tired mind become a shape shifter Everybody need a mood lifter [Rush - Vital Signs]
|
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
|
07-30-2009 12:36
This kind of thing is why I think complex formal RPC mechanisms are a waste of time. RESTful web services where the request is encoded in the standard HTTP parameters already provide all the necessary functionality in every case I've looked at.
|