开发者

RemoteClass issue between Flex and Java

开发者 https://www.devze.com 2023-03-03 18:37 出处:网络
In flex 开发者_如何学JAVAI have a class \'MapDrawingPoint\', in one of my mxml files I create ArrayCollection and fill it with MapDrawingPoint instances.

In flex 开发者_如何学JAVAI have a class 'MapDrawingPoint', in one of my mxml files I create ArrayCollection and fill it with MapDrawingPoint instances.

var mapDrawingPoints : ArrayCollection = new ArrayCollection();
...
mapDrawingPoints.addItem(MapDrawingPoint);

Then I do a remote call to my Java backend with the list of objects, in debug mode I can see that I'm coming in my Java method but the expected ArrayList as input is a flex.messaging.io.ArrayCollection with the exact amount of elements but not of type MapDrawingPoint but of type flex.messaging.io.amf.ASObject.

On the Java class MapDrawingPoint I did nothing special, I just made sure I have the right properties there. Same for the AS class I created, it has the same properties as my Java class but I added the bindable- and remoteclass tag:

package model {
[Bindable]
[RemoteClass(alias="com.mycompany.model.MapDrawingPoint")]
public class MapDrawingPoint {
...

I'm using BlazeDS for the remoting on a backend server running Tomcat with Spring (and also spring-flex) configured...

Does anyone of you have any idea what I'm doing wrong?


I suppose the problem is in line:

mapDrawingPoints.addItem(MapDrawingPoint);

where you're adding instances of Class (classes itself) but not instances of MapDrawingPoint.

0

精彩评论

暂无评论...
验证码 换一张
取 消