Sunday, November 24, 2013

NAV RTC - Introduction to Web Services.

Hi all,

This post is a introdcution post about web services in Navision.

Agenda for this post -

1) Types of Web Services.
2) Differences between types of web services.
3) How to publish a web service.
4) How to see the published web service in Internet Explorer.
5) How to check all Published Web services.




Part 1 - Types of web Services?

NAV 2009, 2009 SP1 and 2009 R2 -

In these versions of Navision we had only one type of web service i.e SOAP Web services. It is an XML based protocol for accessing Web Services.

NAV 2013, NAV 2013 R2 -

With NAV 2013 Microsoft have come up with two types of web services i.e SOAP web services and ODATA web services.

Part 2 - How these Two Services Differ in Navision?

With SOAP Web Services you can publish either Microsoft Dynamics NAV pages or codeunits as SOAP services.

With ODATA web Services you can publish either pages or queries as OData services.

Part 3 - How to publish a web service?

*Following Screenshot are from NAV 2013 R2.

1. Open Role Tailored Client.

2. Navigate to - Departments/Administration/IT Administration/General/Web Services.

3. Click New.

4. Select the Object Type, Object No and Provide a Name to the Web Service.

5. Click on Published.

As i have created a Page web service i have both the URL i.e SOAP and ODATA.



But if i select a codeunit as shown below, i will get only SOAP URL and ODATA will be Not applicable. In the same way If i select a query i will only get URL for ODATA not for SOAP.



Till NAV 2009 R2 we don't get the URL for the web service published.

Part 4 - How to see the published web service in Internet Explorer?

You can copy the URL Generated in web Services Page and run that URL in Internet Explorer.

SOAP Web Service


ODATA Web Service


The Screen Shot Above shows the exposed Page Customer in Internet Explorer.

Part 5 - How to check all Published Web services?

If you would like to see what all objects have been published in a web services you can follow below steps -

SOAP WEB SERVICE -

FOR SOAP Web Services you can use below format as URL in Internet Explorer -
http://ServerName:PortNo/Instance Name/WS/Services

In my case i am using below URL
http://localhost:7047/DynamicsNAV71/WS/Services




ODATA WEB SERVICE -

For ODATA Web Services you can use below format as URL in Internet Explorer -
http://ServerName:PortNo/Instance Name/OData/

In my case i am using below URL
http://localhost:7048/DynamicsNAV71/OData



I hope you would have get some basic Ideas about web services.

Regards,
Saurav Dhyani
saurav-nav.blogspot.in

5 comments:

  1. Hi ,
    we are using nav 2016 and our client wants develop API application for nav for that we created web services and we published it but .net team is asking the logic like

    We would require the following API Documentation

    1. Read only API for all Drop down values like Product Category, Visit Type, Country etc. We would also need the code login to send it with Read mode.
    2. Search/Add/Update API for the Screens Vendor, Fair Visit, Factory Visit etc. We would also need the code logic to send it for search/add/update mode.
    3. Login API
    4. Vendor No, Visit No etc generation API

    For the 1st and 2nd we have the API access but we need the code logic to be set

    Request you to do needful .Thanks in advance

    ReplyDelete
  2. Hi ,
    we are using nav 2016 and our client wants develop API application for nav for that we created web services and we published it but .net team is asking the logic like

    We would require the following API Documentation

    1. Read only API for all Drop down values like Product Category, Visit Type, Country etc. We would also need the code login to send it with Read mode.
    2. Search/Add/Update API for the Screens Vendor, Fair Visit, Factory Visit etc. We would also need the code logic to send it for search/add/update mode.
    3. Login API
    4. Vendor No, Visit No etc generation API

    For the 1st and 2nd we have the API access but we need the code logic to be set

    Request you to do needful .Thanks in advance

    ReplyDelete
  3. Hi ,
    we are using nav 2016 and our client wants develop API application for nav for that we created web services and we published it but .net team is asking the logic like

    We would require the following API Documentation

    1. Read only API for all Drop down values like Product Category, Visit Type, Country etc. We would also need the code login to send it with Read mode.
    2. Search/Add/Update API for the Screens Vendor, Fair Visit, Factory Visit etc. We would also need the code logic to send it for search/add/update mode.
    3. Login API
    4. Vendor No, Visit No etc generation API

    For the 1st and 2nd we have the API access but we need the code logic to be set

    Request you to do needful .Thanks in advance

    ReplyDelete
  4. Hi ,
    we are using nav 2016 and our client wants develop API application for nav for that we created web services and we published it but .net team is asking the logic like

    We would require the following API Documentation

    1. Read only API for all Drop down values like Product Category, Visit Type, Country etc. We would also need the code login to send it with Read mode.
    2. Search/Add/Update API for the Screens Vendor, Fair Visit, Factory Visit etc. We would also need the code logic to send it for search/add/update mode.
    3. Login API
    4. Vendor No, Visit No etc generation API

    For the 1st and 2nd we have the API access but we need the code logic to be set

    Request you to do needful .Thanks in advance

    ReplyDelete
    Replies
    1. API is only available from NAV 2018 and higher.

      Delete