Usina BRAdvPL Guide
Sign in
← All topics
COMMANDUnder review

WSMETHOD

WSMETHOD GET STATUS DESCRIPTION cDescription PATH cPath

Declares operations and binds their service implementation.

WSMETHODAdvPL
01 · OVERVIEW

Overview

SOAP and REST use different forms. TOTVSTEC documents SOAP WSRECEIVE/WSSEND/WSSERVICE; REST guidance recommends verb plus ID, allowing multiple methods per verb. Implementation must match its declaration. Routing PATH differs from WSSYNTAX description. This subset adapts only the community REST declaration, without copying SQL, writes or blanket 500 error handling. (Sources: refs. 1–3.)

02 · SYNTAX

Syntax

WSMETHOD GET STATUS DESCRIPTION cDescription PATH cPath
03 · PRACTICAL EXAMPLE

Commented example

#Include "RESTFUL.CH"
// Fragment inside WSRESTFUL; implement the same GET STATUS afterwards.
WSMETHOD GET STATUS DESCRIPTION "Example status" PATH "status"
Expected result

Declares an operation; does not implement/expose the endpoint in this subset. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

BEST PRACTICES
  • Validate parameters, authorization, HTTP status and response content. A logical return is not an HTTP status.
  • Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Related content

REFERENCES
  1. TOTVS. WSMETHOD. Forma SOAP. Accessed on 2026-10-28.
  2. TOTVS. Criando uma classe REST. Métodos recomendados. Accessed on 2026-10-28.
  3. Atilio. dan-atilio/AdvPL. Maratona de Exemplos/Exemplo_535_Classe_WsRestFul.prw. Arquivo completo analisado; adaptação editorial. Accessed on 2026-10-28.
Status
Under review
Page created on
Last reviewed on
Original language
Portuguese
Reviewed by
Usina.BR
0 approved comment(s)

Comments

There are no approved comments yet.

Sign in with Google or Microsoft to comment.

Powered by Usina Docs · Alpha