PDA

View Full Version : finding web service


Boyd
11-13-2009, 04:49 PM
in flex 3, the menu sequence: Data - Import Web Serverice (WSDL) does a great job of importing the code necessary to turn web service calls into rather straightforward subroutine calls (almost)


And it works great in the development environment.


My web services are being hosted by IIS7 on Windows Server 2008. The SWF file is also being loaded from same.


The problem is that when transferred to a target machine, not the development machine, the code generated by the above "automated" process explicitly specifies the development machine, not the target machine.


There must be a simple and proper way to tell the generated code where the web services are ( hint: same machine that loaded the swf file )

Any suggestions?



/Boyd

NoobsArePeople2
11-13-2009, 05:22 PM
I don't think you can as the Import Web Service tool generates quite a bit of code. Seems you'll have to create two versions of the same service:

1) The dev version
2) The live version

You'll need to have some sort of config file to switch between the two. Conditional compilation might also be of use here: http://livedocs.adobe.com/flex/3/html/help.html?content=compilers_21.html