web-servicesaxaptadynamics-ax-2012x++aif

How should I log External Web Services called from X++


I’ve followed the standard tutorials to create an external web service reference. My calls contain transactional data and logging is imperative. I’d like to know what sort of logging I should employ when making these external calls. I’d really love to have these calls appear in-line with standard AIF document history & exceptions, but I don’t think that’s easily feasible. I also can’t find the SOAP request and response generated by my external service reference, making the logging even trickier. I’ve thought about creating a custom outbound adapter, but I’m not sure if that’s the right approach. Just want to see what the professionals recommend.

https://technet.microsoft.com/en-ca/library/hh500185.aspx

http://daxmusings.codecrib.com/2011/10/consuming-external-webservices-in-ax.html


Solution

  • The best way that we've found so far is to create a logging table in AX. Saving serialized requests, responses, URLs and errors right into AX. We've included other descriptors as well so it's useful anywhere external web services are called. Provide a form for your front end, and consider a batch job to purge old records.