views:

1211

answers:

4

Hi

Has anybody any useful links that can be used to consume a web service using flex? The easier the solution the better

Thanks

+1  A: 

I found this tutorial pretty helpful - it gives clear examples of consuming a basic webservice, with code on both sides (server and flex).

One thing to remember when accessing remote webservices on a remote server from flex is the need for a crossdomain.xml - the security model in flex needs to be explicitly told to be allowed access a service from a remote domain.

ConroyP
A: 

Flex Builder 3 comes with code generation tools that let you build the actionscript objects that correspond to the server side transfer object exposed by the eb service wsdl. It can make your life easier when working with web services. Here is a good overview by Zee Yang.

Brian Riley and Clint Modien have written an open source tool called VOFactory which lets you cast wsdl objects to actionscript objects on the fly.

marstonstudio
+1  A: 

I recommend AMF for consuming your own services (Java Remote Object is standard but there are others like pyAMF, RubyAMF).

This worked well for me to consume a REST web service:

http://code.google.com/p/as3httpclient/wiki/Links

Example

BlazeDS supports accessing external domains without a Crossdomain.xml: http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&postId=10284&productId=2

Brandon
+1  A: 

Try http://livedocs.adobe.com/flex/3/langref/mx/rpc/soap/mxml/WebService.html for SOAP services. You just have to specify the WSDL location and the event handlers and call the service.

Flex Builder 3 also contains code generation capabilities for creating proxies for web services. http://livedocs.adobe.com/flex/3/html/help.html?content=data_4.html

Buzzy