« iPhone Tech Talks | Main | "Doc Wars" in 30 Seconds, Without Bunnies »

July 20, 2007

Flash CS3, web service components

Flash CS3, web service components: My apologies for the delay on this, I had to fill in gaps in my knowledge. One of the frequent questions since the release of Creative Suite 3 has been "Where are components for web services in Flash?" The prior version of the authoring tool offered ready-to-use components for retrieving remote data, and the new version in CS3 does not. Part of the reason is that the new version uses ActionScript 3 whenever possible, for the remarkable performance benefits, but not all of the AS2 work has been ported to AS3 yet. But another part of the reason is due to the nature of component use: any single component which solves a significantly large set of user needs tends to be significantly larger than a component which solves a smaller set of such needs -- logically, component development is usually more appropriately handled in a decentralized way, rather than centralizing everything through Adobe. That's why post-release work has focused on new materials about how to create components for the authoring environment, rather than on making individual components themselves -- fishing classes, rather than just fish tacos. This documentation is in the final review stages and should be on the website towards mid-summer. My apologies for not knowing this context previously, but that's the scoop -- web services weren't easy-peasy out-of-the-box with CS3, but they should be so once again soon, once we generalize the component-creation process. Expect docs up on the website soon.

Posted by JohnDowdell at July 20, 2007 03:13 PM

Trackback Pings

TrackBack URL for this entry:
http://weblogs.macromedia.com/mtadmin/mt-tb.cgi/8919

Comments

