NAV 2009 Web Service

genericgeneric Member Posts: 511
edited 2009-01-28 in NAV Three Tier
Hello

I've been looking at webservice for 2009 and following this blog.

http://demiliani.com/blog/archive/2008/08/10/6493.aspx.

Webservices have a WSDL address. I don't see it in his blog.
When I put the URL for my webservice in Internet Explorer, I can see the xml and webservice detail. When I put the exact address in FireFox, I don't see anything? Why does this behave this way?

Also has anybody been able to use XMLHTTP (msxmldom) to connect to NAV webservice? If yes, an example CU would be helpful.

Also I use SOAPUI to look at webservice. For some reason NAV webservice do not work with it.

Comments

  • freddy.dkfreddy.dk Member, Microsoft Employee Posts: 360
    The WSDL for the system service is described in the document as:

    http://TEST:7047/InstanceName/ws/CRONUS_International_Ltd./Services

    where TEST is the machine name, 7047 is the webservice port and InstanceName is the Instance name.
    The company name is wrong in this example (remove the trailing .), so the WSDL adress of the system service would typically be:

    http://localhost:7047/DynamicsNAV/WS/CRONUS_International_Ltd/Services

    (I heard that the marketing beta and some earlier CTP's had the port as 85)
    Whether the trailing . is the reason for firefox doesn't work, I don't know - IE works both with and without the .

    See also http://blogs.msdn.com/freddyk/archive/2008/10/29/the-service-tier.aspx

    Reg. XMLHTTP - The Excel demo that is discussed in a different thread uses XMLHTTP to connect to any exposed page and I am going to post a description about how that is done in my blog, but basically it goes like this to get the WSDL:
    XMLHTTP xhDisco = new XMLHTTP();
                xhDisco.open("GET", "http://localhost:7047/DynamicsNAV/WS/CRONUS_International_Ltd/Page/CustomerList", false, null, null);
                xhDisco.send(null);
    
                if (xhDisco.status == 200)
                {
                    // Load WSDL into XmlDocument
                    XmlDocument xdDisco = new XmlDocument();
                    xdDisco.LoadXml(xhDisco.responseText);
                    // Do stuff....
                }
    
    Freddy Kristiansen
    Group Program Manager, Client
    Microsoft Dynamics NAV
    http://blogs.msdn.com/freddyk

    The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.
  • HansHansHansHans Member Posts: 1
    Thanks for the portnumber. 7047 is still used in the marketing beta.
    The what's new training is telling to use 85.
  • ara3nara3n Member Posts: 9,256
    The portnumber is stored in CustomSettings.config

    <add key="WebServicePort" value="7047"></add>


    So you can change it if you like.


    I have confirmed that in FF you get a black screen.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • ara3nara3n Member Posts: 9,256
    generic wrote:
    Hello

    Also I use SOAPUI to look at webservice. For some reason NAV webservice do not work with it.


    To use SOAPUI a workaround I've found is to open the published function in IE. then view source and save it as xml. Then Open SOAPUI and create a new project and point it to the xml file. This will show you how to create the xml file.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
Sign In or Register to comment.