How to: Set Up Web Services

In this article

Web Services Functions

Setting up Web Services

Distribution Location

Defining the Web Server

Further considerations

This article explains how Web Services are handled.

Web Service uses the built in Business Central Web Service. Web Service is used for pushing and querying information to a remote database or company.

Additionally, Web Service can:

    - Run objects at a remote destination
    - Work with Flow fields. Because of this, some Web Requests are mandatory and cannot be disabled.

Web Services Functions

Setting up Web Services

Are the Web Services enabled?

Distribution Location

You must configure and construct the connection string to the remote database:

The required fields are outlined in green and the red outlined field is the connection string which is constructed automatically.

In case Business Central is configured to use other authentication methods than current Windows Login, you can also specify a user and a password.

The URL is constructed as follows (example):

http://SERVICE_TIER_HOSTNAME:PORTNUMBER/SERVICENAME/WS/COMPANYNAME/Codeunit/RetailWebServices

  • To test the connection, open a browser with the Web Services URL. Is the output similar to the image below? If not, something is not working correctly.

Defining the Web Server

You can configure the Web Servers on the POS Functionality Profile Card:

  • Select the Local Request check box if you want the Web Service to push and query information from the Local Database (itself).
    This is useful when you want to use Web Service Mandatory Functions locally, for example, querying for a Member Account which exists in the POS database instead of the HO. If used in conjunction with the Priority field, an example of a scenario could be as follows:
  • Try first to receive Member Information from HO, if that is unsuccessful, retrieve information from Local Database.

Further considerations

Initial Setup

In the Web Service Setup page, you can activate or deactivate the Web Service module. If no requests exist in the WS Request table when you activate, the system will create all the default requests.

For Web Requests 2.0 see How to: Set Up Web Services 2.0

Monitoring and debugging

Web Services do not have a Job Monitor as the Data Director has. However, you can make use of the Client Log for monitoring and debugging purposes.

Note: The output files are big (around 1-2 Mb each) and should therefore only be used in a controlled environment for testing and debugging purposes.