LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Flex configuration for building SWF in Function Generator Web Service Demo [webservicedemo.zip]

I'm running LabVIEW 2009 Professional on XP and I've built an application that will require the LabVIEW Web Service. The example project given at the bottom of this page contains a Function Generator example web service that uses a thin client interface built in Flex. What I need to do is just an extension of this example--I'll be streaming MIME data through a Flex interface.

 

The web service magically deploys and runs without a hitch. However, when I try to rebuild the SWF from the Flex project file included in the example [without modification], I get a 404 when I try to visit the URL. The new SWF is also much smaller on the disk than the one included in the file.

 

[my guess:] It seems that there are configurations within the Flex builder that are necessary to properly bind to XML from the web service, but I'm a bit mystified how to do this properly with the LV web service. Can anybody help me with this?

0 Kudos
Message 1 of 19
(4,356 Views)

Can you clarify what you're finding in the example file which you are referring to as the SWF?

Product Support Engineer
National Instruments
0 Kudos
Message 2 of 19
(4,313 Views)

thanks for the reply...

 

The example file I'm referring to is "Flex File Archive Function Generator.zip". Flash Builder accepts the archive as a project file, containing 3 configuration files [excluding the eclipse configuration]: .project, .flexProperties and .actionScriptProperties.

 

Without changing anything, I build fcnGen.mxml and include the new SWF in lieu of the old in the RESTful Web Service build specifications and build and deploy. The new SWF is smaller on disk than the old and I get a 404 when trying to view it through a browser. The same procedure using the included SWF works fine.

 

I hope that clarifies things.

0 Kudos
Message 3 of 19
(4,307 Views)

Slight addendum:

 

If I use the original SWF as a source file [in the web service build specs] it runs. Then I use the new SWF as a source and it doesn't run. If I point back to the old SWF it now doesn't run.

0 Kudos
Message 4 of 19
(4,304 Views)

Okay so I've found the zip file you're talking about and the associated SWF file. It sounds like you're trying to rebuild these files in Adobe Flash Builder and the .swf it creates is broken, and as such is not loading in LabVIEW, is that correct?

Product Support Engineer
National Instruments
0 Kudos
Message 5 of 19
(4,284 Views)

Yes.

0 Kudos
Message 6 of 19
(4,281 Views)

Unfortunately I'm not able to diagnose problems you might be encountering with Adobe Flash Builder, and it sounds like that this where your problem is occurring. However I have found a tutorial: http://help.adobe.com/en_US/flashbuilder/using/index.html Please look at this and see if it helps you build your SWF file successfully.

Product Support Engineer
National Instruments
0 Kudos
Message 7 of 19
(4,266 Views)

Maybe I should be more specific with exactly what I need. This is not a flash builder question, as this would be the wrong forum for that.

 

Here: Under what conditions does the web service return "404 not found"? For example:

 

I have a useable SWF file [displays in the browser sans data]. I have a running VI that generates XML data when I point a browser to the URL mapping to its terminals. I have generated a static URL mapping into which I target the .lvws and .swf files during the build. Then when I direct a browser to the URL that maps to the .swf file I get "404 not found", which sounds like a server error to me. So what does the web service mean when it says 404 not found? Would it actually return that error if the .swf blew up [chokes on the XML or something]? Or does it really mean that it can't find my .swf file? There's a lot going on behind the scenes here, in the generation of the .lvws, that I haven't found any documentation for.

 

[possibly related: in the web demo example I build and deploy and the example runs fine. Then I build and deploy with a new .swf file to test it out--I get 404 not found. Now if I go back and source the original .swf I get 404 not found. I need to restart LabVIEW to get it back again.]

 

thanks for your consideration

 

0 Kudos
Message 8 of 19
(4,258 Views)

I guess I should add that it's not the \ problem or the MAX_PATH problem [or, at least, I checked "Use LabVIEW 8.x File Layout"].

0 Kudos
Message 9 of 19
(4,257 Views)

The new .swf file you try to point to, where is it? Is this on your local computer, local network, internet? Could you provide the whole path to it? (The path you give to LabVIEW)

Product Support Engineer
National Instruments
0 Kudos
Message 10 of 19
(4,239 Views)