ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help /  / 
  • Overview
  • Testing and debugging a REST web service
  • WDTestRest - Web service testing tool
  • Generating and deploying the REST web service
  • Generating a REST web service
  • Deploying a REST web service
  • Special case: Deploying and testing a web service on the local computer
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Overview
WINDEV and WEBDEV allow you to create REST web services.
Once the REST web service has been developed, you can:
  • Test and debug the REST web service.
  • Deploy the REST web service.
Once the REST web service has been deployed, you can call its different functions.
Testing and debugging a REST web service
WINDEV and WEBDEV allow you to run the test of your REST web service in the debugger. To do so, simply set breakpoints in the code of the web service's procedures and run a test by clicking "GO".
To test and debug a REST web service:
  1. First, open the WEBDEV administrator on the development computer.
    Note: WDADMIN is the application server administrator provided with WEBDEV. This application server allows you to locally test websites and web services developed with WEBDEV or WINDEV.
  2. Open the REST web service description in the editor.
  3. Expand in the quick access buttons and select "Debug web service".
    The project is compiled. The following window appears.
  4. Select the test method:
    • Test the web service using the editor test tool: WINDEV and WEBDEV include a tool that allows you to test each web service entry point (see below).
    • Test the web service with an external program: Choose this option if you have developed a specific program to call the web service. The test mode is stopped when the executable stops running.
    • Test the web service manually: The WINDEV or WEBDEV editor waits for an external call. For example, you can open a browser and enter the URL of the query corresponding to one of the web service entry points to be tested. The query will be processed and a response will be returned in the browser.
  5. Click "Run test".

WDTestRest - Web service testing tool

WINDEV and WEBDEV include WDTestRest, a web service testing tool. This tool lists all the entry points of the web service to be tested.
The left pane contains:
  • the list of all web service entry points,
  • the history of all tests run.
The right section shows the list of all entry points that have been tested.
To test an entry point:
  1. Double-click an entry point in the left pane. A pane is opened on the right.
  2. Fill the URL. For example, replace the expected parameters between {...} with a real value.
  3. Select the type of authentication in the list.
  4. Type the header parameters if necessary.
  5. Click the "Send" button to run the test. The result is displayed.
    • The "Response" pane contains the result returned by the URL.
    • The "Status" value corresponds to the HTTP response code returned by the URL.
The "Generate WL code" link allows you to generate and retrieve the WLanguage code of the test so that you can include it in your project.
Generating and deploying the REST web service

Generating a REST web service

To generate a REST web service:
  1. If necessary, select the project configuration that corresponds to the REST web service.
  2. Generate the REST web service:
    • Method 1: Go to the "Project" tab, "Generation" group, and click "Generate".
    • Method 2: Click the generation icon in the quick access buttons.
  3. The web service generation wizard opens.
  4. Specify the web service name. By default, the web service name corresponds to the name of the current project.
  5. Confirm.
  6. The deployment wizard automatically opens.

Deploying a REST web service

To use a web service, it must be deployed on a WEBDEV Application Server.
There are several deployment methods:
  • Deploy web service to the cloud for PC SOFT applications.
  • Deploy web service to a remote WEBDEV Application Server.
  • Create a remote deployment package.
  • Create installation media.
  • Create a web service Docker image.
  • Deploy web service to PC SOFT test hosting service.
  • Deploy web service to the local computer.
The options for deploying a web service and a WEBDEV website are the same. For more details, see Deploying a site.

Special case: Deploying and testing a web service on the local computer

The new web service can be tested directly on the development computer. To do so, select "Deploy web service to the local computer". This option is available only if WEBDEV is installed on the development computer. In this case, the WEBDEV application server is used.
At the end of the setup, you will see a link to open the web service description.
The web service is ready to be used.
Minimum version required
  • Version 22
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 02/11/2025

Send a report | Local help