Jump to content

WDSL implementation in LV for windows and linux


Recommended Posts

Hello,

I'm wondering if anyone has ever used WDSL in LabVIEW for linux and windows to communicate with webservices. WDSL is a protocol based on XML and it uses SOAP binding. (WDSL Specification)

I'm looking for a LabVIEW implementation (G), or a shared library that is available in windows (.dll) and linux (.so).

A link in the right direction would be very appreciated.

Kind regards,

André Buurman

Carya Automatisering

The Netherlands.

Link to comment

WSDL

I've been playing with WSDL quite a bit, using a variety of tools to create WSDL files and read them back in. Unfortunately, there are compatibility issues often times, e.g. some tools use namespaces that other tools don't support, some tools declare their data types in a way other tools won't recognize etc. So I went back to what I think is the grand daddy of web services - the Google Search API. I took their WSDL and did some text processing in order to adapt it to my server. Crude method. Works like a charm. For reference on WSDL, I was pleasantly surprised to see that the W3 specification of WSDL is very well written, and has a lot of examples. Great resource. http://www.w3.org/TR/wsdl#_http.

Web Service

The WSDL file is just declaring your API, and you still have to implement it. Programming the actual web server in LabVIEW is probably quite a bit of work. If you want it running stand-alone, you'll have to implement your own networking code. If you run a LabVIEW-built executable as a CGI app in a web server, you can avoid that effort, but you still need to write code to serialize / deserialize the SOAP strings. That's not exactly rocket science, but it might not be fun either. Plus, you need to live with the disadvantages of CGI apps, the most important of which is that they are slow, because every call will start up a new process.

If you are using VISUAL Studio, I'd recommend building your own WSD as described above, having VISUAL Studio make a C# web service out of it, and hooking that up to either the LabVIEW ActiveX server interface or a LabVIEW-built DLL (the ActiveX server has the advantage that you can keep LabVIEW running in order to save performance). If you are using a C/C++ compiler, check out http://gsoap2.sourceforge.net/. I know there are many ways of implementing web services in other languages (I think about 90% of them are done in Java), but I'm not quite sure how the LabVIEW connectivity works from there.

Hope that helps,

Herbert

Link to comment
  • 9 months later...

QUOTE(andre@carya @ May 4 2007, 04:32 AM)

Hello,

I'm wondering if anyone has ever used WDSL in LabVIEW for linux and windows to communicate with webservices. WDSL is a protocol based on XML and it uses SOAP binding. (http://www.w3.org/TR/wsdl' target="_blank">WDSL Specification)

I'm looking for a LabVIEW implementation (G), or a shared library that is available in windows (.dll) and linux (.so).

A link in the right direction would be very appreciated.

Kind regards,

André Buurman

Carya Automatisering

The Netherlands.

I hope you have gotten this information elsewhere since several months have gone by.

One of the LabVIEW tools options is Import, you may import a Web Service. To do so you point the import tool to a WSDL file and LabVIEW will create a library of VI's which support making calls to the specified Web Service. The entire set of VI's is equivalent to a proxy for the service. Open & Close create & release a reference to the service, the other VIs represent method calls.

It does take some work to set all the properties, and if the service requires soap headers or complex types you may need to access external code to call constructors for the objects used for arguments, headers and return types.

This does work ( 8.2 ++ ), if you are calling an external Web Service. There does not seem to be a simple way to expose a LabVIEW application as a Web Service. There is plenty of documentation on the LabVIEW site, check out 'Calling external code' and related subjects.

Phil

Link to comment
  • 2 months later...

QUOTE (pbailey @ Feb 7 2008, 09:53 PM)

I hope you have gotten this information elsewhere since several months have gone by.

One of the LabVIEW tools options is Import, you may import a Web Service. To do so you point the import tool to a WSDL file and LabVIEW will create a library of VI's which support making calls to the specified Web Service. The entire set of VI's is equivalent to a proxy for the service. Open & Close create & release a reference to the service, the other VIs represent method calls.

It does take some work to set all the properties, and if the service requires soap headers or complex types you may need to access external code to call constructors for the objects used for arguments, headers and return types.

This does work ( 8.2 ++ ), if you are calling an external Web Service. There does not seem to be a simple way to expose a LabVIEW application as a Web Service. There is plenty of documentation on the LabVIEW site, check out 'Calling external code' and related subjects.

Phil

Yes, we have it working. We create the SOAP messages with "Format into string" and paste that into an HTTP message to be send to the server. The answer is then parsed and the values extracted. It no problem to do it this way because the interface is not subject to change.

As I mentioned in my original post: it has to work cross platform, so importing the wsdl was not an option.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.