poiu77 Posted July 12, 2008 Report Share Posted July 12, 2008 Hello. I have a strange problem with "Import Web Service" function in LabView 8.5. When I try call WSDL file from WS written in .NET then everything is ok. I skip the autentication, push Next and I can create Project Library. But when I want call WSDL file from WS written in JAVA I get error message "Validation Failed". I checked both WS in "StrikeIron Web Service Analizer" and in this application both WS work well. Mayby I do something wrong. Or mayby LabView don't like WS from JAVA. I need a hint certainly. Thanks. Quote Link to comment
TobyD Posted July 12, 2008 Report Share Posted July 12, 2008 QUOTE (poiu77 @ Jul 10 2008, 11:50 PM) I have a strange problem with "Import Web Service" function in LabView 8.5 I ran into a similar problem a few months back. I ended up having to use a separate service to build my WSDL into a dll that I could then call from LabVIEW. We never could figure out why LabVIEW didn't like our WSDL (it worked in every other validator) but the dll solution worked for us so we didn't spend too much time on it. Quote Link to comment
profquail Posted July 17, 2008 Report Share Posted July 17, 2008 QUOTE (TobyD @ Jul 11 2008, 10:11 AM) I ran into a similar problem a few months back. I ended up having to use a separate service to build my WSDL into a dll that I could then call from LabVIEW. We never could figure out why LabVIEW didn't like our WSDL (it worked in every other validator) but the dll solution worked for us so we didn't spend too much time on it. I can't give you a certain answer on this, but I do a bit of PHP development on the side, and I know that there are some issue cross-communicating between PHP's SOAP client and a .NET web service...I seem to remember that it has something to do with Microsoft's implementation of the WSDL format. You might want to see what you can look up regarding how to access a .NET service from Java (there may be a few tricks to make it work). LabView handles it just fine since it uses built-in .NET functions to generate code libraries to access the web service... Quote Link to comment
ianalis Posted November 5, 2008 Report Share Posted November 5, 2008 QUOTE (TobyD @ Jul 11 2008, 03:11 PM) I ran into a similar problem a few months back. I ended up having to use a separate service to build my WSDL into a dll that I could then call from LabVIEW. We never could figure out why LabVIEW didn't like our WSDL (it worked in every other validator) but the dll solution worked for us so we didn't spend too much time on it. Hi! How did you generate the dll? I only need to generate a dll for a web service made using Java and hosted using glassfish. I've tried using LabView 8.0 and 8.6 but I was unsuccessful for both. Thanks. Quote Link to comment
TobyD Posted November 5, 2008 Report Share Posted November 5, 2008 QUOTE (ianalis @ Nov 4 2008, 01:41 AM) Hi!How did you generate the dll? I only need to generate a dll for a web service made using Java and hosted using glassfish. I've tried using LabView 8.0 and 8.6 but I was unsuccessful for both. Thanks. It's a multi-step process. You will need wsdl.exe. It comes with visual studio.net. If you don't have it, you can download and install the trial version (or I think VS2008 express will work too - it's free). If you already have wsdl.exe on your system (found in C:\Program Files\Microsoft SDKs\Windows\v6.0\Bin on my machine) then you are ready. Do a search for wsdl.exe to get more information, but the usage is essentially wsdl {parameters} {path}. For example, if my wsdl is called sample.wsdl and it is in my c:/temp directory I would use the following command: wsdl /language:CS /out:C:/Temp C:/Temp/Sample.wsdl This should create a C# file (with .cs extension) from your wsdl. Then you can use Visual C# (from the command line or the IDE) to compile your file into a class library that is callable from LabVIEW. I know it took me a while to figure it out the first time - hopefully this helps. Note: If you are more comfortable with visual basic you can use the /language:VB parameter and compile from there. Toby Quote Link to comment
ianalis Posted November 6, 2008 Report Share Posted November 6, 2008 QUOTE (TobyD @ Nov 4 2008, 04:05 PM) It's a multi-step process. You will need wsdl.exe. It comes with visual studio.net. If you don't have it, you can download and install the trial version (or I think VS2008 express will work too - it's free).If you already have wsdl.exe on your system (found in C:\Program Files\Microsoft SDKs\Windows\v6.0\Bin on my machine) then you are ready. Do a search for wsdl.exe to get more information, but the usage is essentially wsdl {parameters} {path}. For example, if my wsdl is called sample.wsdl and it is in my c:/temp directory I would use the following command: wsdl /language:CS /out:C:/Temp C:/Temp/Sample.wsdl This should create a C# file (with .cs extension) from your wsdl. Then you can use Visual C# (from the command line or the IDE) to compile your file into a class library that is callable from LabVIEW. I know it took me a while to figure it out the first time - hopefully this helps. Note: If you are more comfortable with visual basic you can use the /language:VB parameter and compile from there. Toby I'm still having problems generating the dll. I've installed .NET Framework 2.0 SDK and ran the following command: wsdl /l:cpp /out:c:\instru helloservice.wsdl The result is the following error: WSDL: error WSDL1: Unable to import binding 'HelloPortBinding' from namespace 'http://endpoint/'. Unable to import operation 'getHello'. The element 'http://endpoint/:getHello' is missing. The wsdl file is the Hello web service sample code for Java EE (glassfish). I've attached http://lavag.org/old_files/post-13821-1225885992.txt'>Download File:post-13821-1225885992.txt the wsdl file for reference. I've renamed it to .txt since I can't upload .wsdl. Any ideas? Quote Link to comment
TobyD Posted November 6, 2008 Report Share Posted November 6, 2008 QUOTE (ianalis @ Nov 5 2008, 03:57 AM) I'm still having problems generating the dll..._______________________________________________________________It looks like there is a problem with your wsdl file. I don't know much about the formatting of these files. I was only tasked with getting the services to work from an existing file. Is the schemaLocation a valid address on one of your internal servers? I can't access it and if you can't either then I think that is why it's failing. When I try to validate your wsdl in Eclipse I get the following error message... Failed to read schema document 'http://10.32.148.253:81/Hello/HelloService?xsd=1', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>. -Toby Quote Link to comment
ianalis Posted November 10, 2008 Report Share Posted November 10, 2008 QUOTE (TobyD @ Nov 5 2008, 03:58 PM) _______________________________________________________________It looks like there is a problem with your wsdl file. I don't know much about the formatting of these files. I was only tasked with getting the services to work from an existing file. Is the schemaLocation a valid address on one of your internal servers? I can't access it and if you can't either then I think that is why it's failing. When I try to validate your wsdl in Eclipse I get the following error message... Failed to read schema document 'http://10.32.148.253:81/Hello/HelloService?xsd=1', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>. -Toby It seems that .Net has problems with <import/> or <include/>. What I did instead was to insert the contents of the schema. So instead of <xsd:schema> <xsd:import namespace="http://endpoint/" schemaLocation="http://202.92.128.162:81/Hello/HelloService?xsd=1"/> </xsd:schema> it becomes <xs:schema version="1.0" targetNamespace="http://endpoint/" xmlns:tns="http://endpoint/" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="getHello" type="tns:getHello"/> <xs:element name="getHelloResponse" type="tns:getHelloResponse"/> <xs:complexType name="getHello"> <xs:sequence> <xs:element name="arg0" type="xs:string" minOccurs="0"/> </xs:sequence> </xs:complexType> <xs:complexType name="getHelloResponse"> <xs:sequence> <xs:element name="return" type="xs:string" minOccurs="0"/> </xs:sequence> </xs:complexType> </xs:schema> For more info, see this http://support.microsoft.com/kb/820122' rel='nofollow' target="_blank">article. The .Net web service browser also works with this workaround. Thanks for all the help! Quote Link to comment
TobyD Posted November 11, 2008 Report Share Posted November 11, 2008 QUOTE (ianalis @ Nov 8 2008, 08:23 PM) Thanks for all the help! No problem. Thanks for posting back the solution - that's good info. Quote Link to comment
Michael Uray Posted January 6, 2021 Report Share Posted January 6, 2021 (edited) It seems that the problem is still present. To import this WSDL http://ws.openecard.org/schema/ISO24727-3.wsdl causes the following error message: Is this not the general idea of a Web Service that it runs platform independent? Is there maybe any workaround for this issue? Edited January 6, 2021 by Michael Uray Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.