• About
  • D365 Consulting
  • Technical Services
  • D365 Integration
  • D365 Upgrade
  • Blog
  • Contact
  • About
  • D365 Consulting
  • Technical Services
  • D365 Integration
  • D365 Upgrade
  • Blog
  • Contact
Tag:

Integration

Browse: Home / Blog / Integration
07Apr2016

AIF Error – ContractFilter mismatch at the EndpointDispatcher

by Wolftek in AIF, AX2012, Integration, Services
Tags: AIF, AX2012 R3, Integration

If you’re seeing this error when consuming an AIF service, the reason may be that changes were made to the service object in the AOT, without regenerating the incremental CIL and reactivating the inbound port.

In our case, one of the developers changed the namespace of the service in the AOT from the default ‘http://tempuri.org’ to ‘http://schemas.microsoft.com/dynamics/2011/01/services.’ The service was refreshed in the ‘Services’ form, and the inbound test file was updated with the correct namespace. However, since the Inbound Port wasn’t reactivated, the service endpoint (in our case the client used a File System Adapter), was still deployed with the old namespace, resulting in the error below. Reactivating the port (and Incremental CIL) updates the endpoint with the proper namespace and resolves the issue.

The request failed with the following error: The message with Action ‘http://schemas.microsoft.com/dynamics/2008/01/services/<Service>/<Action> cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver. Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None).
View the exception log for more details.

12Nov2015

AIF Sales order document service – XML Mystery

by Wolftek in AIF, Integration
Tags: AIF, Integration

 

We were asked to troubleshoot an interesting issue. The client was generating the sales order confirmation documents, leveraging the standard AIF SalesOrder service. The generated XML document contained incongruent data. The Header section, driven by the SalesTable data, contained information from an entirely different sales order, than the one being confirmed. The Lines section, on the other hand, was absolutely correct – information coming from the correct sales order.

The simplified XML looked as follows. Note the SalesId in the Header section (A) is not the same as the SalesId in the Lines section (B). The actual sales order being confirmed was B– the SalesId in the Lines section.

 

I’m sure you would agree that this picture is bizarre, to say the least. The AIFCorrelation also ended up being skewed. While the document history indicated that the document belonged to the correct SalesId B, the actual correlation was pointing to the incorrect SalesId A.

What this turned out to be was an incorrect customization added to the axSalesTable class. The developer added a new field to the document, by extending the class with a new parm method. Unfortunately, he had made the mistake of creating an inner join between the table from which he wanted to pull the value and the salesTable, and did so using the axSalesTable’s global table buffer variable salesTable – the buffer that drives all of the information in the Header section of the document, when the object is serialized into XML! The inner join resulted in a selection of an entirely different salesTable record and reset the salesTable buffer!

 

 

 

Mystery solved J

 

02Sep2015

DIXF ODBC Source Automation – AX2012 R3

by Wolftek in AX2012
Tags: AX2012 R3, DIXF, Integration

 

The AX2012 R3 version of DIXF has introduced automation for file based integrations. It is now possible to configure a periodic processing to monitor a directory for incoming files and to import them into the DIXF staging tables. Furthermore, the ‘Execute Target Step’ setting on the definition group execution, allows the source-to-staging process to also execute the staging-to-target logic. This turns DIXF into a rounded solution, which supports full end-to-end source to target scenarios out of the box. Add to all this the excellent staging and tracking capabilities, and this turns DIXF into an excellent candidate for integrations, rivaling in many respects the AIF framework.

The automation functionality described above had to be custom coded in the previous versions of AX – see the following blog for example.

What is still missing from this version of DIXF, however, is the automation capabilities for other sources, such as ODBC. That is, if you’re reading the source data from SQL, for example, you’re still unable to execute the import steps in a Periodic batch job.

If you do need to implement such automation, have a look at the following script for inspiration.

static void DIXF_Automation_ODBC(Args _args)

{

    DMFDefinitionGroupEntity entity = DMFDefinitionGroupEntity::find(‘<Processing Group>’, ‘<Entity>’);

    DMFStagingWriterContract contract = new DMFStagingWriterContract();

    DMFStagingWriterService service;

    contract.parmExecutionID(‘wolftek1’); //todo: get from num seq

    contract.parmDefinationGroupName(Entity.DefinitionGroup);

    contract.parmEntityNameList(Entity.Entity);

    contract.parmFilePath(entity.QueryForODBC);

    contract.parmRunInBatch(true);

    contract.parmExecuteTargetStep(true);

    service = new DMFStagingWriterService();

    service.executeService(contract);

}

28Aug2015

AIF Error – Return type void is not supported

by Wolftek in AIF
Tags: Integration

Wanted to mention this briefly, in hope that it may save someone some headaches.

In case you are seeing the following error in the AIF Exception log: “Return type void is not supported,” followed by “Unsupported type,” there may be a compilation issue with one of the axBc classes of the service.

02Dec2013

SharePoint 2013 – Issue Consuming AX Services

by Wolftek in AIF, AX2012, Services
Tags: AIF, Integration

Received the following error when consuming a custom AIF service, over Net.Tcp, from SharePoint 2013 :

The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was ’00:59:59.9780837′.

We had successfully consumed the service from other clients, such as a test VS project, ASP.NET page, as well as from the SharePoint’s timer job. The issue occurred only when making the call to the service when executed by the interactive SharePoint users. Turns out this has something to do with the user context/privileges. The solution was to force the SharePoint to execute the call under its application pool’s identity. Wrap the call to the service in SPSecurity.RunWithElevatedPrivileges:

SPSecurity.RunWithElevatedPrivileges(() =>
new
<AXServiceClient>().<AXServiceOperation>());

Recent Posts

  • Wolftek - D365FO Integration
    Power Platform connections to D365 and AAD Tokens

    In this short post we wanted to offer some clarifications…

  • Power Apps – Code Reuse

    Yes, we know. No self-respecting D365 developer can stand the…

  • Power Apps – The Three Flavors of D365 Connections

    There are many different ways to connect Power Apps to…

  • AIF Error – ContractFilter mismatch at the EndpointDispatcher

    If you’re seeing this error when consuming an AIF service,…

  • Wolftek.Dynamics.AX
    DIXF Crash – Decimals in CSV Source files

    We have noted an issue with the DIXF *.CSV source…

Categories

  • AIF
  • AIF
  • AX2012
  • Configuration
  • Deployment
  • DIXF
  • Dynamics 365 F&O
  • Integration
  • Integration
  • Power Apps
  • Production
  • Services
  • SSRS
  • TFS
  • Uncategorized
  • Upgrade

Add some widgets to this area!

  • About
  • D365 Consulting
  • Technical Services
  • D365 Integration
  • D365 Upgrade
  • Blog
  • Contact

© 2022 Wolftek, Inc.