0

I have a class with this structure class A { List Blist; }

Class B
{
   int i;
}

I need my AIF web service operation to accept a single object A that may have multiple instances of B in it. I get an error when i try to deploy the service.

Do i need to explicitly specify AifCollectionTypeAttribute for B in the operation method even though B is contained in A?

kunal
  • 21
  • 6

1 Answers1

0

You have to use AifCollectionTypeAttribute('return') and type.

Example:

[
    DataMemberAttribute('AttributeValues'),
    AifCollectionTypeAttribute('return', Types::Class, classStr(AttributeValueDC)),
    AifCollectionTypeAttribute('attributeValues', Types::Class, classStr(AttributeValueDC))
]
public List parmAttributeValues(List _attributeValues = attributeValues)
{
    attributeValues = _attributeValues;

    return attributeValues;
}
Matej
  • 7,517
  • 2
  • 36
  • 45