Usina BRAdvPL Guide
Sign in
← All topics
COMMANDUnder review

WSDATA

WSDATA cName AS cSoapType [OPTIONAL]

Declares properties used by a service contract.

WSDATAAdvPL
01 · OVERVIEW

Overview

SOAP WSDATA declares a name and compatible type, with ARRAY OF/OPTIONAL when appropriate, using TOTVSWebSrv.ch. Documented legacy REST also uses WSDATA for QueryString under RESTFUL.CH. Do not transfer macro options across includes without checking them. Type declaration does not replace size/range/required-field validation or authorization. This subset is one SOAP property inside the corresponding class declaration. (Sources: refs. 1–3.)

02 · SYNTAX

Syntax

WSDATA cName AS cSoapType [OPTIONAL]
03 · PRACTICAL EXAMPLE

Commented example

#Include "TOTVSWebSrv.ch"
// Fragment inside the SOAP class: fixed external contract name.
WSDATA requestCode AS STRING
Expected result

Declares requestCode as STRING; does not create/publish a full service. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

BEST PRACTICES
  • Verify WSDL and actual serialization; OPTIONAL does not waive business rules.
  • Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Related content

REFERENCES
  1. TOTVS. WSDATA. SOAP e includes. Accessed on 2026-10-28.
  2. TOTVS. Criando uma classe REST. QueryString e WSDATA. 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