web
You’re offline. This is a read only version of the page.
close
Skip to main content
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
    RE: URL for consuming web services

    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
    RE: URL for consuming web services

    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,284 on at
    RE: URL for consuming web services

    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
    RE: URL for consuming web services

    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,284 on at
    RE: URL for consuming web services

    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
    RE: URL for consuming web services

    Ok Thanks IEvgen, I think i figured out that part

  • Mea_ Profile Picture
    60,284 on at
    RE: URL for consuming web services

    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
    RE: URL for consuming web services

    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Alexey Lekanov Profile Picture

Alexey Lekanov 3

#2
Michele Gozzi Profile Picture

Michele Gozzi 2

#2
Scott_itD Profile Picture

Scott_itD 2 Community Manager

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans