04-08-2011 11:10 AM
hi,
I am relatively new to using http and the web service.
I wish to know
i. how to create a web service with a output variable (either string or xml) and
ii. then use a seperate VI to read the variable, written by http post (by third party, could be even through a browser).
I have seen the function generator demonstration, specifically the math addition example. and for reading back the xml content I use the datasocket read VI with the [text] parameter, however, this would return the current values passed from the labview through the entire URL and not the one which was sent by the browser (Internet Explorer)
Hope the explanation is clear.
Do reply in case of more detail.
Using LabVIEW 2009.
Thanks in Advance.
Narayanan
04-12-2011 09:22 AM
Hi Narayanan,
I'm not quite sure what you are asking, do you have some example code?
Datasockets don't support POST requests in general, you may have better luck with the example here: http://decibel.ni.com/content/docs/DOC-6252
04-13-2011 01:35 AM
Hi,
Thanks for the response.
Just to describe in detail, I have seen the Function Genertor Web service Demo.
On this we have a URL mapping of the xml data as:
/data/:Amplitude/:Frequency/:Noise/:Signal
and when i use the http client GET.vi to read back the data then the same is displayed appropriately using (attached sub vi) ReadURL.vi
Now, I have couple of queries here,
i. Where is the dynamic data to the URL posted from?
ii. If i post the data directly to a variable say :A or :B (in case of Add example) through Web Browser http post, then how do i read the value of the same variable in labview?
Note: May need to install the "http client Installer" for loading the attached ReadURL.vi.
Regards,
K.Narayanan
Hope this is