Hi Carlos, Yes, I'm using AMF0, I'm using Renaun Erickson’s RemoteObjectAMF0 class. I have tested it with AMFPHP and it worked, so that part should be ok. <http://renaun.com/blog/?p=31> I have read more docs, and I found that for class mappings I should use AdvancedGateway instead of DefaultGateway, but I haven't manage to write a proper openamf-config.xml yet.
Thanks Andi Carlos Rovira wrote: > Hi Andrea, > > The problem was solved in last beta (FP9 beta3), so you can pass VOs > from AS to Java and from Java to AS. > > Your code looks ok, for me but the logs says something is happen, > maybe...are you using AMF0?, remember that in FP9 default is AMF3. > > > On 6/2/06, *Andrea Varga* <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > Hi > > I have been trying to set up a project using Java, OpenAMF, Tomcat, > Flex2B2 and Cairngorm. > I'm kinda new to OpenAMF andTomcat (and usually to application > servers) > and I have found the docs confusing. > Finally i managed to get the remoting working. > I can call my services, and get back the result, but I am having > problems with my VO class mappings in both directions (if I send > Strings, everything works fine) > I have read in previous posts, that mapping from Java to AS was not > working in Flash Player 8.5 (but should work from AS to Java), but I > couldn't find anything about Flash Player 9. > Actually, I have found this in Carlos Rovira's blog: "El problema de > mapeo de clases de Java hacia ActionScript está resuelto en el nuevo > *Flash Player 9 Beta"*. Unfortunatelly, I don't understand > spanish, but > it's close to romanian, does that mean that the problem has been > solved > in Flash Player 9 or the opposite ? :) > > I have a LoginVO class: > Java code: > ----------- > package com.spindevelopment.model.vo; > > public class LoginVO { > public String username; > public String password; > > public LoginVO() { > } > } > > AS code: > --------- > package com.spindevelopment.model.vo { > > import org.nevis.cairngorm.vo.ValueObject; > [RemoteClass(alias="com.spindevelopment.model.vo.LoginVO")] > [Bindable] > public class LoginVO implements ValueObject { > public var username:String; > public var password:String; > } > } > > In openamf-congid.xml I added this: > <custom-class-mapping> > <java-class>com.spindevelopment.model.vo.LoginVO</java-class> > <custom-class>com.spindevelopment.model.vo.LoginVO</custom-class> > </custom-class-mapping> > > In my java service class, I have a simple test method, where I > return a > String with the 2 properties of LoginVO: > > public String doLogin(LoginVO pLogin ) { > return new String("un: " + pLogin.username + ", pass: > "+pLogin.password); > } > > The returned string is: "un: null, pass: null"; > > Here is my Tomcat log: > > 02.06.2006 15:54:45 org.openamf.io.AMFDeserializer <init> > INFO: Deserializing Message, for more info turn on debug level > 02.06.2006 15:54:45 org.openamf.DefaultGateway service > INFO: REQUEST: > [AMFBody: {serviceName=com.spindevelopment.services.Login, > serviceMethodName=doLogin, response=/1, type=ARRAY, > value=[ASObject[type=com.spindevelopment.model.vo.LoginVO]]}] > > 02.06.2006 15:54:46 org.openamf.invoker.JavaServiceInvoker > getServiceMethod > INFO: topRankedMethod: name=doLogin rank=100.0 > 02.06.2006 15:54:46 org.openamf.DefaultGateway service > INFO: RESPONSE: > [AMFBody: {serviceName=null, serviceMethodName=null, response=null, > type=UNKNOWN, value=un: null, pass: null}] > > > Could somebody point me in the right direction? > > Thanks > > Andi > > > -- > Flexcoders Mailing List > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > Search Archives: > http://www.mail-archive.com/flexcoders%40yahoogroups.com > > > > SPONSORED LINKS > Web site design development > > <http://groups.yahoo.com/gads?t=ms&k=Web+site+design+development&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=L-4QTvxB_quFDtMyhrQaHQ> > Computer software development > > <http://groups.yahoo.com/gads?t=ms&k=Computer+software+development&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=lvQjSRfQDfWudJSe1lLjHw> > Software design and development > > <http://groups.yahoo.com/gads?t=ms&k=Software+design+and+development&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=1pMBCdo3DsJbuU9AEmO1oQ> > > Macromedia flex > > <http://groups.yahoo.com/gads?t=ms&k=Macromedia+flex&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=OO6nPIrz7_EpZI36cYzBjw> > Software development best practice > > <http://groups.yahoo.com/gads?t=ms&k=Software+development+best+practice&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=f89quyyulIDsnABLD6IXIw> > > > > ------------------------------------------------------------------------ > YAHOO! GROUPS LINKS > > * Visit your group "flexcoders > <http://groups.yahoo.com/group/flexcoders>" on the web. > * To unsubscribe from this group, send an email to: > [EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> > * Your use of Yahoo! Groups is subject to the Yahoo! Terms of > Service <http://docs.yahoo.com/info/terms/> . > > > ------------------------------------------------------------------------ > > > > > -- > ::| Carlos Rovira > ::| http://www.carlosrovira.com > > -- > Flexcoders Mailing List > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com > > > > SPONSORED LINKS > Web site design development > <http://groups.yahoo.com/gads?t=ms&k=Web+site+design+development&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=L-4QTvxB_quFDtMyhrQaHQ> > > Computer software development > <http://groups.yahoo.com/gads?t=ms&k=Computer+software+development&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=lvQjSRfQDfWudJSe1lLjHw> > > Software design and development > <http://groups.yahoo.com/gads?t=ms&k=Software+design+and+development&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=1pMBCdo3DsJbuU9AEmO1oQ> > > > Macromedia flex > <http://groups.yahoo.com/gads?t=ms&k=Macromedia+flex&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=OO6nPIrz7_EpZI36cYzBjw> > > Software development best practice > <http://groups.yahoo.com/gads?t=ms&k=Software+development+best+practice&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=f89quyyulIDsnABLD6IXIw> > > > > > ------------------------------------------------------------------------ > YAHOO! GROUPS LINKS > > * Visit your group "flexcoders > <http://groups.yahoo.com/group/flexcoders>" on the web. > * To unsubscribe from this group, send an email to: > [EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> > * Your use of Yahoo! Groups is subject to the Yahoo! Terms of > Service <http://docs.yahoo.com/info/terms/>. > > > ------------------------------------------------------------------------ > -- Andrea Varga Managing Partner / Project Manager Certified Macromedia Flash MX 2004 Developer -- Spin Development Srl Tel: +44 207 043 1304 Fax: +44 207 681 1376 Skype ID: vargaandrea Mon-Fri : 8 AM - 5 PM GMT+2 Saturday: 8 AM - 4 PM GMT+2 (Support only) ------------------------------------------ ------------------------ Yahoo! Groups Sponsor --------------------~--> Home is just a click away. Make Yahoo! your home page now. http://us.click.yahoo.com/DHchtC/3FxNAA/yQLSAA/nhFolB/TM --------------------------------------------------------------------~-> -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> 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/