Usina BRAdvPL Guide
Sign in
← All topics
PRACTICAL GUIDEUnder review

Web Services with MVC models

Evaluates model-data submission through a documented service.

Web Services with MVC modelsAdvPL
01 · OVERVIEW

Overview

The indexed section of chapter 17 in the 2015 MVC manual describes FWWSMODEL and XML data; the full PDF returned 403 during this consultation. A public JavaScript client invokes PUTXMLDATA for a particular model. It contains literal credentials, concatenated XML and assignment instead of comparison in response handling, so it is not copied as a ready implementation. Validate authentication, authorization, company context, XML and business confirmation. The AdvPL fragment only illustrates explicit comparison of the textual response observed in that sample; the real WSDL defines the contract. (Sources: refs. 1–2.)

03 · PRACTICAL EXAMPLE

Commented example

#Include "Protheus.ch"

User Function Ed709()
    Local cResponse := "true" // Fictional value, not an HTTP response.
    // Compare explicitly; transport success is not confirmed persistence.
    If cResponse == "true"
        ConOut("Text response recognized")
    EndIf
Return Nil
Expected result

Displays a comparison message without sending XML or persisting a model. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

BEST PRACTICES
  • Do not reuse sample endpoints/credentials. Serialize XML safely and test faults, validation rejection and idempotent retries.
  • Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Related content

REFERENCES
  1. TOTVS. Manual AdvPL utilizando MVC, 2015, cap. 17. Recorte indexado; PDF integral indisponível nesta consulta. Accessed on 2026-10-28.
  2. vitorebatista/titanium-erp-protheus. app/controllers/cadLocalizacao.js. Arquivo completo analisado; problemas do exemplo explicitados. 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