07-29-2009 12:26 PM
Hi Maciej
Thanks so much for your prompt reply. I'm still a bit confused however. I have now managed to get LV talking to my WCF service by placing the .dll and .config files in the LV project file directory. However, i think i may be overcomplicating things due to my lack of LV knowledge (i'm a .net developer usually!) . If i can just sanity check what i have done to make sure i am not making any glaring errors.
This is the dll i then used in LV via the .Net connect node etc. and called the methods on my public class to get information from the service. However, this seems like a really clunky way of doing this and means i have to write wrapper methods for ever method on my service....
I am probably doing this all wrong...can LV use the generated proxy class directly without having to create a wrapper class? Boy, i'll be glad when i can just point LV at teh WCF WSDL....
thanks for your help
jamie
07-30-2009 07:05 AM
Hi,
You would like to take the information that svcutil.exe puts into the output.config file, and make LV aware of it, and use it.
This I'm affraid cannot be done, out of the box. Becaouse LV it self does not know how to read in .NET confg files in, at least I'm not aware of such feature. I have an idea for a workaround but I'll get to that in the end of the post.
So that we have a common understanding.
The configuraiton file that svcutil.exe outputs for you is not the config file for the client.dll file you get.
It is for that upper level, assembly that will be the application that imports the client as a dll. And it is there to simplify your usage of the WCF service.
So that when you create a client object, you can use the default constructior.And it will construct a client for you based on the config file infromation.
You can do two things.
1) That proxy class that you had mentioned. I would suggest that you use LV to implement what this class does, by using the information about the binding, and the endpointadress inside your LV code. ( Just like I have done in the example I mentioned in the previous post ).
Here you would construct the client not based on the default constuructor that takes no arguments, but you would have to choose a binding, and enpoint adress yourself.
2) Figure out a way to create the client by the proxy class that is .NET derived. And pass the Client Object reference to LabVIEW once the client object is constructed. Than use LV to work on that reference.
Option number two I had not thought through thoroghly... on how to exactly implement this, but I need to get back to doing stuff I get paid for 🙂
Anyway, if your configuration file isn't very very complicated and does not have tons of security / complicated configuration in it I would suggest you take option number one. And create the proxy within LabVIEW. This way once you construct the client object you will be able to call any method your Web Service provides.
Hope this helps,
Maciej
08-02-2009 04:57 PM - edited 08-02-2009 04:58 PM
Thanks Maciej for your help on this.
I'll let you know how i get on.
04-20-2012 09:25 AM
Hi NI
Is there any progress in this issue? Many developers seem to have stumbled into this problem with lack of support for the modern version of web services. Having to go take the long way round with Visual Studio is not a very graphical solution.
I am using LabVIEW 2011.
Best regards
Michael
04-23-2012 01:18 PM
Michael,
This was reported to R&D (# 35788), but the decision has been made not to change the product. If you feel strongly about this, you can request that an update be posted to the CAR, requesting the problem be reconsidered. I hope this helps.
10-10-2012 04:30 PM
I'm with Michael.
Jared, how do we request an update be made to the CAR? I just learned of LabVIEW's ability to import Web Services and was stoked to think of the possibilities it opens up. Immediately, I was crushed because every service I tried to test with was WCF. LabVIEW needs this feature!
...Ben
10-11-2012 09:59 AM
Ben,
Feel free and post this idea on our LabVIEW Idea exchange. This discussion forum is regularly viewed by R&D and this is the best platform for customers to have a say in what changes are made to our products.
Best,