Wednesday, 2 October 2013

XSL Transformation with SOAP header: In AIF MS Dynamics AX 2009


The design approach mentioned in this blog helps to overcome the limitation of the in AIF AX 2009.

Scenario:

Working with an AIF Inbound Integration, where in the XML file has to be transformed to the AX Schema with the AIF SOAP header information embedded in the AX XML.

The AIF SOAP header is an important information for identifying the Endpoint and other Service related information.

-          3rd party XML file

-          AIF AX 2009

-          Inbound direction to AX

-          XSL transformation

-          AX XML to contain the AIF SOAP Header information

This feature by default is not supported in product MS Dynamics AX 2009.

This is addressed in AX 2012 but this has to be customized to accommodate in AX 2009.



Solution:

The above scenario can be achieved by transforming the XML file and inserting AIF SOAP header information in the adaptor classes, before it gets inserted in the AIF Queue manager.



Steps to achieve the solution:

1.       Create a check box on the AIF Channel table to identify this type of integration scenario. This checkbox will be ticked.
 

 
 
 
2.       Create a Boolean Parm method on the Adaptor class to identify this integration. You can us the standard adaptors like AifFileSystemReceiveAdapter or create your custom adaptor.
3.       Write code on the AIFReceiveInbound Processchannel method to set the parm method in the Adaptor class if the new checkbox field on the AIFChannel is ticked.
 
4.       Modify the AifFileSystemReceiveAdapter.readfile() method on the adaptor class to do the below
a.       Transform the XML. This can be done by various methods like calling the .net class XSLTransform or by using external tools in AX.
b.      Insert the required AIF header information like the <SourceEndPoint> in the XML.
 
 
Please let me know your feedback / questions.
 Cheers,
Nikhil Pavagadhi

 
 

 





 

1 comment: