Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

Go Back   ActionScript.org Forums > Supporting Technologies > Flash Remoting

Reply
 
Thread Tools Rate Thread Display Modes
Old 07-24-2003, 06:11 PM   #1
eyenine
Registered User
 
Join Date: Jul 2003
Posts: 8
Default Soap

I need to consume a web service I wrote in .NET that requires SOAP to interact. After spending one whole morning and afternoon on the Internet, I found various "solutions" - using the Flash Remoting component, or have a server-side script to act as an interface, or use XML.addRequestHeader().

Option 1 requires $$$, option 2 defeats the purpose of writing a webservice (since it is automated in ASP.NET), while option 3 doesn't really work. I checked the request headers and they remained intact, despite following the same exact code discussed on the late release notes on Macromedia.com.

So, how could I get Flash to use SOAP?
eyenine is offline   Reply With Quote
Old 07-24-2003, 07:32 PM   #2
CyanBlue
Super Moderator
 
CyanBlue's Avatar
 
Join Date: Jan 2002
Location: Centreville, VA
Posts: 24,878
Default

Howdy and Welcome...

First of all, Flash Remoting component is free... You can download it from the Macromedia's site... To run the Flash Remoting, you will need to either pay Macromedia to get the Flash Communication Server, or download PHP to run AMFPHP that does similar job...

I see that I am mumbling... It's because I don't know much about that stuff...

Go to http://www.amfphp.org to download AMFPHP package...

and see this thread...
http://www.actionscript.org/forums/s...threadid=28388

Show us what you create when it is done???
__________________
CyanBlue / Jason Je / Macromedia Certified Flash Developer & Designer
http://CyanBlue.FlashVacuum.com
http://www.FlashVacuum.com
http://tutorials.FlashVacuum.com

Do NOT PM, Email or Call me... Your question belongs right in this forum...
CyanBlue is offline   Reply With Quote
Old 07-24-2003, 07:42 PM   #3
freddycodes
Master of Nothing
 
Join Date: Dec 2002
Location: San Diego, CA
Posts: 2,468
Default

CyanBlue, I just want to point something out as I have seen you mention this in several threads.

FLash COmmunications Server is not FLash Remoting. FLash Communication seerver is for building realtime asynchronous connections between a server and any number of clients. It is for creating multiplayer, games, multi yser chat apps, and much much more, video conferencing. However it is not FLash Remoting. They are two different products.


eyenine,

Unfortunately there is no built in way to consume web services from inside Flash. Like all things with Windows Platforms, they cost money. FLash remoting would allow you to consume .NET web services through the flash gateway on the server, a .NET library(they have both J2EE and .NET versions).

You would happen to have say PHP to use would you. There are currently 2 pretty good SOAP libraries written in PHP. nusoap and PEAR::SOAP both of which can consume .NET web servcices, your cheapest solution would be to say use amfphp and conjunction with PEAR::SOAP libraries. Or possibly use PHPObject which has some native support for SOAP.


This uses Flash MX, amfphp and PEAR::SOAP to consume a remote service written with .NET.
http://www.irq11.com/~louie/webService/irecipe.html
freddycodes is offline   Reply With Quote
Old 07-24-2003, 08:07 PM   #4
CyanBlue
Super Moderator
 
CyanBlue's Avatar
 
Join Date: Jan 2002
Location: Centreville, VA
Posts: 24,878
Default

Thank you for correcting it, Masta...

I guess that happens when I reply without knowing what I am talking about... Gosh... Long way to go...

__________________
CyanBlue / Jason Je / Macromedia Certified Flash Developer & Designer
http://CyanBlue.FlashVacuum.com
http://www.FlashVacuum.com
http://tutorials.FlashVacuum.com

Do NOT PM, Email or Call me... Your question belongs right in this forum...
CyanBlue is offline   Reply With Quote
Old 07-24-2003, 09:33 PM   #5
eyenine
Registered User
 
Join Date: Jul 2003
Posts: 8
Default

Man, I don't understand this.

ASP.NET has everything automated. When one creates a web service, it will create a WSDL file to describe the service. In fact, all I want Flash to do is to send a HTTP request using the following template:

Code:
POST /ws/servicename.asmx HTTP/1.1
Host: irqnine.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://irqnine.com/ws/ActionName"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
  xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <ActionName xmlns="http://irqnine.com/ws/">
      <Field>int</Field>
    </ActionName>
  </soap:Body>
</soap:Envelope>
The requirement for a Flash Remoting component on the server side sounds vague to me. To my understanding, this means that servers that want to support Flash clients will have to deal with it manually. If this is true, then web services aren't made for it is for.

SOAP is standard and cross-platform. The only differences between SOAP and normal HTTP is an additional SOAPAction header attribute, Content-Type set to text/xml and body holding the XML data. Why does Flash have to deal with various platform-dependent approach to web services? Or are the help files not talking about the "true" web services?

eyenine is offline   Reply With Quote
Old 07-24-2003, 10:47 PM   #6
eyenine
Registered User
 
Join Date: Jul 2003
Posts: 8
Default

I just found out that someone has already ranted about this.

Last edited by eyenine; 07-24-2003 at 10:49 PM..
eyenine is offline   Reply With Quote
Old 07-25-2003, 12:59 AM   #7
freddycodes
Master of Nothing
 
Join Date: Dec 2002
Location: San Diego, CA
Posts: 2,468
Default

I think we will most likely see some sort of web service access in the next version of flash. Flash MX came along way from Flash 5 and I think if MM wants flash to contend with the other players in web development, they will need to.

However the one thing is if they let flash do everything noone would buy CFMX, which has remoting built into it, so there is your most obvious answer. AFAIAC
freddycodes is offline   Reply With Quote
Old 12-13-2005, 07:09 PM   #8
pixelbath
Registered User
 
Join Date: Mar 2005
Location: Houston, TX
Posts: 10
Default

One problem I've noticed is the tendency to confuse Flash Remoting with SOAP and Webservices. Specifically, Flash Remoting is the term used by Macromedia for their proprietary system, the Action Message Format (AMF). AMF uses HTTP, but instead of sending XML it sends lightweight binary data (and since it's a proprietary format, can encapsulate AS objects without changing types).

Beginning with the release of AMFPHP version 0.5.2, it is possible to consume remote web services using Flash and AMFPHP. The only way to do this is to install PEAR::SOAP or NuSOAP. Not really a solution.

I understand your frustration, eyenine, because we are using .Net web services here as well, and I have been running into the same problem. I have worked around the bulk of it by parsing the returned XML manually. This is not an elegant or very maintainable solution, but it's working for what we will need once this application is finished. I have found no way to get the addRequestHeader() method to work, so have had to work around that in my web service calls as well.

Very frustrating, especially since anybody you talk to at Macromedia says it works fine and will show you an example using data-bound components. For those who do not use Macromedia's craponents, I guess the official stance is "you're SOL."

I'm also not sure why people think that installing Apache, PHP, and AMFPHP is a solution for something (.Net web services) that works out of the box. Flash is the problem, not the standard web service.

Followed eyenine's link and ranted about this there, too.
pixelbath is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:56 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2009 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.