LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Web Service WSDL Import Failing

Hi,

 

I am trying to import Web Service functions being hosted at

https://petroleader.com/WCF/ClientSvcsLib.svc

 

using the wsdl definition at

https://petroleader.com/WCF/ClientSvcsLib.svc?Wsdl

 

The LabVIEW 2015 SP1 Web Service importer fails after two functions

IRackService_GetRackPrices

IRack Service _Insert Rack Price

 

With the following report

 

Can't Create Wrapper VIs for Following Web Methods.

IActiveService_Get
IActiveService_GetLatest
IActiveService_MarkCaptured
GetFile
IFileRepositoryService_List
IFileRepositoryService_FlagCaptured
ItdTotalizerService_Get
ItdAlarmService_Get
ItdDeliveryService_Get
ItdInventoryService_Get
ItdShiftInventoryService_Get
ItdMagSensorService_Get
ICfnCardService_Get
ICfnCardService_Save
ICfnCardService_Delete
IExportService_GenerateExport
IExportService_GenerateExportByUser
IExportService_GenerateExportByDate
IExportService_GetProcessing
IExportService_GetAvailableFiles
IExportService_GetAvailableFilesByUser
IExportService_GetAvailableFilesResume
IExportService_GetAvailableFilesResumeByUser
IExportService_ClearAvailableFile
IImportService_DM2AccountImport
IImportService_DM2CardImport
IImportService_DM2DriverImport
IImportService_GenericAccountImport
IImportService_GenericCardImport
IImportService_GenericDriverImport
IImportService_GenericVehicleImport
IImportService_GetProcessing
IImportService_GetResult
IImportService_PiikeaCardImport
IImportService_PiikeaDriverImport
IImportService_PiikeaAccountImport
IImportService_PiikeaAccountReceivableImport
ResubmitProcessorTransactions
IAccountService_Get
IAccountService_GetAccounts
IAccountService_GetAccountNumbers
IAccountService_Save
IAccountService_Delete
ICardService_Get
ICardService_Save
ICardService_TriggerCardSync
ICardService_GetCardsByAccount
ICardService_GetCardNumbers

Possible Reasons are:
1. The VI under the specified path is write-protected.
Solution: remove the write-protected attribute and import the web service again.
2. A VI with the same name exists in memory.
Solution: close the VI and import the web service again to overwirte it.
3. The web service method that you use to create the wrapper VI has more than 12 parameters.
Solution: follow the steps to manually create wrapper VI with more than 12 parameters.
1) Open LabVIEW and open the LabVIEW library file.
2) In the imported VIs folder, duplicate one of the VIs and rename it.
3) Add the new VI to the LabVIEW library file.
4) Open the front panel of the VI and change the connector pane to use a pattern with more inputs. For example, 6-2-2-2-2-6. Verify that the refnums and error inputs are assigned to the corners of the connector pane.
5) Open the block diagram of the VI and change the invoke node to the method you want to import. Do not select the asynchronous methods named by Begin... or End... since they do not work in LabVIEW.
6) Delete the obsolete controls and indicators, if any.
7) For each of the inputs and outputs of the method, create an indicator or control.
😎 On the front panel, assign the new controls and indicators to the connector pane.
9) Arrange the controls and indicators appropriately.
10) Save the VI and the LabVIEW library file.

 

I don't need all the functions. At the moment I only need

IActiveService_Get
IActiveService_GetLatest
IActiveService_MarkCaptured

 

I have tried importing these functions only, they also failed, with the same msg "Can't Create Wrapper VIs for Following Web Methods".

Probably too many params for the standard vi wrapper to handle, which has a max of 12.

I tried the solution in the report above and when I get to step 5 the other methods are not available to select.

 

Any thoughts on why labVIEW cant import wsdl doc correctly, if it can or is there another way I can use the webservice outside of the above import path or build the .net assembly manually in LabVIEW .

 

Many Thanks

 

Paul

0 Kudos
Message 1 of 4
(3,991 Views)

In addition to my original post. Is it possible to construct a URL Command that can be run from a logged in browser, from the WSDL info provided.

 

Thanks

0 Kudos
Message 2 of 4
(3,923 Views)

Hey PaulvH,

 

Have you checked out the article on Web Services? 
http://www.ni.com/white-paper/7747/en/

 

You can also find out how to make .net assemblies here:
http://zone.ni.com/reference/en-XX/help/371361H-01/lvhowto/building_a_net_assembly/

0 Kudos
Message 3 of 4
(3,910 Views)

Hi Sekine,

Thanks for the reply. I had not seen the two links you sent. Looks like the LabVIEW Web services functions are for creating a LabVIEW web services server.

 

The second link looks like it describes how to create .net assemblies from a library of vis. I need to know how to talk to an existing webservice described in the WSDL definition xml.

 

I have made some progress by creat a .net assembly of the WSDL defined functions, using the latest free version of MS Visual Studio. The link below describes how to create a visual studio project that will pull the WSDL definition and build a .net assembly. I am currently calling some of those .net functions from labview. Still haven't pulled any data yet. 

http://www.outsystems.com/help/integrationstudio/9.0/Managing_Extensions/Import_Web_Services_from_a_...

 

I would still prefer to use labVIEWs http client functions to Get and POST commands to the web service, if possible. I am still trying to work out if its possible to construct a URL to pull data from the service.

 

Thanks

0 Kudos
Message 4 of 4
(3,907 Views)