JAVA与FLEX通信问题,AMF传参出错
工程的前台是FLEX,后台是JAVA,界面设计是点击不同按钮内容显示区加载选项卡,相当于打开多个FLASH,当在第一个FLASH界面new过的JAVA映射对象,打开第二个FLASH界面时,如果有用到这个被new过的类进行传参后台,就报以下错误:
失败(mx.messaging.messages::ErrorMessage)#0
body = (null)
clientId = "BF93A324-620B-94F2-5810-9DE6C195745E"
correlationId = "2CAF119C-2287-D8AD-7B1D-CB65D7289DB6"
destination = "siteControl"
extendedData = (null)
faultCode = "Server.ResourceUnavailable"
faultDetail = "The expected argument types are (com.eic.sysconfig.site.model.Cons, int, int) but the supplied types were (flex.messaging.io.amf.ASObject, java.lang.Integer, java.lang.Integer) and converted to (null, null, null)."
faultString = "Cannot invoke method 'queryConsList'."
headers = (Object)#1
messageId = "BF93A449-5A0A-19CD-143F-7279D54E7DF5"
rootCause = (mx.messaging.messages::ErrorMessage)#2
body = (null)
clientId = (null)
correlationId = (null)
destination = (null)
extendedData = (null)
faultCode = "Client.Message.Deserialize.InvalidType"
faultDetail = (null)
faultString = "Cannot convert type flex.messaging.io.amf.ASObject with remote type specified as 'null' to an instance of class com.eic.sysconfig.site.model.Cons"
headers = (Object)#3
messageId = "BF93A449-5A18-89D7-D933-E04E833E6D90"
rootCause = (null)
timestamp = 1373507016698
timeToLive = 0
timestamp = 1373507016698
timeToLive = 0
JAVA映射对象代码:
package com.eic.sysconfig.site.vo
{
import com.adobe.cairngorm.vo.IValueObject;
import mx.collections.ArrayCollection;
[RemoteClass(alias="com.eic.sysconfig.site.model.Cons")]
public class Cons implements IValueObject
{
public var cons_id:int;
public var cons_no:String;
public var cons_name:String;
public var strcp:String;
public var cplist:ArrayCollection;
/**
* 选择框
*/
public var selected:Object;
}
}
望各位大大给些解决意见。