From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Web Services Failed CAB Printer

Hello,

 

I have a little problem with import WSDL from CAB.

 

IF I give web adresse http://ip_printer/services.wsdl

Labview say WSDL validation failed..

 

But if I give adresse through the browser I found this file....

 

 

<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.cab.de/WSSchema" name="cabPrinterWebService" targetNamespace="http://www.cab.de/WSSchema">
<documentation>This is a cab Printer Web Service.</documentation>
<types>
<xsd:schema elementFormDefault="qualified" targetNamespace="http://www.cab.de/WSSchema">
<xsd:element name="statusRequest" type="xsd:string"/>
<xsd:element name="statusResponse" type="xsd:string"/>
<xsd:element name="listOfFormatsRequest">
<xsd:complexType>
<xsd:sequence/>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="format">
<xsd:sequence>
<xsd:element name="name" type="xsd:string"/>
<xsd:element name="description" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="listOfFormatsResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="format" minOccurs="0" maxOccurs="unbounded" type="tns:format"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="listOfObjectsRequest">
<xsd:complexType>
<xsd:sequence/>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="objectType">
<xsd:sequence>
<xsd:element name="name" type="xsd:string"/>
<xsd:element name="type" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="listOfObjectsResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="fObject" minOccurs="0" maxOccurs="unbounded" type="tns:objectType"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="listOfJobsRequest">
<xsd:complexType>
<xsd:sequence/>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="job">
<xsd:sequence>
<xsd:element name="id" type="xsd:string"/>
<xsd:element name="date" type="xsd:date"/>
<xsd:element name="time" type="xsd:time"/>
<xsd:element name="status" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="listOfJobsResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="job" minOccurs="0" maxOccurs="unbounded" type="tns:job"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="loadFormatRequest" type="xsd:string"/>
<xsd:complexType name="loadFormat">
<xsd:sequence>
<xsd:element name="generic" type="xsd:string"/>
<xsd:element name="result" type="xsd:boolean"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="loadFormatResponse" type="tns:loadFormat"/>
<xsd:complexType name="objectTypePrint">
<xsd:sequence>
<xsd:element name="name" type="xsd:string"/>
<xsd:element name="value" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="printFormat">
<xsd:sequence>
<xsd:element name="objects">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="fObject" minOccurs="0" maxOccurs="unbounded" type="tns:objectTypePrint"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="jobID" type="xsd:string"/>
<xsd:element name="numbers" type="xsd:int"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="printFormatRequest" type="tns:printFormat"/>
<xsd:element name="printFormatResponse" type="tns:loadFormat"/>
<xsd:complexType name="faultType">
<xsd:sequence>
<xsd:element name="faultCode" type="xsd:string"/>
<xsd:element name="faultString" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="faultResponse" type="tns:faultType"/>
</xsd:schema>
</types>
<message name="getPrinterStatusRequest">
<part name="parameters" element="tns:statusRequest"/>
</message>
<message name="getPrinterStatusResponse">
<part name="parameters" element="tns:statusResponse"/>
</message>
<message name="getListOfFormatsRequest">
<part name="parameters" element="tns:listOfFormatsRequest"/>
</message>
<message name="getListOfFormatsResponse">
<part name="parameters" element="tns:listOfFormatsResponse"/>
</message>
<message name="getListOfObjectsRequest">
<part name="parameters" element="tns:listOfObjectsRequest"/>
</message>
<message name="getListOfObjectsResponse">
<part name="parameters" element="tns:listOfObjectsResponse"/>
</message>
<message name="getListOfJobsRequest">
<part name="parameters" element="tns:listOfJobsRequest"/>
</message>
<message name="getListOfJobsResponse">
<part name="parameters" element="tns:listOfJobsResponse"/>
</message>
<message name="loadFormatRequest">
<part name="parameters" element="tns:loadFormatRequest"/>
</message>
<message name="loadFormatResponse">
<part name="parameters" element="tns:loadFormatResponse"/>
</message>
<message name="printFormatRequest">
<part name="parameters" element="tns:printFormatRequest"/>
</message>
<message name="printFormatResponse">
<part name="parameters" element="tns:printFormatResponse"/>
</message>
<message name="faultResponse">
<part name="Error" element="tns:faultResponse"/>
</message>
<portType name="cabPrinterSOAP">
<operation name="getPrinterStatus">
<documentation>
Printer Status. Input Values: ESCs, ESCz, ESCi, ESCl, ESCa, ESCj, ESC?, Generic, Label Output Values: Generic: A generic Printer Status, Label: The loaded Label, Other: see Programming manual
</documentation>
<input message="tns:getPrinterStatusRequest"/>
<output message="tns:getPrinterStatusResponse"/>
<fault name="faultResponse" message="tns:faultResponse"/>
</operation>
<operation name="getlistOfFormats">
<documentation>
List of Formats. Input Value: void Output Value: The Lables stored on the primary card slot
</documentation>
<input message="tns:getListOfFormatsRequest"/>
<output message="tns:getListOfFormatsResponse"/>
<fault name="faultResponse" message="tns:faultResponse"/>
</operation>
<operation name="getlistOfObjects">
<documentation>
List of Objects from the loaded Format. Input Value: void Output Value: The Objects from the loaded Format
</documentation>
<input message="tns:getListOfObjectsRequest"/>
<output message="tns:getListOfObjectsResponse"/>
<fault name="faultResponse" message="tns:faultResponse"/>
</operation>
<operation name="getlistOfJobs">
<documentation>
List of last printer Jobs. Input Value: void Output Value: The last Printer Jobs
</documentation>
<input message="tns:getListOfJobsRequest"/>
<output message="tns:getListOfJobsResponse"/>
<fault name="faultResponse" message="tns:faultResponse"/>
</operation>
<operation name="loadFormat">
<documentation>
Load Format. Input Value: The name from the Format Output Value: A processing status
</documentation>
<input message="tns:loadFormatRequest"/>
<output message="tns:loadFormatResponse"/>
<fault name="faultResponse" message="tns:faultResponse"/>
</operation>
<operation name="printFormat">
<documentation>
Print Format. Input Values: The objects (name and value) from the label The JobID from the label The number of labels Output Value: A processing status
</documentation>
<input message="tns:printFormatRequest"/>
<output message="tns:printFormatResponse"/>
<fault name="faultResponse" message="tns:faultResponse"/>
</operation>
</portType>
<binding name="cabSOAPBinding" type="tns:cabPrinterSOAP">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<operation name="getPrinterStatus">
<soap:operation soapAction="status" style="document"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
<fault name="faultResponse">
<soap:fault name="faultResponse" use="literal"/>
</fault>
</operation>
<operation name="getlistOfFormats">
<soap:operation soapAction="formatlist" style="document"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
<fault name="faultResponse">
<soap:fault name="faultResponse" use="literal"/>
</fault>
</operation>
<operation name="getlistOfObjects">
<soap:operation soapAction="objectlist" style="document"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
<fault name="faultResponse">
<soap:fault name="faultResponse" use="literal"/>
</fault>
</operation>
<operation name="getlistOfJobs">
<soap:operation soapAction="joblist" style="document"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
<fault name="faultResponse">
<soap:fault name="faultResponse" use="literal"/>
</fault>
</operation>
<operation name="loadFormat">
<soap:operation soapAction="loadformat" style="document"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
<fault name="faultResponse">
<soap:fault name="faultResponse" use="literal"/>
</fault>
</operation>
<operation name="printFormat">
<soap:operation soapAction="printformat" style="document"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
<fault name="faultResponse">
<soap:fault name="faultResponse" use="literal"/>
</fault>
</operation>
</binding>
<service name="cabPrinterWebService">
<documentation>A simple getStatus Web Service</documentation>
<port name="PrinterWebServiceSOAP" binding="tns:cabSOAPBinding">
<soap:address location="http://192.168.27.182/soap.cgi"/>
</port>
</service>
</definitions>

