My application is suffering from the following error.
[RPC Fault faultString="Cannot invoke method 'putOrder'." faultCode="Server.ResourceUnavailable" faultDetail="The expected argument types are (<java type>) but the supplied types were (flex.messaging.io.amf.ASObject) and converted to (null).
I haven't found a lot of information on this error except that it may have something to do with the types not matching exactly and that the object type will default to ASObject if it's not 'strongly typed'
here's my OrderVO.as:
package nh
{
import mx.collections.ArrayCollection;
[Bindable]
[RemoteClass(alias="nh.Order")]
public class OrderVO
{
public var orderId:int;
public var custId:int;
public var customerName:String;
public var invAddr:Address;
public var delAddr:Address;
public var status:String;
public var delCharge:Number;
[ArrayElementType(OrderLine)]
public var orderLines:Array;
}
}
and my java class on the server :
package nh;
import java.io.Serializable;
public class Order implements Serializable {
static final long serialVersionUID = 103844514947365244L;
private int orderId;
private int custId;
private String customerName;
private Address invAddr;
private Address delAddr;
private String status;
private float delCharge;
private OrderLine[] orderLines;
public Order (){
}
...........
getter and setter methods
}
[RPC Fault faultString="Cannot invoke method 'putOrder'." faultCode="Server.ResourceUnavailable" faultDetail="The expected argument types are (<java type>) but the supplied types were (flex.messaging.io.amf.ASObject) and converted to (null).
I haven't found a lot of information on this error except that it may have something to do with the types not matching exactly and that the object type will default to ASObject if it's not 'strongly typed'
here's my OrderVO.as:
package nh
{
import mx.collections.ArrayCollection;
[Bindable]
[RemoteClass(alias="nh.Order")]
public class OrderVO
{
public var orderId:int;
public var custId:int;
public var customerName:String;
public var invAddr:Address;
public var delAddr:Address;
public var status:String;
public var delCharge:Number;
[ArrayElementType(OrderLine)]
public var orderLines:Array;
}
}
and my java class on the server :
package nh;
import java.io.Serializable;
public class Order implements Serializable {
static final long serialVersionUID = 103844514947365244L;
private int orderId;
private int custId;
private String customerName;
private Address invAddr;
private Address delAddr;
private String status;
private float delCharge;
private OrderLine[] orderLines;
public Order (){
}
...........
getter and setter methods
}