So dropping a Railo war on GlassFish and being up an running is easy but flashremoting dosn't work right away. As a flex developer this is a show stopper for me but lucky that's also easily solved.
Basically all that's needed is to add the MessageBrokerServlet and /flex2gateway mappings to the web.xml
You'll find the web.xml in the directory you deployed the application to in my case:
C:\glassfishv3\glassfish\domains\domain1\applications\railo\WEB-INF
Pasting the xml into my blog looked a little nasty so I used pastebin. You can see the WEB.xml after I added the additions here. You should have no issues copying all of this and pasting it into your web.xml over writing everything.
There is no need to re-deply Railo simple restart the application to pickup the changes.
To confirm the changes try ( in my case ) http://railolocal/flex2gateway if its a plain white page its good if it 404's then you might have made a typo.
Happy Flex (flash) remoting.
Railo Apache and Glassfish
ColdFusion 9 Apache and Glassfish





7 comments:
Hey Paul, when you get some time, can you please test HTTPService and WebService for me and see if they work correctly for you? I had little success with these a few months ago, so it was my showstopper. If its working properly under Glassfish....
I made a simple ws ie:
< cfcomponent name="test">
< cffunction name="showString" access="remote" returnType="string">
< cfreturn "Hello time is: #now()#">
< / cffunction>
< / cfcomponent>
http://railolocal/test.cfc?wsdl&method=showString
And it worked on both Railo and CF9 on GF the same as ColdFusion with jrun. Although the request appears to come from http://127.0.0.1:8080/railo I think what needs to happen is that GlassFish needs to be aware of the virtual domain aswell.
Also note that I used GlassFish v3 which is still in preview.
Thanks Paul, and you called those via Flex WebService and HTTPService? The problem I've experienced is cross domain issues. Sounds to me like you will have the same issue
Yes from flex I have yet to work out the issue and I think it's something to do with the crossdomain issue.
Once I dropped a allow all crossdomain.xml file it did get further but still got stuck at this: http://yfrog.com/6lcapturehej
Flexremoting worked fine though and hitting the cfc directly looks OK.
I do think this is just a configuration issue that were yet to uncover though. I doubt there is no way to fix this.
Ya, remoting worked great for me too, no issues there. Loved the speed. But the http/webservice issues I couldnt resolve.
Good Stuff Pauly
Post a Comment