Search This Blog

Tuesday, April 24, 2012

AX2012 AIF Register Custom Adapter

I have created a Custom adapter, I want to register this adapter to use in Inbound services.
So please open the AifInboundPort form and open the init Method you can see the following line of code where we will register the Adapters.

AifSetup::registerOutOfTheBoxAdapters();


So if you want to add the new custom adapter to the adapter list you have add to add as the following in the above line method.

Class AifSetup
static public void registerOutOfTheBoxAdapters()
{
    AifSetup::registerAdapter(classNum(AifWcfAdapter));
    AifSetup::registerAdapter(classNum(AifWcfNetTcpAdapter));
    AifSetup::registerAdapter(classNum(AifWcfHttpAdapter));
    AifSetup::registerAdapter(classNum(AifWcfMsmqAdapter));
    AifSetup::registerAdapter(classNum(AifFileSystemAdapter));
// My customer adapter registered
    AifSetup::registerAdapter(classNum(AifXMLTransformFileSystemAdapter));
}


In Ax2009 We have AIFAdapter form to register the custom adapters, but in AX2012 we dont have that form to register the adapter at configuration level.

1 comment:

  1. Thanks for the blog. This is good when you have the source for custom adapter. But what if the custom adapter is shipped in a axmodel file. For example I have a custom adapter being shipped inside a axmodel file and the model is installed in AX. Now how to register such adapters? please help.

    ReplyDelete

Thanks for visiting my blog,
I will reply for your comment within 48 hours.

Thanks,
krishna.