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 / September 2005



Tip: Looking for answers? Try searching our database.

Flash Remoting with EJB

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Shimako.az - 13 Sep 2005 17:41 GMT
Hello,

I have been stuck for more than a week. It is Flash Remoting with EJB. Does
anyone have any advice for me?

I was able to run the EJB example (flashgateway-samples.ear) which came with
the Flash Remoting. I used JRun 4.

Now, I created a simple EJB just like the example (I used MyEclipse.) and
tried to run it in JRun 4. However, I cannot make it to work successfully.

Inside the Flash file(MyRemoting.fla), the create() and the function
create_Result( result ) were executed fine.

function create_Result( result )
{
    flashEJB = result;
    myGreeting();
}

Then, the control goes to the function myGreeting().

function myGreeting()
{
    trace( "before calling greeting method" );
    flashEJB.greeting( nameInput.text );  // I have greeting method in my session
EJB.
    trace( "after calling greeting method" );
}

The function myGreeting() was executed. Then, the control did not go to
function greeting_Result (result).

function greeting_Result (result)
{
    trace( "before putting result into text box." );
    greetingOutput.text = result;
   
    trace( "after putting result into text box." );
}

Instead, I received the following error from the function onStatus(error):
Service threw an exception during method invocation: No service named [type
Function] is known to Flash Remoting MX.

I compared my program with ?sample_Java_EJBWeather.fla? using NetConnection
Debugger. After the create(), I noticed Flash is calling
[type Function].greeting(lisa)
instead of something like this:
MySession_ejbobject4.greeting(lisa)

(MySession is my JNDI name for my session EJB.)

The following is what was appeared in the NetConnection Debugger:

Call ? MySession.create();
Result- {nc:, client:, servicename:MySession_ejbobject4,
_namedtype:NetWerviceProxy}
Call- [type Function].greeting(lisa);
AmfStatusCall-/2/onStatus(description: Service threw an exception during
method . . .

If you need to see the source files (MySessionBean.java and MyRemoting.fla),
please let me know.

Thank you in advance
Shimako
9/13/2005
Email: shimako.az@gmail.com
:(
jameslyon - 22 Sep 2005 16:27 GMT
I've also run into this issue and I hope someone from MM can help.

The two examples I've read from MM so far, use slightly different syntax when
they receive/assign the EJB object.  The correct way according to ActionScript
2.0 would be :  flashStatelessEJB = result.result - and that is exactly what
one of the two examples state.  But the other only uses :   flashStatelessEJB =
result  - and that example doesn't use a pendingCall or relayResponder either.  
BTW, neither example declares the flashStatelessEJB variable or gives any hint
as to it's data type...
Shimako.az - 26 Sep 2005 23:09 GMT
Hi,
I was able to make my program work.

I re-created my remoting flash program newly from File/New/Templates/Basic
Remoting.
Everything else is the same. I deleted all the script that came with template
and pasted my script.

I think that there must be a hidden switch or something between a general
flash document and a flash document for remoting.

Shimako
jameslyon - 27 Sep 2005 22:06 GMT
That's good news.

Could you post your frame of code?
 
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.