Did you call loadWSDL() on the __mxna:WebService first?
-----Original Message-----
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Nirth Fur Zahad
Sent: Thursday, May 11, 2006 1:06 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders][Flex2B3] Newbie question: WebServices in class
Hello List
>From the tutorial in Flex 2 b3 documentation we know how to make simple web service client with MXML tags
<mx:WebService
id="mxna"
useProxy="false" wsdl="
http://weblogs.macromedia.com/mxna/webservices/mxna2.cfc?wsdl" >
<mx:operation name="getPostsByCategory">
<mx:request xmlns="">
<limit>20</limit>
<offset>0
</offset>
<categoryId>4</categoryId>
<languageIds>"1"</languageIds>
</mx:request>
</mx:operation>
</mx:WebService>
but i need to make it in as so i tried to get it work like this //in class private var __mxna:WebService = new WebService(); private var __byCategory:Operation;
....
//in constructor
__mxna.wsdl = "http://weblogs.macromedia.com/mxna/webservices/mxna2.cfc?wsdl";
__mxna.useProxy = false;
__byCategory = __mxna.getPostsByCategory; __byCategory.addEventListener(ResultEvent.RESULT,onResult);
__byCategory.addEventListener(FaultEvent.FAULT,onFault);
__byCategory.send(20,0,4,"1");
/* i also tried like this
* __byCategory.arguments= [20,0,4,"1"];
* __byCategory.send();
*/
but this does not work, i've tried variouse ways like creating Operation instance with constructor and so on, but this does not works at all, can somebody point me in a direction what should i do? or what am i missing.
------------------------ Yahoo! Groups Sponsor --------------------~--> Home is just a click away. Make Yahoo! your home page now.
http://us.click.yahoo.com/DHchtC/3FxNAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~->
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
--
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
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.