08-24-2008 09:53 PM
Hi,
I use the LabVIEW Web Service Import Wizard to build web service VIs. I was wondering if there is any method to dynamically specify the IP address of a web service server.
In our application development, usually we would setup an internal test server running web services. Once the development is finished, we would deploy the server with a new IP address. We'd then need to import the web services again and change the VI links in order for the new program to work. It would be nice if we can just change the server IP address instead.
Best Regards,
Chienwei
CWT
08-27-2008 01:42 AM
Hi,Let's take an example from following website for reference:
http://zone.ni.com/devzone/cda/tut/p/id/4728 .
After GENERATting the .lvproj, Open the "Open Web Service.vi" file.
On the Block Diagram Window, we'll see one string blank containing the
URL we've just copied from one of the connections in http://www.xmethods.net/ve2/Directory.po .
We can change that blank to "control" and assign this vi as a sub.
In that way, we could change our URL in our main VI front panel!
Following are 3 .jpg files for reference :
http://formosa.apac.corp.natinst.com/Operations/IS/nitwblog.nsf/Images/CTHG-7HW9UR/$File/1.JPG
http://formosa.apac.corp.natinst.com/Operations/IS/nitwblog.nsf/Images/CTHG-7HW9UR/$File/2.JPG
http://formosa.apac.corp.natinst.com/Operations/IS/nitwblog.nsf/Images/CTHG-7HW9UR/$File/3.JPG
NI AE Joe
09-29-2010 07:58 AM
Hello ! Has anyone found a working solution to this problem yet ? The URL can be changed just like Joe explains, but at least for me this is not a solution. My application is Still trying to connect to the IP Address of the PC from where the Web Service methods were originally imported and it doesn't make difference if I feed another IP address into the url.
It seems the fixed IP Address was stored somehow directly into the WebServiceInterface.dll itself, when the Web Service was first imported.
I guess one workaround would be to install the LabVIEW into the same PC where the Web Service is located and import the Web Service there using "localhost" instead of IP Address. But this helps (? - haven't tried yet) only if I run my application on the server computers. If I install my application on some client PC the application is probably trying to connect to "localhost" and it won't work.
I wonder if this annoying problem has been fixed in 2010, or if there's another workaround ?
Best regards,
Cerati
08-25-2011 11:07 AM
Hi Guys ,
Iam Also facing the same problem, any one got solution for the above case.
Regards,
Shrek
08-25-2011 12:37 PM
Is this what you are trying to do?
08-29-2011 05:06 AM
Shrek,
This bug was reported to NI last October. Unfortunately I don't know the CAR number nor the current status of this problem.
As far as I know, I think the problem still exists on LabVIEW 2011 -version.
The workaround I have been using is to do the Web Service -import for two different IP-addresses, one for the server use and another for the client use. Instad of IP-address I use the computer name ("localhost" for server and "someothername" for client use). This way two separate WebServiceInterface.dll -files are created and I can attach one of them to my application depending on if it's used on a server or a client computer. For the client use I also need to add the corresponding row into the hosts-file, located under system32/drivers/etc -folder.
Cheers,
Cerati
07-09-2013 08:42 AM
Hi,
I'm facing the same issue with LV2012 SP1 !
Anyone of you finaly found a way to dynamically change the server IP on which the web service is pointing to ?
11-11-2016 10:34 AM
I ran into the same problem myself.
You can modify the HOSTS file (c:\Windows\System32\drivers\etc\HOSTS) with the same computer name used in the Web Services import, and then point to any IP address on the LAN.
HOSTS Entry:
192.168.0.21 MyPcName.MyCompanyName.com
I found that the name is hard-coded in the DLL library that is created from the WSDL import utility, and the only way to get around this is to modify the hosts file to point to whatever address has the web server running.
-GW
12-05-2017 07:54 AM
Hi
I think have the same issue with LabVIEW 2017, can some one confirm that this issue still exists in LV2017?
12-05-2017 08:06 AM
Hi,
I guess they didn't improve this toolkit over the years...
I found a work around working with SOAP requests over HTTP (SoapUI software prohram helped a lot).