Here is a way to use web service in flash cs3(http://www.roading.net/blog/post_186.html), he is preparing web service components.

Posted by: someone at July 21, 2007 08:05 AM

The components are one thing, but the lack of supporting classes is the issue that I hear more people complain about.

Posted by: Phillip Kerman at July 21, 2007 11:57 AM

Thanks for the update JD - much appreciated!

Posted by: DesDev at July 30, 2007 12:50 PM

When can we expect the new web service components for AS3? If it's not possible to say the exact date can you tell at least is ot a matter of weeks, months or over a year from now?

[jd sez: I heard docs will be up soon, to package up routines as components, but that's still the latest info I heard.]

Posted by: vlad at August 4, 2007 09:58 PM

Hi JD,

I have been watching this thread. Any updates yet?

Thanks!

g

Posted by: greg h at September 5, 2007 04:04 PM

I don't know, but you're right, September is a reasonable time for a status update.

I've seen Richard Galvan in 601T this week, and will try to get face-to-face tomorrow and check.

jd/adobe

Posted by: John Dowdell at September 5, 2007 05:57 PM

I've spoken with Richard twice this week, and I know he's aware of it, but I'm not sure yet of an estimated time for a reply

jd

Posted by: John Dowdell at September 7, 2007 11:06 PM

So is there no way to consume a Webservice in Flash CS3 or Flex (basically with Actionscript 3.0) other than having to manually roll your own and parse the raw XML? That REALLY bites!!!! Is this a fact?

[jd sez: I would have to defer to Richard... he's punted twice on addressing this issue... let me go get a nerf bat, see if I can find him today....]

Posted by: Jason Merrill at September 27, 2007 08:07 AM

JD, is this something that is really back burner for (Richard) or does it look like these components are truly almost here? I am going to be porting several apps over to as3 and would love to not have to write web-service functionality from scratch.

Posted by: Jason at October 4, 2007 07:31 AM

I don't know; I've heard two "I'll write it up"s. Richard has told me the story on it, and it makes sense to me, but I'm not confident to tell it myself, which is why I asked him (as the main public representative of the Flash authoring team) to go direct.

As I understood, it was something like the AS2/AS3 shift meaning that many components could bear updates, and so the decision was to publish docs on how anyone could migrate whichever code -- to go for the general case, rather than each specific component.

But anyone should be able to answer this question by regular websearch, and I don't know of anything in the public record yet explaining it, so it's hard to check my understanding. It's clearly an Adobe responsibility.

And I'm about to take an extended sabbatical, so I won't be around to pursue it until after Thanksgiving.

Could I ask you to nudge a couple of other folks in the Flash Platform group on this, please? Ted Patrick will be decompressing after MAX this week, but if you're talking with any of the other Adobe staff bloggers, then asking if they know about this might be a way to see some action before I return.

I'm embarrassed by our lapse here, and I'm not sure what else I can say. I'm sorry that I wasn't able to bring this through to resolution in a more timely fashion, and regret how this may have affected your own work.

jd/adobe

Posted by: John Dowdell at October 4, 2007 12:12 PM

JD, could you email me directly with the addresses for staffers that you think I should start "nudging"? Maybe something is out there and is on the verge of release... maybe not, but I would like to find out.

Thanks JD... I apprecite the responses and info.

Jason


[jd sez: Sorry for being coy, but I didn't want to place any one staffer on the spot of having to beat up on other staffers... your favorite staff bloggers usually work in the same office and can exert peer pressure. I'll also forward this blog entry around internally again.]

Posted by: Jason at October 5, 2007 07:31 AM

Posted by: Pieter Michels at October 12, 2007 01:32 AM

Is it possible to port Flex WebService classes to Flash ? I tried to add Flex 2 SDK libs to classpath, but then flash doesn't compile at all. But there are AS3 WebService classes...

[jd sez: I'm not sure whether those classes in Flex are just straight ActionScript 3, or whether they also have dependencies on other parts of the Flex framework, and (if so) whether those particular parts can be abstracted. One of the Flex team bloggers would likely know, but I'm not certain which one. Lee Brimelow is directly connected with the Flash authoring team now and may be a good one to touch on this. (I'm technically on sabbatical now, and have no facetime regardless.)]

Posted by: Peter at October 16, 2007 12:03 PM

Here's another way to use web services in AS3, I hope it helps someone.

http://alducente.wordpress.com/2007/10/27/web-service-in-as3-release-10/

Posted by: Carlo Alducente at October 27, 2007 11:45 AM

I'm flash developer starting from Flash 2.

It's really not good idea remove WebService
support from Flash CS3, because today developer need hard support for client-server application.

So,I think that if you need a WebService
interoperability and you are a developer, you need to choose Remoting.

But very high price (for little project);

We hope that Macromedia can give us the WebService class. Adobe have no understand the importance of this Tecnology :-)

D;

Posted by: D; at October 31, 2007 02:43 PM

I think that action script support for web services is so important... we wait for web services component to be included again in Flash.
Adobe should encourage this technology, should include also efficient tools for XML manipulation such X-Path (full functionalities) and Xquery.
amjedbj (http://amjedbj.free.fr)

[jd sez: Still better to contacr that product team directly, 'cause they don't constantly poll old blogposts of people not on that product team....]

Posted by: amjedbj Tunisia at November 2, 2007 07:22 AM

No progress?

[jd sez: The Flash authoring team is still dithering over what they can say, not recognizing that silence is a message too. I'd have to say don't count on old components being ported to AS3 anytime soon, but I'm too far away from the issue to be of further use, sorry.]

Posted by: ? at December 21, 2007 12:01 AM

I found a method to use the Adobe Flex classes within Flash CS3, check out my post:
http://labs.qi-ideas.com/2007/12/25/using-flex-compiled-code-within-flash

Posted by: Sander at December 27, 2007 05:33 AM

Richard Galvan posted on his blog about this a couple of weeks ago:

About Flash Components

Posted by: Francis Cheng at January 23, 2008 10:49 AM

Hello i'm back (Amjedbj from Tunisia).
I've looked around in some blogs for a solution to web services development problem over AS3.. and i come back with this sample class.. I'm goining to develope an AS3 Web Server's proxy generator ... just contact me to get ur free vesion (http://amjedbj.free.fr)
see u!

package {
import flash.net.*;
import flash.xml.XMLDocument;
import flash.events.Event;
import flash.events.ErrorEvent;
import flash.events.HTTPStatusEvent;
import flash.display.Sprite;

public class WebService extends Sprite {
public var soapURL:String="http://webservices.tekever.eu/ip2pais/index.php";
private var urlLoaderService:URLLoader;
private var urlRequest:URLRequest;

private var SOAPENV:Namespace=new Namespace("http://schemas.xmlsoap.org/soap/envelope/");
private var tns:Namespace=new Namespace("http://webservices.tekever.eu/ip2pais");

public function WebService(){

// should write u'r self the soap request :=(
var soapRequest:XML = <soapenv:Envelope
xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd = "http://www.w3.org/2001/XMLSchema"
xmlns:soapenv = "http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ip2 = "http://webservices.tekever.eu/ip2pais" >
<soapenv:Header />
<soapenv:Body >
<ip2:IP2Pais soapenv:encodingStyle = "http://schemas.xmlsoap.org/soap/encoding/" >
<ip xsi:type = "xsd:string" >213.150.191.12</ip >
</ip2:IP2Pais >
</soapenv:Body >
</soapenv:Envelope > ;

// preparing and send the request
urlRequest = new URLRequest(this.soapURL);
urlRequest.method = URLRequestMethod.POST;
urlRequest.contentType = "text/xml; charset=utf-8";
urlRequest.data=soapRequest;
urlLoaderService = new URLLoader();
urlLoaderService.dataFormat = URLLoaderDataFormat.TEXT;
urlLoaderService.addEventListener(Event.COMPLETE, onServiceLoaded);
urlLoaderService.addEventListener(ErrorEvent.ERROR, ifServiceFailed);
urlLoaderService.load(urlRequest);
}
// receive the soap response
public function onServiceLoaded(e:Event):void {
var message:XML = new XML(urlLoaderService.data);
trace("Country:"+message.SOAPENV::Body.tns::IP2PaisResponse.retorna.pais);
}

// request failure
public function ifServiceFailed(e:ErrorEvent):void {
trace("Couldn't load : " + e);
}
}
}

Posted by: amjedbj (Amjed Brn Jabeur) at February 5, 2008 06:34 PM

*bump*

[jd sez: If that means "What's the status?" then check with Richard, he's the direct owner:
http://blogs.adobe.com/rgalvan/ ]

Posted by: darley at April 14, 2008 02:08 PM