why it does not work in labview?

 

Best Regards,

 

Emmanuel

0 Kudos
Message 1 of 9
(3,628 Views)

Hello Emmanuel,

 

please tell me first your current LabVIEW Version.

 

Best Regards

 

Simon

0 Kudos
Message 2 of 9
(3,593 Views)

Hello Simon, 

 

My Labview is edition 2013 SP2, but it's the same proble whith 2012.

 

Best Regards

 

Emmanuel 

0 Kudos
Message 3 of 9
(3,580 Views)
Hello Emmanuel
 
For some reason, sometimes LabVIEW fails to import Web Services WSDL because LabVIEW does not support importing multiple files from the Web Service, means the exported web service needs additional schemas outside the WSDL itself.
In order to make the import Web Service Tool to work correctly, there is a workaround. The Workaround now is to include these two files manually to the follow directories:
Main.VI» C:\Program Files......\LabVIEW 2013\vi.lib\Platform\WebService\Main Panel\Pages\Input WSDL
WebServiceUtil.dll»C:\Program Files.....\LabVIEW 2013\resource
Both files are in the .ZIP file in the attachments section.  
 
The Main.vi file and the WebServiceUtil.dll that the computer already has should be backup.
 
Best Regards
 
Simon
 
0 Kudos
Message 4 of 9
(3,570 Views)

I have the same problem since 2010 (see here) I tried your workaround but it

doesn't work for me, with soapUI it still works.

 

Greetings

Stefan

 

0 Kudos
Message 5 of 9
(3,548 Views)

Hello Simon, 

 

Thanks,

 

I have tested, but It's not ok.

 

For the main.vi is right?

 

2013-10-31_0826.png

 

Always the same error.

 

Best Regards

 

Emmanuel

 

 

0 Kudos
Message 6 of 9
(3,545 Views)

Hello Emmanuel

 

Yes the path is right.

 

Here a link for the handling with WSDL and LabVIEW:

https://decibel.ni.com/content/docs/DOC-22722

 

Best Regards

 

Simon

0 Kudos
Message 7 of 9
(3,497 Views)

Hello,

 

 I have use the solution from Stefan.

 

Thanks to both of you

 

Emmanuel 

 

My llb for other people.... 

 

Ps. If you make an update don't forget to post it

 

 

0 Kudos
Message 8 of 9
(3,485 Views)

Hi Emmanuel,

 

can you please save your LLBs in LabVIEW 2012. At the moment they are in LV2013

and i didn't install it so far..

 

Thanks

Stefan

0 Kudos
Message 9 of 9
(3,481 Views)