AX Integration

Hello all,

the situation is as follow:

  • I am running AX 2012 R2
  • I have VS 2010 in which i have a webservice application, this webservice application should talk with the AX CustomerService.
  • I have created an inbound port called CustomerService in AX 2912 r2
  • My webservice application should be able to use CustomerService. and also to use all ax definition in customerService.

When i add CustomerService as a webservice to the project i cant use it. It won’t show in the intellisense of the project.

When i add CustomerServica as a service reference, 52 error is generated concerning the added service reference (when trying this on a windows application, everything went normally and I can use the full definition from intellisens, I can even create a customer.

Any ideas? i need to use this component and start creating customers in AX from within my webservice.

Best Regards…

What are the errors about? A missing assembly reference? Can you provide an example?

What exactly is the type of VS project? I tried to add a reference to AxClient service to an ASP.NET Web Application and it compiles without issues.

Hello Martin Again,

I created an ASP .net Empty Website. I am trying to use an AX Service that I create that uses the following CRUD Functionalities on Customers.

I am not able to add it as a service reference but not able to buil the website. It is giving me 52 errors, like the following :The type name ‘CustomerServiceUpdateRequest’ does not exist in the type ‘CustomerService.CustomerService’ c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\integration\8e8bb2db\a6d45a34\App_WebReferences.2ya7g_vl.0.cs

I am being able to add it as a webservice but i can’t use it in my classes (not there in the intellisenese)

can you provide me how u added AxClient to an ASP .net web application?

Thank you Martin…

I just created a new “ASP.NET Web Application” project, added the service reference to AxClient and built the solution - no magic at all. Try the same - if it doesn’t work for AxClient either, you’ll know that the problem is not in your service but somewhere else, probably in how you create your applications.

By the way, what’s the target framework of your application?

I will try that, just checking the installation of VS2010 with SP1 and that AX Webservices are installed.

The target framework is 4.0 why is it wrong?

Hello Martin,

please note my below step:

  • Created an ASP. Net WebService Application (VS 2010 SP1) with target framewoek 3.0

  • Added a custom service to my project (I created this custom service with the custCustomerService functionalities (create, read, update, delete…)

  • After Building the WebSite i got 16 Errors (regardless the target framework - i changed it between 3.0 3.5 and 4)
    Error as below:
    The type or namespace name ‘AxdEntity_CustTable’ could not be found (are you missing a using directive or an assembly reference?)

The type or namespace name ‘AxdCustomer’ could not be found (are you missing a using directive or an assembly reference?)

the above error is happening on a certain class where i am trying to create a customer. The code is as follow:

CustomerServiceClient proxy = new CustomerServiceClient();

CallContext context = new CallContext();

context.Company = “ceu”;

AxdCustomer customer = new AxdCustomer();

AxdEntity_CustTable custTable = new AxdEntity_CustTable();

custTable.AccountNum = “998899”;

custTable.Currency = “USD”;

custTable.CustGroup = “20”;

custTable.OneTimeCustomer = AxdExtType_OneTimeCustomer.Yes;

custTable.OneTimeCustomerSpecified = true;

//Create the party record

AxdEntity_DirParty_DirPerson party = new AxdEntity_DirParty_DirPerson();

party.NameAlias = “Jhon”;

//Set the name fields

AxdEntity_PersonName personName = new AxdEntity_PersonName();

personName.FirstName = “John”;

personName.LastName = “Longhorn”;

//Add the names to the party record and set the name sequence

party.PersonName = new AxdEntity_PersonName[1] { personName };

party.NameSequence = “FirstLast”;

//Add the addresses to the party record and the party to the CustTable record

custTable.DirParty = new AxdEntity_DirParty_DirPartyTable[1] { party };

//Add the CustTable record to the Customer entity

customer.CustTable = new AxdEntity_CustTable[1] { custTable };

//Create the customer

proxy.create(context, customer);


catch (Exception ex)


Console.WriteLine(“Error encountered: {0}”, ex.Message);

// Take other error action as needed.


I am having the above errors on all AxdEntity, CallContext and CustomerServiceClient (my added webservice is called CustomerService)

Please advise…

Sorry, I can’t debug code that I don’t have available. You have to do by yourself.

The error The type or namespace name ‘AxdEntity_CustTable’ could not be found (are you missing a using directive or an assembly reference?) says that that it can’t find AxdEntity_CustTable type - check whether the assembly is referenced and the type is in scope. You can compare it with the Windows application that, as you said, works for you.

My question about target framework meant that an assembly may haven’t been load because of wrong framework version. Full .NET 4.0 should be all right.