LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview WebService xml request and respons to 3th software

Hello,

I two day read about communicate two softwer over web service.

One software is Labview (software A) and second is software B. Labview software A is slave and need to accept order from software B and after finish order software A need return resutls to sofware B.


I read this topic but this is case when Labview software send xml message and recived respons. I have successfully created a client which call some web service, but I have oposite situation. How I can make web service server which will respons on example this message from some web service client (software B):

This message is example requst to my web services:


<?xml version="1.0"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<env:Header/>
<env:Body>
<bookStatusEvent xmlns="http://www.booksstatus.com/bookservice">
<iditem>125</iditem>
<book>107</book>
<status>availability</status>
</bookStatusEvent>
</env:Body>
</env:Envelope>

 

For example I need (Labview web service) need to generate this respons (after check and finsih operation inside LabViewMainVI):

**// iditem, book and status is variable inside Labview code which value return to master software which initiates request //**

 

<?xml version="1.0"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<bookStatusEventResponse xmlns="http://www.booksstatus.com/bookservice"">
<bookStatusEventResult>
<iditem>125</iditem>
<book>107</book>
<status>available</status>
</bookStatusEventResult>
</bookStatusEventResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

 

Please, If you can help me with some example or some idea how I can resolve this problem?

 

Thank you.

0 Kudos
Message 1 of 3
(3,057 Views)

I read this topic:

 

https://forums.ni.com/t5/LabVIEW/Communicate-with-3rd-party-web-service/td-p/3622913

 

I successfully call some web service (like solo server....) and recive answer using HTTP POST, but I don't have idea how to first  take  some request in xml format,  parse that xml "text", and make custom  respons  like on above topic (when my web service client first send request).

0 Kudos
Message 2 of 3
(3,041 Views)

I find here same problem:

https://forums.ni.com/t5/LabVIEW-Web-Development/Calling-a-LabVIEW-web-service-from-C/td-p/3376819

 

On this topic user write:

 

"I guess they'll move to creating copies of the methods and building the strings in code."

 

Any help?  How I can make strings for SOAP inside code? For me this way is OK. 

 

I know that there is no direct SOAP server in Labview, but if anyone has any way to my LAbView Web  service understand xml message from SOAP client, please help

 

0 Kudos
Message 3 of 3
(3,003 Views)