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 Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to