Custom Service wrong method parameter

Hi,

I have problem with Custom Service…

I created DataContract…


[DataContractAttribute]
public class TestContract
{
FieldName fieldName;
anytype value;
}

[DataMemberAttribute]
public FieldName fieldName(FieldName _fieldName = fieldName)
{
fieldName = _fieldName;
return fieldName;
}

[DataMemberAttribute]
public anytype value(anytype _value = value)
{
value = _value;
return value;
}


…added method to service…


[AifCollectionTypeAttribute(‘return’, Types::Class, classStr(TestContract)),
SysEntryPointAttribute(false)]
public List TestService()
{

List list = new list(Types::Class);

TestContract crm = new TestContract();
crm.fieldName("Field1");
crm.value("lalala");

list.addEnd(crm);

crm = new TestContract();
crm.fieldName("Field2");
crm.value(123);

list.addEnd(crm);

return list;

}


… but i get thah error:

“The service ‘AATestService’ could not be generated.\n Error: Method parameter can only be String, Date, DateTime, GUID, Integer, Int64, Real, Void, Array, List, Set And Map”

Can someone explain me what i do wrong ??

Thank you in advance!

You are using anyType parameter for value method. That could be causing the error, try by using one of the mentioned types(in the error).