Welcome, Guest. Please login or register.
Did you miss your activation email?
02/08/12, 13:57
Home Help Search Login Register
News: Parsley Flex framework review featuring quiz application, in our Flex frameworks series
Flex SDK 4.5 mobile roadmap: begin with your mobile development
Swiz Flex framework review featuring quiz application
New homepage we release our new Homepage, take a look ...

+  Flash-db
|-+  Server side Scripting and Database Support
| |-+  Web Services: XML, Soap, WSDL, UDDI, and Flash Integration (Moderators: Flash-db, Musicman, vesa kortelainen, Ronald Wernecke, Jorge Solis)
| | |-+  Crossdomain policy file information - for flash-db.com and others
0 Members and 3 Guests are viewing this topic. « previous next »
Pages: [1] 2 Print
Author Topic: Crossdomain policy file information - for flash-db.com and others  (Read 40540 times)
Flash-db
Administrator
Systems Administrator
*****
Posts: 1867



View Profile WWW
« on: 10/10/03, 00:19 »

Update: You may want to skip to the bottom of this thread - the top two posts are now outdated

Currently flash-db does have a crossdomain policy file:
http://www.flash-db.com/crossdomain.xml

However it does not work with IE (only Mozilla).  This is unfortunate and were looking into the exact reason why.

The not so exact reason (stab in the dark) is that the web server we are currently using use's a special type of caching on all the pages it serves, which somehow affects the mime type and/or disables the flash movie from viewing the file when requested - making things fast, but in this case making things not work.  (best guess at this point) - check a couple threads down for a more accurate answer to this.

The funny part of all of this is that it works fine when Using Mozilla w/ flash player 7.0.14 (i think thats the version at least).

How the crossdomain policy file works:
When your movie first loads it sends out a couple requests, the first is to the wsdl file, the second is to the crossdomain.xml file on the server where the wsdl file is located.  It then gathers some information on both.

You can verify the above by trying the following url:
http://www.flash-db.com/babelfish.html
Then opening up your browsers cache and following along (or with other more advanced means).
The above will read in the crossdomain.xml file from xmethods and also the wsdl file when it's loaded.  Then it will send a request to the endpoint (actual script) of the service when the trigger method is called (button is pushed).

If we try the next service:
http://www.flash-db.com/whois.html
In IE - The the wsdl file is called correctly, however the crossdomain.xml file is not called or is not found.  However when the actual service is called the endpoint is requested - with or without the crossdomain file (from any domain).  What is returned to the flash player when there is no crossdomain.xml file is a bit of a mystery to me (some weird binary stuff that i didn't really look into), however it is about the same size as the expected result would be.

UPDATED: The info above is now better explained with the compatibility testing a couple threads further down.  When this was originally written, not as much was known.
« Last Edit: 10/14/03, 00:29 by Flash-db » Logged

-Jeff.
Flash-db
Administrator
Systems Administrator
*****
Posts: 1867



View Profile WWW
« Reply #1 on: 10/12/03, 22:38 »

It appears that the xMethods crossdomain policy file works in IE, but not Mozilla.  The flash-db crossdomain policy file works with Mozilla and Not IE.  

I actually have no idea what the difference is, but it is strange.  

Try this link:
http://www.flash-db.com/whois.html
In IE then in the latest version of Mozilla. (It only works in Mozilla).

Then try this link:
http://www.flash-db.com/babelfish.html
In IE then the latest version of Mozilla.  (It only works in IE).

Anyone have any idea's or further examples of this.


There is also an example of this on:
http://www.swfoo.com/archives/000034.html SWFoo.com

Dave Yang Notes:
Quote
Looks like this still doesn't work in Mozilla! Is this a player problem, the new security policy, or something else? Please leave a comment if you find anything (I'm too busy to look into this right now).


Logged

-Jeff.
Flash-db
Administrator
Systems Administrator
*****
Posts: 1867



View Profile WWW
« Reply #2 on: 10/13/03, 22:08 »

Here's the latest:

It appears as if the Flash Player (outside of the authoring environment) has trouble parsing returned elements from certain types of Soap toolkits.

From testing it appears that Coldfusion and MS.net services have the least trouble being consumed by the Flash Player (Go figure....).  Probably just because that's what macromedia used to test with.

Anyways after you get away from the .net and cf services world, things start to get a little weird (as shown in the above posts).  There is some type of matrix of working / not working based on Browser Type, Web Service Type, and Server type.  For example services created with SoapLite work in IE but not Mozilla.  Services created with Nusoap work in Mozilla, but not IE.

