web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

URL for consuming web services

(0) ShareShare
ReportReport
Posted on by 700

Hi folks,

I try to export customers from AX to external application (external webportal) with AIF services. I created a contract and a service classes guided by this walkthrough; https://www.dynamics101.com/creating-custom-inbound-aif-service-microsoft-dynamics-ax-2012/

The question is where I should put the URL with the customer services that client gave me?

http://www.customerwebsite.com/CustomerServices.svc

I tried to put the URl in the newly created inbound port in the field "URI" under Addresses. But when I try to activate it I get an error message.

Then I tried to put the URl in the WCF Test Client, but there as well I get an error message.

Also, the IIS is installed, but the Web services on IIS are not configured. Is it crucial to test the web service?

Thanks for help

[EDIT]

Also when I call Buttom "Data policies" from the Inbound port "myInboundPort" - >service Contract customizations to view the schema, I get an error "The deployment web site was not found for port: myInboundPort". I don't see any possibility to upload a schema even if I had one. Maybe it is relevant to the problem above. Thank you

*This post is locked for comments

I have the same question (0)
  • OrangeRocks Profile Picture
    700 on at

    About IIS and the Web services I found an answer: An exchange using outbound Web services (that is, sending a document from your installation to another system) requires an adapter and the Web services that reside on the receiving end of the transaction.

  • OrangeRocks Profile Picture
    700 on at

    Also I would like to add a possibility to send the customers to external application as soon as a record in customers gets updated. Where can I put this trigger?

  • Verified answer
    Mea_ Profile Picture
    60,286 on at

    I think you are mixing solution here. Example you followed explains how to expose a web services, so it could be consumed by 3rd party. However, you need to consume a web service, please follow documentation [View:https://technet.microsoft.com/en-us/library/hh500187.aspx] it shows how to build proxy classes and call them from x++.

    To trigger export during customer creation you need to manually add call to proxy classes in insert method of custTable. If you want to send it on update then to update() as well.

  • OrangeRocks Profile Picture
    700 on at

    Thank you very much

    I read the post and the walkthrough "Calling an External Web Service from X++". However I dont understand when comes my queries into play? I created an AxdQuery that contains necessary tables that I would like to export , document services based on my AxdQuery are created too. Or should be a custom service created?  

  • Mea_ Profile Picture
    60,286 on at

    As I said before you can use them to export via existing outbound port like file (to xml) or queue or someone else could consume your service following that article.

    You don't need to create a service to consume another one. Just follow the steps and ask if you have any questions.

  • OrangeRocks Profile Picture
    700 on at

    Ok Thanks IEvgen, I think i figured out that part

  • Mea_ Profile Picture
    60,286 on at

    If your issue is solved, please mark answer(s) that helped you as verified to close this thread.

  • Verified answer
    OrangeRocks Profile Picture
    700 on at

    Hi Evgen,

    ok, thank you.

    I found an answer to my question at what place I should gather the information about the customers and where the customers get sent to the external web service:

    It all takes place in the proxy class that run the web service that we build in AX. The web service contains methods that accept customer data like:

    externalWebService.setCustAccount()
    
    externalWebService.setCustName()
    
    externalWebService.setCustStreet()

    I shall build a query or select statements, gather all the fields i need to be exported and call these methods in my proxy class with my new fields found:

    try { 
    clientType = CLRInterop::getType("myVisualStudioProject.ServiceReferences.externalWebService");
    _client = AifUtil::CreateServiceClient(clientType);

    while select custAccount from custTable join DirPartyTable where ... { externalWebService.setCustAccount(custTable .CustAccount) externalWebService.setCustName(dirPartyTable.Name) }


Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 39

#2
Michel ROY Profile Picture

Michel ROY 14

#3
imran ul haq Profile Picture

imran ul haq 8

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans