How to: Set Up Web Services 2.0

In this article

To set up Web Services communication between two databases

To set up Web Services on two databases

Example scenario: sending the transaction from Store to HO

Troubleshooting

A new framework for standard SOAP web services was introduced in LS Central 11.01. The objectives of rewriting the web requests were the following:

  • Make web services easier to use for API developers

  • Automatic documentation of web services

  • Multiple dedicated web services instead of one generic web service for all functionalities.

  • Ability to version control the LS Central Web Service methods

  • The methods should not be dependent on manually entered demo data or other setup data to function

  • Option to monitor the usage of the Web Service methods in accordance with current methods used to monitor this.

To set up Web Services communication between two databases

Web Services data are created automatically for the server and the client. Use the actions on the Web Requests page to do this:

  • Use the Publisher action to create publishing data on the server computer. This action will not create client data. The result or published codeunits can be viewed on the standard Web Services page.
    Note: If they exist, all client data will be removed when this action is used.
  • Use the Subscriber action to create client data. Use this action only on client computers that will not be a publisher as well. The URL used is read from the Web Service Setup page and displayed as Base URL on this page. The result can be viewed on the page.
    Note: If publishing data exist, all will be removed when this action is used.
  • Use the Publisher and Subscriber action to create both publishing and client data.
    Note: In all cases, current data will be removed and recreated.
  • Use the Publish Omni Wrapper to publish the OmniWrapper codeunit for Commerce.
  • Use the Remove Publisher and Subscriber action to remove all Web Services data, both publishing and client data.

To set up Web Services on two databases

In this example of a Web Service setup for a store, HO/Publisher is on one database and a Client/Subscriber on another:

  1. Set up the Web Service URI at Web Service Setup in order for Web Requests to subscribe to the correct server and point it to the HO server:

    The Distribution Location for HO - setup on database 1:

  2. Set up the Web Service URI with the Distribution Location path in order for Web Requests to subscribe to Web Services at the HO database.
  3. When all setup is ready, access the HO database, open the Web Requests card, click the three dots, and then select Publisher to create the Web Services.

  1. At the store, open Web Requests V2 on the client computer, click the three dots and select Subscriber to subscribe the client data:

Example scenario: sending the transaction from Store to HO

  1. At the Store database, open the POS Functionality Profile Card, and in the Web Service Settings FastTab enable the Send Transactions check box .

  2. In the Web Servers page, insert the Dist. Location:

  3. Create a transaction on the POS, and verify at the Transaction Register:

  4. Proceed to the HO database to verify that the transaction has been sent over from the store.

Troubleshooting

If you run into unexpected behavior, chances are that some setup is missing or incorrect.

  • Make sure that the Enable SOAP Service check box in the SOAP Services FastTab, the Dynamics Business Central Server Administrator setup is selected.
  • Be sure to select the Client Log On check box in the Web Service Setup page, so the related log files will be saved in the location specified in the Client Log Path.