The weirdest part is that everything always seems to work inside the Flash Authoring Environment - It's only when they are used inside a browser that the incompatibilities and inconsistances arise.



Here's my service checker that I use to test with (the service is always changing, but it still gives a good idea of the debugging used):
http://www.flash-db.com/coInfo.html

The following line from the Log file is the main one in Question:
10/13 20:57:8 [INFO] SOAP: Parsed SOAP response XML [0 millis]

This line is always present with a working service, but not when a service is not working (and should be).  Basically it means that the Flash Player is having trouble parsing certain response envelopes from certain types of soap toolkits.  

The best way to confirm this would be to create a set of services, that are exactly the same, in different languages, then compare the soap response that is sent back from each.  Any difference should be able to explain the flakiness of the Flash player.

Logged

-Jeff.
Flash-db
Administrator
Systems Administrator
*****
Posts: 1867



View Profile WWW
« Reply #3 on: 10/13/03, 23:26 »

Flash 7 web services Compatibility Testing:

The following should better explain the weird results reported in the above messages.

The following where tested with:
http://www.flash-db.com/coInfo.html


Soap Toolkit Tested: Glue
Service Tested: http://services.xmethods.net/soap/urn:xmethods-delayed-quotes.wsdl (delayed stock quote)

Flash Authoring Environment: Works Correctly
Windows Desktop (IE): Works Correctly
Windows Desktop (Mozilla): Works Correctly
Central: Works Correctly
On Server (IE): Does not work - response not parsed
On Server (Mozilla): Does not work - response not parsed

The Crossdomain and wsdl file for the above service where verified in the cache, still the flash player was unable to parse the response sent by the Glue toolkit.


Soap Toolkit Tested: SoapLite
Service Tested: http://www.xmethods.net/sd/2001/BabelFishService.wsdl (Babelfish on Xmethods)

Flash Authoring Environment: Works Correctly
Windows Desktop (IE): Works Correctly
Windows Desktop (Mozilla): Works Correctly
Central: Works Correctly
On Server (IE): Works Correctly
On Server (Mozilla): Does not work - Request not recieved  : response not parsed

The flash 7 player does not work with the SoapLite toolkit in conjunction with Mozilla.  The last log file line indicates "Sent SOAP Request Message" - meaning flash sent a request, but SoapLite did not respond.


Soap Toolkit Tested: Apache SOAP
Service Tested: http://www.xmethods.net/sd/2001/BNQuoteService.wsdl (Barnes and Noble Price check)

Flash Authoring Environment: Works Correctly
Windows Desktop (IE): Works Correctly
Windows Desktop (Mozilla): Works Correctly
Central: Works Correctly
On Server (IE): Works Correctly
On Server (Mozilla): Does not work - Request not recieved : response not parsed

The flash 7 player does not work with Apache Soap  in conjunction with Mozilla.  The last log file line indicates "Sent SOAP Request Message" - meaning flash sent a request, but SoapLite did not respond.


Soap Toolkit Tested: Coldfusion
Service Tested: http://www.fullasagoog.com/packages/googservice.cfc?wsdl (Fullasagoog feed)

Flash Authoring Environment: Works Correctly
Windows Desktop (IE): Works Correctly
Windows Desktop (Mozilla): Works Correctly
Central: Works Correctly
On Server (IE): Works Correctly
On Server (Mozilla):  Works Correctly

This one (not surprisingly) works on all tested platforms.  One thing to mention on this one, the result set from this service can be rather large.  You can feel the browser working to decode the returned xml - it's slow and could probably freeze computers with slow processors. Might be better to use remoting in this case.


Soap Toolkit Tested: MS.Net
Service Tested: http://www.webservicex.net/whois.asmx?WSDL (Whois)

Flash Authoring Environment: Works Correctly
Windows Desktop (IE): Works Correctly
Windows Desktop (Mozilla): Works Correctly
Central: Works Correctly
On Server (IE): Works Correctly
On Server (Mozilla):  Works Correctly

MS.net web services work on all tested platforms in conjunction with the Flash 7 Player.


Soap Toolkit Tested: NuSoap
Service Tested: http://www.flash-db.com/services/ws/flashWhois.wsdl (Whois)

Flash Authoring Environment: Works Correctly
Windows Desktop (IE): Does not work correct - returned result is not parsed
Windows Desktop (Mozilla): Works Correctly
Central: Works Correctly
On Server (IE): Does not work correct - returned result is not parsed
On Server (Mozilla):  Works Correctly

