From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with LabVIEW Web Service implementation

Solved!
Go to solution

Dear LabVIEW community!

 

I kindly ask you for a help with such a problem. I tried to create some easy Web Service, with the use of html-forms for data transmission, and displaying the result in plain text (can be XML, doesn’t matter), and the transfer of the image as a result (for web page). I have decided to combine these two steps into one, and I was hoping to get a page that would display as a text result of adding three numbers, plus the graph (the distribution of random numbers, the amount of which is equal to the sum of those numbers). But I only get the result as text, without the image. Although both Vis work separately. But when I combine them (see sum-by-post.vi in the attached project), the desired result is not achieved. Please, take a look at it and explain what the problem is and how to implement my idea (although I suspect that it is necessary for such purposes to create html form and send result to them, but maybe I'm wrong).

 

Thank you in advance!

0 Kudos
Message 1 of 17
(6,790 Views)

Hi Kosist,

 

What happens when you run the VI? Do you get a specific error? Or are you just not getting the graph you expect? What http Request ID value are you using?

Kelsey W.
National Instruments
Applications Engineer
0 Kudos
Message 2 of 17
(6,745 Views)

Hi Kesley!

 

Thank you for your reply!

 

I don't get error, I just don't get the graph. The http Request ID value - is that passes to sum-by-post.VI, that uses html-form.

0 Kudos
Message 3 of 17
(6,724 Views)

Hi Kosist,

 

What version of LabVIEW are you using? I'm trying to run the web service on my end and having issues. Can you successfully run the program on your computer without using the web service? That is, can you run it in the LabVIEW environment?

Kelsey W.
National Instruments
Applications Engineer
0 Kudos
Message 4 of 17
(6,704 Views)

Hi Kelsey,

 

My LabVIEW version is LV 2012, f5. And yes, I can run this VI without Web Service. But I noticed, that in image.VI there were set brealpoint, I removed it - but after it it still doesn't work in the way I want to do it.

 

Sincerely, Ivan.

0 Kudos
Message 5 of 17
(6,688 Views)

Hi Kosist,

 

I finally got your example to run on my computer! I have a couple notes for you.

 

1. In the sum-by-post VI, you must include an indicator for the graph. Basically, you're calling that SubVI (Image) and it's running, but not doing anything with the result. So add the graph indicator of the "Image" VI to the connector pane and additionally, create an indicator from the output of the SubVI and wire the connector pane output to that graph. 

 

2. When you configure the WebService, make sure you have the correct file format for the sum-by-post VI. (Go to My Web Service Properties >> Source Files >> Service VI's >> sum-by-post.vi >> Configure VI >> Terminal: XML.) I'm not sure you will actually be able to see a graph in the browser, but if you make the type XML, you can atleast see data output that represents the graph. I couldn't get any of the other file formats to show an actual graph or meaninful data. 

 

3. There was a minor typo in the html text file - you had only the word "example" where you should have "myexample"

<form action="/myexample/sum-by-post" method="post" border="1">
<table>

 

Let me know if this helps!

 

Kelsey W.
National Instruments
Applications Engineer
0 Kudos
Message 6 of 17
(6,682 Views)
Solution
Accepted by topic author Kosist

Hi Kosist,

 

I worked with another engineer and we were able to get the project working. See the attached zip folder!

 

Best,

Kelsey

Kelsey W.
National Instruments
Applications Engineer
Message 7 of 17
(6,670 Views)

Hi Kelsey!

 

Thank you very much! Now it works!

 

Thank you!

 

Sincerely, Ivan.

0 Kudos
Message 8 of 17
(6,658 Views)

I have a similar problem that I feel I'm missing something stupid.  I'm new to web services in Labview.  I'm running vers 2013 and ran through the tutorial.  The web service simply adds two numbers and reports the sum or difference, depending on which VI is executed.  I've gotten that working fine.

 

I created a new project, and started with a single string input and echo it out.  That works.  Then I tried to concatenate two strings, but when I add the second string to the connector pane, I get an error starting the web service:

 

There was an error running the web service on the debug server:  Error-67019 occured at NI Web Service Debug.lvlib:Add VI.vi

Possible reason(s):

LabVIEW: (Hex 0xFFFEFA35) LabVIEW Web Services: VI checksum mismatch.

 

I've searched and found nothing pointing to the root cause.  What's most puzzling is if I back up to a working state (one string input on the connector pane concatenated to a static string) and simply CHANGE THE NAME OF THE VARIABLE ON THE CONNECTOR PANE, I get the exact same error.  As if the NAME of the control is an issue.

 

Anyone have any thoughts?

0 Kudos
Message 9 of 17
(6,505 Views)

What's even more confusing is if I take the working "add" VI from the tutorial and simply include one more input number (the sum of three values instead of two), I get the exact same error.

 

I'm using the LabView 2013 Full Development version.

0 Kudos
Message 10 of 17
(6,467 Views)