HI
We Have multiple instance AX Server. I want transfer data between ax instances through AIF Services.
1- Created a Custom Services in AX1 and Consumed That service in Dot net Project and Add to AOT.
AIF Requires a list data as input parameter. below my code
CLRObject clientType;
List dtaheadlist = new List(Types::Class);
CLRObject ClrObject;
int integer;
str string;
System.Exception ex;
AXSERVICE.Creation.ACXHPWSSERVICEClient _client;
AXSERVICE.Creation.ACXHPWSSERVICE _service;
AXSERVICE.Creation.AcxDATACONTRACT[] Hdata;
AXSERVICE.Creation.AcxDATACONTRACT hdclass;
AXSERVICE.Creation.CallContext calcontext;
new InteropPermission(InteropKind::ClrInterop).assert();
try
{
clientType =CLRInterop::getType("AXSERVICE.InCreation.ACXHPWSSERVICEClient");
_client = AifUtil::CreateServiceClient(clientType);
hdclass = new AXSERVICE.Creation.AcxDATACONTRACT();
hdclass.set_TRANSFER("YES");
hdclass.set_LocationIdFrom("16001');
hdclass.set_RequestId("PR-0001233");
Hdata = new AXSERVICE.Creation.AcxDATACONTRACT[1]();
Hdata.Add(hdclass); // Here receiving ERROR please guide me this correct
result= _client.dataindentwithdetails(calcontext,Hdata);
}
}
catch(Exception::CLRError)
{
ex = CLRInterop::getLastException();
info(ex.ToString());
}
}
*This post is locked for comments