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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

AIF - server address in WSDL

(0) ShareShare
ReportReport
Posted on by

hi,

   I would like to share my AIF Webservice in Internet. AX generated wsdl files corretly but AX uses local name for AIF ISS server. When I tried add web service reference in VS, VS has problem with resolve name of server. I connect behind firewall and my computer doesn't know what is ax4aif.domain.local.

Is it possible to change name for servers in wsdl files?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    fsilva-jr Profile Picture
    20 on at

    Hello Jacek!

    I think that you should work with your network administrator, he can help you to publish this URL and Port for external access using firewall rules.

  • Community Member Profile Picture
    on at

    I haven't problem with publish WS in Internet I did it. You can connect to AIF WS via browser and list all shared services. In wsdl delcaration AX used local server name and when VS wants create proxy classes, VS takes local name insead global IP address and throw error can't find server ax4aif.domain.local. There is bug in wsdl file. I want change ax4aif.domain.local to global IP address in wsdl file.

  • Suggested answer
    keoma Profile Picture
    32,729 on at

    hi,

    it seems that the target server is within an alternate windows domain. to get through you need an AD account for that domain with the same username and the same password than your current windows account. if so the authentication passes by.

    if the problem ist, that the target domain/server cannot be found/resolved then there is a resolving problem between the 2 domains.  

  • Suggested answer
    Jonathan  Halland Profile Picture
    11,310 on at

    Hi Jacek.

    I'm not sure if I'm misunderstanding you. But if you are trying to use your .NET code outside of the network (or connecting to a live version of your service) you will need to explicitly set in code your public URL that you are connecting to. By default  it will use address that you used when you did the Add reference in visual studio.

  • Community Member Profile Picture
    on at

    I see I didn't explain my issue clear. I use AIF WS to create sales order from eCommerce system. eCommerce system is hosting in cloud on linux system. AX is on servers in my company. I published service and it works. I can view wsdl file from internet. I can't add reference to my application because system can't resolve server local name.

    Error:
    SOAP-ERROR: Parsing Schema: can't import schema from 'http://ax4aif.domain.local/MicrosoftDynamicsAXAif50/contactpersonsservice.svc?xsd=xsd0'

    I uploaded screen to my sky drive account. You can view wsdl file.
    https://onedrive.live.com/?cid=0AE7867F90F4DB32&id=AE7867F90F4DB32!257

    At present I have two problems
    1. eCommerce server try to resolve local name of server because wsdl file contains definition with local name

    2. I don't know which authorization type I should choose. I should pass credentials because server can't be a part of my local domain. I know that I have to create AD account and get permission in AX but how I should setup WS security parameters?

  • Suggested answer
    keoma Profile Picture
    32,729 on at

    hi,

    ax4aif.domain.local should have also an external ip or an external uri. if it has, try again to load the wsdl using the external uri/ip/link in your browser and check, if it also contains the local or the external server reference.

  • Community Member Profile Picture
    on at

    Thank you for reply. That's clear for me but when in AX can I do it?

  • Suggested answer
    keoma Profile Picture
    32,729 on at

    hi,

    there is nothing to do in ax.

    for example:

    if you use the webservice on the server, where ax is located use:

    localhost/.../SalesOrderService.svc

    within your local windows domain it seems that this works

    ax4aif.domain.local/.../SalesOrderService.svc

    the server ax4aif.domain.local should also have an ip address or full qualified server, so that this server is also reachable out from the web, for example ax4aif.<your-company>.com.

    then you would get:

    http://ax4aif.&lt;your-company>.com/MicrosoftDynamicsAXAif50/SalesOrderService.svc

    each uri points to the same webservice.

    the last option (give that server an external address) needs to be done by the network sysadmin. maybe it's, if you get the permission (it's a bit risky to share web services over the web and network sysadmins know that. i had some discussions ...). it also could be that it it's necessary that you use an alternate server outside the secured domain.

  • Suggested answer
    Jonathan  Halland Profile Picture
    11,310 on at

    Hi Jonathan and Jacek.

    Its seems like the network part is setup correctly and that the webservice can be accessed, however the webservice itself is only bound to the local address making processing or consuming it via the external address impossible. Normally for external access to webservices one would deploy the webservice to IIS and I believe there you can setup bindings so that the webservice recognises both internal and external addresses as valid. I believe you should be able to accomplish this in AX via the AIF configuration (under System Administration -> Setup -> Application Integration framework.) but I haven't done this myself before.

  • Verified answer
    Community Member Profile Picture
    on at

    Thanks guys for help

    This is solution for issue with resolving name

     

    "In order to Configure AIF Service wsdl to work both from internal and external do following.

    From AIF choos configure.

    The go to Advanced/ServiceBehaviors/routingServiceBehavior

    Then choose add Service Behavior Element Extension.  Here Select useRequestHeadersForMetadataAddress."

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans