Flex + BlazeDS + Multi module maven project -


i've got multi module maven project (about 10 modules) 2 of modules flex project , corresponding server project, communicating via blazeds.

the server module dependent on module containing common things, shared on whole project. when using objects common module, objects aren't serialized , sent via amf swf. in server-module serialized , working fine, objects common module (which has valid values on server side) not sent client.

i'm using flexmojos build this. have make classes in common project available serialization, , being able use them remoteclass-objects in swf-project?

the basic structure similar (i've tried simplify quite bit):

swf-module (flex):

class myobject.as:

package swf.model {      [remoteclass(alias="server.model.myobject")]     public class myobject {         public var name:string;         public var common:mycommonobject;     } } 

class mycommonobject.as:

package swf.model {      [remoteclass(alias="common.model.mycommonobject")]     public class mycommonobject {         public var commonnumber:number;    } } 

server-module (java):

class myobject.java:

package server.model;  import common.model.mycommonobject;  public class myobject {     private string name;        private mycommonobject common;      public myobject() {}      public string getname() {         return name;     }     public void setname(string name) {         this.name = name;     }      public mycommonobject getcommon() {         return common;     }     public void setcommon(mycommonobject common) {         this.common= common;     } } 

common-module (java)

class mycommonobject.java:

package common.model;  public class mycommonobject{     private double commonnumber;      public mycommonobject() {}      public double getcommonnumber() {         return commonnumber;     }     public void setcommonnumber(double commonnumber) {         this.commonnumber= commonnumber;     } } 

java server side dtos , actionscript client dtos independent. mean following. when blazeds services return amf-serialized dtos binary structure described amf format. , amf transfer data contains full classpath describe on client side using remoteclass metadata. in way client flex project , java server project haven't dependencies on each other in process of building. can build them produce same war contains both client , server part.


Comments