AX 2012 R2 useless AIF error message

This question is answered

Hi,

I have created my own document service totally based on custom tables. Then I created an inbound port using the FileSystemAdapter pointing to a directory on the AOS.

Now I can put an XML into this directory and let the AIF pick it up.

I now have the message in the AIF message queue:

Direction: Inbound

Status: Error

Error message: Function 'Global::typeId2ExtendedTypeId' must be called with an extended data type.

Stack trace

\Classes\AifWcfSendAdapter\sendMessage                                   line 65

\Classes\AifGatewaySendService\sendMessage                           line 34

\Classes\AifRequestProcessor\callAosServiceOperation             line 62

\Classes\AifRequestProcessor\processRequest                           line 32

\Classes\AifInboundProcessingService\processRequest            line 34

...

Line 65 of AifWcfSendAdapter.sendMessage():

responseMessage = wcfClient.ProcessRequest(requestMessage, configFilePath, endpointConfigurationName, addressOverride, throwOnFaultResponse);

wcfClient is of type Microsoft.Dynamics.IntegrationFramework.Adapter.WcfClient

So, something goes wrong in there.

Has anybody faced the same error and found a solution?

Thanks in advance,

Andy

Verified Answer
  • Yeah. I got it. Thanks to the guys in this thread: community.dynamics.com/.../199013.aspx I tried Net Reflector (trial version) to find the cause of the problem.

    There was an error in an upgraded method (wrong usage of extendedtypenum() / extendedtypeid()). Never would have thought about this one...

All Replies
  • Either the WCF binding is flawed or incomplete, or the CIL is not compiled completely.

    Make sure the WCF binding configuration is updated and refreshed and make sure CIL is compiled.

    Tommy Skaue | Dynamics AX Developer from Norway | http://yetanotherdynamicsaxblog.blogspot.no/ | www.axdata.no

  • Tanks for the answer.

    - I did a complete CIL generation

    - how do I ensure the WCF binding config is updated/refreshed?

  • If you are using a client dependent on the bindings in your Local Dynamics Configuration, it would be a matter of opening Administrative Tools\Microsoft Dynamics AX 2012 Configuration, open the Connection Tab and hit Refresh. If it is disabled, simply create a new user defined connection setting.

    If you are dependent on the Business Connector, you would do the similar operation but switch Configuration Target in the same utility.

    If this is Visual Studio project, you could try to reload the Service Reference.

    Tommy Skaue | Dynamics AX Developer from Norway | http://yetanotherdynamicsaxblog.blogspot.no/ | www.axdata.no

  • Ok, tried that too. Didn't help.

    But thanks for your suggestions.

  • Are the fields in these custom tables all actually defined with Extended Data Types?

    Tommy Skaue | Dynamics AX Developer from Norway | http://yetanotherdynamicsaxblog.blogspot.no/ | www.axdata.no

  • Yes they are. I also checked / changed the Ax- and Axd-classes.

    Well I guess I'll open a support call.

  • Yeah. I got it. Thanks to the guys in this thread: community.dynamics.com/.../199013.aspx I tried Net Reflector (trial version) to find the cause of the problem.

    There was an error in an upgraded method (wrong usage of extendedtypenum() / extendedtypeid()). Never would have thought about this one...

  • The compilation process did not flag this error?

    My next suggestion to you would be to make sure the WCF-bindings were refreshed.

    You would have to do the same if for instance the AOS Service Account was changed.

    There is a a guide here:

    technet.microsoft.com/.../87aaf2fa-1190-4036-9d39-c1252c48da88(AX.60).aspx

    Tommy Skaue | Dynamics AX Developer from Norway | http://yetanotherdynamicsaxblog.blogspot.no/ | www.axdata.no