|
| Recent
Articles |
WDSL & Webresource.axd Various WDSL (Web Service Description Language) entities exist in a web server.The file is meant to describe what services are available and what the...
Capabilities Of Sybase SqlAnywhere With .NET... .NET developers can add the powerful capabilities of SQL Anywhere to their applications by using .NET programming interfaces and web services. SQL Anywhere Studio makes the most of the services provided by...
Customer-Lead, Trust-based Value Generation Services This article explains how an enterprise can leverage increased value generation, thereby aiding competitive advantage, by adoption of the `Enterprise Value...
Web Services, Contracts And Copyright What's the Deal With Contracts, Copyright and Web Related Services? If you're the client, make sure you include the following steps when hiring a service provider to ensure you don't get involved in a mess...
Should Google Offer Its Own Services As A Tip? I have been watching the latest spat against Google for offering "tips" on services and products that they offer, when some web searches are input into Google.
What Is A Portal? Among other things, a post today by my friend Scott Karp over at Publishing 2.0 has helped crystallized for me just how inadequate a lot of the terminology is that we're using for Web services and communities - and...
|
| Recent WebProNews Articles |
Adobe Flex Enters Open Source Adobe hopes to attract more developers to their Flex platform by releasing its SDK under terms of the Mozilla Public License. Through their shift of the Flex SDK to an open source model, Adobe has presented a compelling...
Ask Enters Contextual Ad Space Sites under the IAC arcology will be the first to display contextual advertising from the Ask Sponsored Listings (ASL) network, with an interesting twist on what gets...
Digg Stories Bore You After An Hour Remember the good old days, back in 2006, when an online article had a freshness date of roughly 36 hours? A couple of scientists have found that's about 35 hours too long these days. The analysis of Digg by researchers...
Bell Deja Vu: Is It Time To Break Up Google? Since Google's surprise (and staggering) acquisition of DoubleClick, the most unlikely of trustbusters (Microsoft and AT&T) have emerged. Though their complaints...
Googler Games Google; Cutts Goes Silent A week after Google's Matt Cutts set the SEO world ablaze by asking webmasters to report cases of link-buying, his area of the Googleplex is decidedly silent – and so is the media relations department regarding a double...
DoubleClick Turned Down Microsoft's Higher Bid The irony of Microsoft crying antitrust in the Google/DoubleClick buy is starting to make more sense: it may be sour grapes, and a regulatory approach...
|
 |
|
04.26.07
Consuming A WebService With Flash Media Server 2
By Stefan Richter
Here's a very simple example on how to invoke and consume a WSDL webservice using serverside Actionscript.
You will need Flash Media Server 2 for this, it will not work in Flash Communication Server.
The Webservice I am consuming in this example simply returns the currency exchange rate between two countries. For each country we must pass a string identifying the country, in this case I use 'UK' and 'USA'.
What follows is pure ASC (serverside Actionscript). No .fla file or clientside code is needed to run this.
Here is the content of my main.asc file (you can just copy and paste this code and save it as 'main.asc'):
In order to run this code you need to create a new application inside your FMS2's applications directory. I called my folder 'wsdl'. Next you should open the Flash Media Server admin console and load the 'wsdl' application. Then hit reload application. You should see the following traces:
Note that the traces such as
are generated by the 'imported' Actionscript files on line 1. They aren't traces produced by my code. Anyone know why param:Result traces undefined?
The documentation on webservices with FMS2 leaves a bit to be desired. My example was based on the code samples of in the live docs.
Comments
About the Author: Stefan is a certified Flash Developer who has been involved with Flash Media
Server since its very early days. From his home office in the UK he has
handled a variety of projects, specializing in Flash Video and Rich Internet
Applications for clients that include CNET, USA Network and Unilever. Stefan
is the author of a series of Adobe Developer Center articles, has spoken at
several industry events and contributes a regular column on Flash Video to
Streaming Media Magazine. His site www.flashcomguru.com is one of the
largest online resources on Flash Video.
|