Hi,
I have to consume external web service from AX 2012. I have an wsdl URL so I add Service reference to my class library project in visual studio, compile and deploy the assembly to AX. Visual studio creates a proxy classes as expected. I wrote an AX job in which I create request to the web service. Everithing works fine. I have a response which consist of array of objects (from some type). My problem is that I can't find a way to iterate throughout these objects from the response.
I did the following:
MyResponseClass response; (has a member with my object's array)
MyObjects[] objArr;
MyObject obj;
int i;
response = request.get_Response();
objArr = response.get_MyObjects().
for (i = 0; i <= objArr.get_Length() - 1; i++) // there is an intelisence for get_Length() method
{
obj = objArr.get_Value(i);
}
When I execute the job I faced the following error:
get_Length() is not a member of MyObjets.
Is there any way to iterate throughout complex .net types in X++?
p.s.
If I do the same in Visual Studio I can iterate throughout MyObjects.
BR,
ist.