Dynamics AX: Error: ‘YourDataContract.aMethod’ is not a valid data member

February 14, 2014 at 19:57
filed under Dynamics AX
Tagged , , , ,

When activation an integration port, you can receive the following error:

The service ‘YourService’ could not be generated.\n Error: ‘YourDataContract.aMethod’ is not a valid data member

The problem is with declaration of the data member YourDataContract.aMethod. This method declaration could look like this:

[DataMemberAttribute]
public Description parmDescription(str _description = description)

As you can see, the type of the return value is Description but the type of the parameter is str. These types should be the same as shown in the following example:

[DataMemberAttribute]
public Description parmDescription(Description _description = description)

Compile CIL after your made the change and redeploy your integration port, and the error should be solved.

1 comment

RSS / trackback

  1. Balog Gergely

    Thanks a lot!
    I had the exact same issue, and was stumped for quite some time!

respond