简体   繁体   中英

How can i redirect a web server to a specific url?

Hi guys. I create a public content under my web service. I am trying to replace index.html to public content. Then i will be able to send data to that web page in labview. Any helpful idea?

here is the project part

here is the vi part

Well. The project should look like this. 在此处输入图片说明

So, please consider placing the index.html directly under Public Content folder.

Then right click on your VI and select the appropriate method. Then right click and select "Show Method URL".

If you want a VI that receives some value from index.html and then replies with other values you can specify inputs and outputs (you should connect them to connector pane).

  • To be able to use all features of HTTP you might want to right click on web service under project hierarchy select properties, go to HTTP Method VI Settings, select your VI, Go to Output Type and change to Stream. 在此处输入图片说明 If you change this to Stream, then you can use "Write Response.vi", output terminals will not work.

After all this you right click on web service and select start, then right click Application web server and select Publish.

Please use these links as references: http://zone.ni.com/reference/en-XX/help/371361K-01/lvhowto/build_web_service/

http://www.ni.com/white-paper/7747/en/

http://www.bloomy.com/sites/bloomy.com/files/bloomy_whitepaper_upandrunningwithlabviewwebservices.pdf

You can email me if you want me to send you examples, but there are lot of examples online. My email is: khachiksah.91@gmail.com

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM