Usually whenever we start to test/debug AIF services , we are not able to proceed further because of input XML non-availability.Below job can be used to get the XML for any Service , just replace with correct service name .
static void GetXml(Args _args)
{
AxdSalesOrder salesOrder;
AifEntityKey key;
Map map;
XMLDocument xmlDoc;
XML XML;
AifPropertyBag bag;
FileName xmlFileName;
map = new Map(Types::Integer, Types::Container);
map.insert(fieldnum(SalesTable, SalesId), ['SO-101256']);
key = new AifEntityKey();
key.parmTableId(tablenum(SalesTable));
key.parmKeyDataMap(map);
try
{
salesOrder = new AxdSalesOrder();
xmlFileName=@'C:\SO.XML';
xml = salesOrder.read(key, null, new AifEndPointActionPolicyInfo(), new AifConstraintList(), bag);
new FileIoPermission(xmlFileName, 'rw').assert();
xmlDoc = XMLDocument::newXml(XML);
xmlDoc.save(xmlFileName);
CodeAccessPermission::revertAssert();
}
catch
{
throw error('Error in document service outbound');
}
}