官术网_书友最值得收藏!

Creating the NAV web service

The scope of our application is to read NAV sales orders and create new ones by invoking the NAV business logic. In order to do that, we need to publish the NAV Sales Order page as web service and use it.

Let's learn how to create a NAV web service by performing the following steps: 

  1. Open the Microsoft Dynamics NAV RoleTailored Client and go to the Web Services page.
  2. Create a new record with these parameters:
    • Object Type: Page
    • Object ID: 42 (Sales Order page)
    • Service Name: SalesOrder (a friendly name for our web service)
    • Published: TRUE

    The results are shown in the following screenshot:

  3. When published, NAV immediately gives you the service URL (SOAP and OData). You can test if the web service is correctly working by accessing it directly via the browser (using, for example, the SOAP URL):
  4. If the browser prompts you to insert credentials for the service, access it by using a correctly configured user in NAV.
  5. Remember that in order to access the published web services, the service ports (7047 for SOAP web services and 7048 for OData web services if you use the default ones) must be opened to the outside by creating correct rules on the Windows Firewall:
主站蜘蛛池模板: 阳谷县| 青岛市| 黄骅市| 乌苏市| 云梦县| 安国市| 苍山县| 东乌| 扶绥县| 江北区| 长顺县| 锡林浩特市| 杨浦区| 郴州市| 井冈山市| 吴桥县| 浙江省| 沭阳县| 普陀区| 伊宁县| 同江市| 尼勒克县| 凭祥市| 盱眙县| 永靖县| 张家口市| 澄城县| 安康市| 喀什市| 贞丰县| 繁峙县| 凤庆县| 昌图县| 镇安县| 邢台市| 遂昌县| 湛江市| 重庆市| 连云港市| 宣武区| 南汇区|