LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Webservice call in LabVIEW-DLL

Hi everyone

 

What I already do is calling a webservice (SAP BAPI) with LabVIEW in order to get some information from the ERP. To do this, a DLL call is required and it always works fine.

Now I'm looking for a LabWindows/CVI solution for this, so I built a shared library out of the LabVIEW-VI which contains the BAPI call. Now I have a DLL which calls a DLL, and obviously it doesn't work this way. No meaningful data is returned from the built LabVIEW-DLL, so I must assume that entire VI is not called properly. Even when I wire a constant value to the output "daten" for debugging purpose I won't receive it as long as the subVI containing the DLL call is enabled within the LabVIEW-DLL. As soon as I disable the subVI is disabled the returned data is ok.

When I call the DLL with LabVIEW instead of CVI everything works fine.

Anyone faced this problem too?? After a long web research I have no idea what to do...

Many thanks for your help!

 

Thomas

0 Kudos
Message 1 of 6
(5,419 Views)

Hi Thomas,

 

thank you for your post.

To be really able to help you on that issue, we would need some more understanding of what you are trying to do.

Please provide some more informations and a structured order of your DLL calls you are doing with LabVIEW / CVI.

Best practise would be to provide a block diagram that shows what you are trying to do and what is the actual problem then.

 

Best Regards,

 

JoLe

National Instruments

Applications Engineering

www.ni.com/support

0 Kudos
Message 2 of 6
(5,390 Views)

Hi

I'll be able to provide more information on monday.

Thanks in advance!

0 Kudos
Message 3 of 6
(5,387 Views)

Hi

Ok, some extended information now:

Originally I imported a web service by means of the LV Web Service import wizard. LabVIEW automatically created a DLL which establishes the connection (SubVI "Open Web Service GET_DETAIL"). The main VI contains this subVI and the invoke node that performs the call. This "Main.vi" works properly when run using a valid login info preconditioned. In order to get a CVI solution for the ERP call I built a shared library out of "main.vi". Calling this one using LabVIEW (call library funcion node) also works properly.

Now I created a LabWindows/CVI project to call the shared library. And this doesn't work anymore.

As you can see, the return value from the shared library is an error code. A call's return value will always be 0 in case I call the shared library out of CVI, even when I wire a constant value to the "error_code" output in the shared library for test purpose.

A C string pointer is given from CVI to the shared library so "material" can be read in CVI afterwards. This procedure basically works when I create a test project without the ERP call. Including the ERP call, the string contains the same nonsense as it did before the call, so I assume that no value is ever assigned to the string.

Attached you'll find the project VIs also including the C source. The VIs I haven't mentioned do some error handling or data manipulation stuff (e.g. add leading zeros to a string).

0 Kudos
Message 4 of 6
(5,355 Views)

Hi Thomas,

 

Thanks for the information.

I was trying to reproduce the issue but I think it would be more helpful if you send the project file so that I can see the build specifications, maybe something is missing there.

 

Best Regards,

MhM4054

0 Kudos
Message 5 of 6
(5,245 Views)

I am facing the same problem. Well a bit different, that two old machine runing Win7 Pro is okay for CVI to call labvew DLL which include imported webservice library. Two new machine (a industrial PC & a notebook) running Win7 Pro SP? can not effectively call those labview DLL. 

All machine have CVI2010 & Labview2013 installed. All compliation & build is sucess. But the code just pass through those functions very fast & without any return.

 

Hope some one can figure out something.

thanks 

WD

0 Kudos
Message 6 of 6
(3,823 Views)