When I use FlashBuilder to connect to a remote Java object using BlazeDS, FlashBuilder automatically creates a local valueObject matching the object in the remote server.
However, the package name of the remote object gets lost in translation.
Hence if I have two remote Java objects com.foo.A and com.bar.A, I won’t be able to distinguish between them in Flex. So I end up having to name my remote classes com.foo.AFoo, com.bar.ABar.
Is there a better way?
I don’t see why you you can’t used com.foo.A on the flex end as well as the java end. Personally, I think Flex project structure is very different from Java (for instance, Java likes to use DTO naming, while Flex uses Model) and this is why I use RemoteClass metadata to bind the Java DTO to a Flex model.