Hey Tom,

If you want to simply use a native support for AMF0, you can use the
NetConnection class instead. I've successfully used it with old versions of
AMFPHP and CF.

Cheers,

!k

-----Original Message-----
From: Tom Chiverton [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 07, 2008 3:24 AM
To: CF-Talk
Subject: Get RemoteObject from Flex to Railo to work :-(

[xposted from railo-talk because no one there seems to have the answers]

I've got the latest released Railo Comunity edition, with bundled Resin,
using 
mod_caucho to run everything through Apache 2.2 on Ubuntu linux.

I've set up what seems like a dead simple test.
t.cfc has one remote method, get(), that createObject()'s an item.cfc which 
has two cfproperty tags, and sets this.propertyName outside any method to 
defaults:
    <cfcomponent>
        <cffunction name="get" access="remote">
            <cfreturn createObject('component','item')>
I can call t.cfc from a CFM page fine:
        <cfset serv=createObject('component','t')>
        <cfdump var="#serv.get()#">
and it all works as expected.

So, I come to use this with RemoteObject from a Flex application.
There's no documentation for where things live in the Railo world, but I 
eventually stumble across a servlet called AMFGateway that maps to 
the '/flashservices/gateway' path, so figure that must be the endpointURI.
Still no joy, I get some sort of 'unknown or unsupported' error from an 
OpenAMF class.

More googling reveals that OpenAMF until recently didn't do AMF3 (the Flex 
default), so I guess the version of OpenAMF that comes with Railo is out of 
date.
So, I have to take special steps in my Flex client to use AMF0, via 
renaun.com's RemoteObjectAMF0:
    <rpc:RemoteObjectAMF0 
        endpoint="http://dev.buyme.it/flashservices/gateway";
        id="oService"
        source="t"
        showBusyCursor="true"
        makeObjectsBindable="true"
        result="result( event )"
        fault="fault( event )">

This still doesn't work as I get a weird WDDXConvertor error (WDDX ? *eh* ?)

when I call 'oService.get()'.
==> /opt/railo/log/jvm-default.log <==
- Deserializing Message, for more info turn on debug level
Wed Mar 05 19:13:30 GMT 2008-479 Release: (1)
Wed Mar 05 19:13:31 GMT 2008-56 Call:/t.cfc (1)
Wed Mar 05 19:13:31 GMT 2008-340 Release: (1)
railo.runtime.converter.ConverterException
        at railo.runtime.converter.WDDXConverter.int(Unknown Source)
        at railo.runtime.converter.WDDXConverter.try(Unknown Source)
        at railo.runtime.converter.WDDXConverter.deserialize(Unknown Source)
        at railo.runtime.engine.AMFEngine.a(Unknown Source)
        at railo.runtime.engine.AMFEngine.a(Unknown Source)
        at railo.runtime.engine.AMFEngine.service(Unknown Source)
        at railo.runtime.engine.CFMLEngineImpl.serviceAMF(Unknown Source)
        at railo.loader.servlet.AMFServlet.service(AMFServlet.java:32)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:91)
        at 
com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.ja
va:103)
        at 
com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:1
75)
        at 
com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:
240)
        at 
com.caucho.server.hmux.HmuxRequest.handleRequest(HmuxRequest.java:424)
        at com.caucho.server.port.TcpConnection.run(TcpConnection.java:481)
        at com.caucho.util.ThreadPool$Item.runTasks(ThreadPool.java:685)
        at com.caucho.util.ThreadPool$Item.run(ThreadPool.java:607)
        at java.lang.Thread.run(Thread.java:595)
- Serializing Message, for more info turn on debug level
-----------------------

I'm getting slightly frustrated with this, but at least it's progress I 
suppose.

Has anyone got this setup (Flex RemoteObject to CFC) working ? I can share
the 
full ready to compile Flex and CFML code I'm using on request, as I plan to 
write a full article on this once it's working. 
If you've got a working example of code for both ends, please let me know.

So, questions:
1) How do I 'turn on debug level' for 'Deserializing Message' ?
2) When will the OpenAMF in Railo be updated to support AMF3 ?
3) Am I even using the right settings (i.e. endpoint URI) in my Flex 
application ?

-- 
Tom Chiverton

****************************************************

This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at

Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A
list 
of members is available for inspection at the registered office. Any 
reference to a partner in relation to Halliwells LLP means a member of 
Halliwells LLP.  Regulated by The Solicitors Regulation Authority.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may

be confidential or legally privileged.  If you are not the addressee you
must 
not read it and must not use any information contained in nor copy it nor 
inform any person other than Halliwells LLP or the addressee of its
existence 
or contents.  If you have received this email in error please delete it and 
notify Halliwells LLP IT Department on 0870 365 2500.

For more information about Halliwells LLP visit www.halliwells.com.


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/railo_talk/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/railo_talk/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

-------------------------------------------------------

-- 
Tom Chiverton

****************************************************

This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and
Wales under registered number OC307980 whose registered office address is at
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A
list of members is available for inspection at the registered office. Any
reference to a partner in relation to Halliwells LLP means a member of
Halliwells LLP.  Regulated by The Solicitors Regulation Authority.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may
be confidential or legally privileged.  If you are not the addressee you
must not read it and must not use any information contained in nor copy it
nor inform any person other than Halliwells LLP or the addressee of its
existence or contents.  If you have received this email in error please
delete it and notify Halliwells LLP IT Department on 0870 365 2500.

For more information about Halliwells LLP visit www.halliwells.com.



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300749
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to