Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Flash Remoting / March 2007



Tip: Looking for answers? Try searching our database.

Remoting works twice, then "Error Opening URL"

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jhancik - 28 Feb 2007 16:04 GMT
Hello All!

I have constructed a simple "Hello World" cfc in CFMX 7 and am accessing it
through Remoting. It works fine twice and then anything after that I get the
indecipherable "Error Opening URL" msg.

I have created three separate cfcs (each doing the same thing more or less) to
test against; have created three different services (each using the same
connection, however) and no matter which combination I try, I get the same
behavior: 2 successes and then failures.

I have tried locally, loaded to the domain, loaded to a separate domain, etc.
and still no dice. Here's a sample:

// import necessary libraries
import mx.styles.*;
import mx.remoting.*;
import mx.rpc.*;
import mx.services.Log;
import mx.remoting.debug.NetDebug;

NetDebug.initialize();

// functions that handle the remote results
function sayWhat(str) {
    var sayWhatPC:PendingCall = projectReg.sayWhat(str);
    sayWhatPC.responder = new RelayResponder( this, "sayWhat_Result",
"sayWhat_Fault" );
}

function sayWhat_Result(result:ResultEvent) {
    trace("sayWhat success result:");
    trace(result.result);
    _root.debug_txt.text = result.result;
}

function sayWhat_Fault(fault:FaultEvent) {
  trace("sayWhat fault result:");
  trace(fault.fault.faultstring);
  _root.debug_txt.text =fault.fault.faultstring;
}

// connect to service and create service object
var srvc = "http://ourserver.com/flashservices/gateway";
var projectReg:Service = new Service(srvc, new Log(),
"project.com.registration", null, null );

NOTE:  The last bit of code above does not seem to want to play nice posting
to these forums <sigh>.  there really is no double var in front of the service
address!
jhancik - 28 Feb 2007 18:04 GMT
Ok,

I rebuilt my test app using the remoting component instead of AS.

When launched from an URL in the same domain the app works as desired (you can
get responses repeatedly).

However, when launched locally (either as a SWF or Projector using either
local access or network access) the app still only returns values twice.  
Subsequent attempts result in Error Opening URL error.

As my app is being designed to run locally this concerns me - any thoughts?

J-
tonyhigham - 28 Feb 2007 20:30 GMT
I knew I had seen this somewhere else before, but since I ended up doing my
remoting with AMFPHP, it took me a few minutes to find it:

http://www.northcode.com/forums/showthread.php?p=38133

Very simple if it works for you.    :)
jhancik - 01 Mar 2007 00:49 GMT
This is exactly the experience I was having!

The related article fixed this and was totally painless!

Thanks a bunch - what little hair I have left thanks you too!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.