This is one of the weirder combinations.  The others mostly don't work in Mozilla, however this one doesn't work in IE - but does in Mozilla.



I'll try to add any more findings to this list as I come across them.  The next phase will be to compare the soap response of the ones that are not working in certain browsers with the ones that are and find some type of pattern.

« Last Edit: 11/13/03, 01:09 by Flash-db » Logged

-Jeff.
chris
Server what's that
*
Posts: 1



View Profile Email
« Reply #4 on: 11/11/03, 14:33 »

I have a web service created with web matrix and it is not read by Flash MX 2004
any help would be appreciated
I am basically just trying to figure out how to return Access data in a service to flash

service URL : http://www.bizwerk.net/web_services/newFile.asmx
Logged
Flash-db
Administrator
Systems Administrator
*****
Posts: 1867



View Profile WWW
« Reply #5 on: 11/13/03, 01:13 »

I do not believe Flash MX04 can handle .Net recordsets when returned from a web service.  (at least I've read this a couple places - can't remember the exact reason).

You may want to try a simplier service to get started, start with just passing back a simple string (ie hello world).  Or try remoting instead, which will handle larger recordsets mcuh much better.
Logged

-Jeff.
Guillaume
Server what's that
*
Posts: 3



View Profile Email
« Reply #6 on: 12/19/03, 09:39 »

Hi !

 I've found how to make NuSoap working with IE. In fact, it works if you use HTTP 1.0. If you want it to work with HTTP 1.1, you need to modify function service in NuSOAP.php and invert the 'if' to test first 'gzip' compression method before 'deflate' and then it works !

I think the problem is with the algorithm of 'deflate'.

PS : Sorry for my english, I'm just a frenchy. Wink


Logged
Flash-db
Administrator
Systems Administrator
*****
Posts: 1867



View Profile WWW
« Reply #7 on: 12/19/03, 11:34 »

Merci Beaucoup

I have not tried this yet - just read it.  But thank you for taking the time to figure this out.  After testing I will be posting some information on this fix - and make sure that you get all the credit.  Do you have a website that you would like to have referenced with your Name for the credit.

If you find out any additional information on this, please post it here.

Thanks Again!
Logged

-Jeff.
Flash-db
Administrator
Systems Administrator
*****
Posts: 1867



View Profile WWW
« Reply #8 on: 12/22/03, 20:57 »

Works great.  Thank you for figuring that out.
Logged

-Jeff.
ChrisM
Server what's that
*
Posts: 6



View Profile WWW
« Reply #9 on: 01/26/04, 11:39 »

Was just about to post some enormous debug traces about this...good thing I found this thread first. THANK YOU! Was pulling out hair with the nusoap/IE/deflate problem. Could hardly find ANY resources...This site Rocks!   Cheesy
Logged
Brian S
Server what's that
*
Posts: 2


teaching and learning anyware


View Profile WWW
« Reply #10 on: 04/06/04, 17:18 »

Excellent, this fixed my problem too.   Guillaume definitely rocks.   Smiley
« Last Edit: 04/06/04, 17:21 by Brian S » Logged
Dusk
Server what's that
*
Posts: 2



View Profile Email
« Reply #11 on: 04/22/04, 18:34 »

Could someone please post the code for the changes needed in nusoap.php for Guillaume's solution?  Or better yet, a link to download an already modified version of the file?

Thanks a TON!!!  Huh
Logged
Guillaume
Server what's that
*
Posts: 3



View Profile Email
« Reply #12 on: 04/23/04, 01:12 »

a corrected version of nusoap can be found here : www.alcer.com/temp/nusoap.zip
Logged
Dusk
Server what's that
*
Posts: 2



View Profile Email
« Reply #13 on: 04/24/04, 23:55 »

Thank you for the link!  I have downlaoded the file and have tried it, but it still does not seem to work.  I am trying to access a mySQL database using Flash MX 2004 through NuSOAP, but the data still does not load when using IE on a PC, however IE on the Mac does work.  Everything works fine with Netscape.  Any Ideas?
Logged
Guillaume
Server what's that
*
Posts: 3



View Profile Email
« Reply #14 on: 04/26/04, 04:23 »

I'm using the corrected version of NuSoap to access a mySQL database or an Oracle database or another ODBC database using Flash 2004 MX Pro and it works fine with IE. Perhaps you can test with IE using or not HTTP 1.1. That's the way I found the deflate bug.

Hope this helps.
Logged
Pages: [1] 2 Print 
« previous next »
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
anything