The following link contains simple examples for OData, Soap, and JSON. You may wish to change the code to match the patterns in this recipe as you use them:
- Microsoft / Dynamics-AX-Integration (https://github.com/Microsoft/Dynamics-AX-Integration/tree/master/ServiceSamples)
- Data management and integration through data entities (https://ax.help.dynamics.com/en/wiki/data-management-and-integration-through-data-entity/)
- OData (https://ax.help.dynamics.com/en/wiki/odata-in-dynamics-ax-7/)
- NuGet (http://www.nuget.org/)