Jump to content

ianalis

Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Posts posted by ianalis

  1. The solution, as suggested here, is to use events. It seems that the .Net Web Service Browser does not automatically create events for the asynchronous calls. The tool wsdl.exe generates codes with events but must be compiled. I used Visual C# Express as compiler. The resulting dll will have a fooAsync() method and a fooCompleted event for every foo(). Use the Result property of the e Event Data to get the results in the callback.

  2. Hi!

    How do I call .Net web service functions from the .Net-web-service-browser-generated dll, asynchronously? I noticed that there's a generated Beginfoo()/Endfoo() pair of methods for every foo() method. I'm thinking of calling Beginfoo() then call Endfoo() in a callback vi. Unfortunately, Beginfoo() has callback and asyncstate as parameters. The former is an AsyncCallback while the latter is an Object. I tried wiring an Open VI Reference to callback but there's a wiring error because the sink is a .Net refnum. I also tried casting it to a .Net refnum abd other variations but the wiring problem still exists. So, how do I wire the callback? What should I wire to the asyncstate?

  3. Hi!

    I want to have an event case triggered by a button click (via Value Change) and a menu item selection. I selected Menu Selection (User) to handle the menu selection and used Get Menu Selection to check the menu item selected. The event case is indeed triggered by Value Change and Menu Selection (User) when I ran it but the item tag and item path are both empty. The Get Menu Selection is wired to Current VI's menubar.

    Any ideas?

  4. QUOTE (TobyD @ Nov 5 2008, 03:58 PM)

    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

    &lt;xsd:schema&gt; &lt;xsd:import namespace="http://endpoint/" schemaLocation="http://202.92.128.162:81/Hello/HelloService?xsd=1"/&gt; &lt;/xsd:schema&gt;

    it becomes

    &lt;xs:schema version="1.0" targetNamespace="http://endpoint/" xmlns:tns="http://endpoint/" xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt;    &lt;xs:element name="getHello" type="tns:getHello"/&gt;    &lt;xs:element name="getHelloResponse" type="tns:getHelloResponse"/&gt;    &lt;xs:complexType name="getHello"&gt;	 &lt;xs:sequence&gt;	   &lt;xs:element name="arg0" type="xs:string" minOccurs="0"/&gt;	 &lt;/xs:sequence&gt;   &lt;/xs:complexType&gt;    &lt;xs:complexType name="getHelloResponse"&gt;	 &lt;xs:sequence&gt;	   &lt;xs:element name="return" type="xs:string" minOccurs="0"/&gt;	 &lt;/xs:sequence&gt;   &lt;/xs:complexType&gt; &lt;/xs:schema&gt;

    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!

  5. 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?

  6. 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.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.