Franck,

i managed to get it working without any issues - yes i own ifeel3.com, so there arent any security violations as the flash file is originating from the same site.

The code issue you mention is very valid for the startup - once the wsdl is cached it doesnt take much more time - i forgot to take into account that when you query an iis server running dotNet framework, the system takes 1-2 seconds to load in the dlls etc to run the application framework - in all it was a learning curve involving a few hours of banging my head against the wall.. finally it works ;)

The async stuff is usefull for dealing with multiple calls simultaneously to the wsdl. When you do what you propose, you lock the wsdl from doing anything else than one call at a time. 

Thanks for the headsup on the doc/literal issue - you are quite right, but i think i got that sneaky thing covered ;)

On another note its actually very interesting that the lack of clear actionscript documentation for the components - seems adobe is pushing everyone to use mxml which actually starts to tie your hands in a number of cases i can think of. But one thing for sure, i cant wait for Flex on Mac - it pains me to run two systems side by side and my trusty macbook pro no more than an mp3 player whilst coding on a dell ;(

Oh well - such is like ;) TTFN 


On 13 Aug 2006, at 07:47, Franck de Bruijn wrote:


Hi Samuel,

 

A few things:

  • Are you sure that you host your Flex application also at the www.ifeel3.comsite? This is a necessity for a Flex application to communicate with a webservice, due to Flash’s security model. (unless there is somewhere a crossdomain.xml file with the correct content ... check the documentation)
  • Your code might work, but not necessarily so. The loadWSDL() operation is asynchronous, but takes quite some time to complete. Only after the loadWSDL() has completed (and then some milliseconds more ... see some recent threads in this mailing list) you can fire your operation. To accomplish this you have to register for the LoadEvent.LOAD event
  • I don’t know where all this AsyncToken stuff comes from, but invocation of webservices can be done much simpler. Just try: tsWS.createUser(sessionId, userName, dob).
  • Expect some difficulties with Flex and the support of DOC/Literal webservices; I see that you are probably using .Net and DOC/Literal, and there are some issues with it. Also check the mailing list for this.

 

HTH,

Franck

 


From: [EMAIL PROTECTED]ups.com [mailto:[EMAIL PROTECTED]ups.com] On Behalf Of Samuel Colak
Sent: Sunday, August 13, 2006 1:29 AM
To: [EMAIL PROTECTED]ups.com
Subject: [flexcoders] Help regarding WebServices (FLEX) in Actionscript

 

var tsWS:WebService = new WebService();
tsWS.wsdl = "http://www.ifeel3.com/webservices/service.asmx?WSDL";
tsWS.loadWSDL();

var op:AbstractOperation = tsWS["createUser"];
tsWS.addEventListener("result", doResults);
tsWS.addEventListener("fault", doFailed);
var token:AsyncToken = op.send();
token.responder = new Responder(resultOut, null);

-----------------

All,

i am tring to access some webservices i have written in dotNet from Flex. If anyone can point
out where i am going wrong, please send me an email to [EMAIL PROTECTED]at-home.com.

The WSDL is publically visible - the only part missing are the eventlistening functions.

Many thanks,
Samuel




__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to