Pular para o conteúdo principal

Postagem em destaque

BlackTDN :: JSON Schema Validation: A Comprehensive Guide

# JSON Schema Validation: A Comprehensive Guide ## Understanding JSONSchemaValidator Ensuring the integrity and compliance of JSON data is crucial for modern applications. **JSONSchemaValidator** is a powerful class designed to validate JSON data against a specified JSON Schema. It provides robust methods to check types, patterns, numerical constraints, required properties, and both internal and external schema references. This guide breaks down the key features and functionalities of JSONSchemaValidator, making it easier for developers to implement schema validation effectively. 🔗 **GitHub Repository:** [JSONSchemaValidator](https://github.com/naldodj/naldodj-hb-jsonschema-validator) --- ## Key Features ✅ **Schema-Based Validation** – Ensures JSON data conforms to a predefined schema. ✅ **Error Handling & Logging** – Captures validation errors for debugging. ✅ **Fast Mode Support** – Stops validation upon detecting the first error. ✅ **Internal & External Reference ...

Protheus :: apconnxcontrol.ocx, PowerShell e SendMessage para envio de Mensagem a Usuário Específico

No “post” anterior, Protheus :: apconnxcontrol.ocx & PowerShell – Forçando a Desconexão de Usuário, vimos como instalar o componente apconnxcontrol.ocx e consumi-lo via Windows PowerShell para “Forçar” a Desconexão de usuário específico. Veremos, agora, como usar o Método SendMessage para o envio de Mensagens.

Instale/Registre o compontente conforme descrito no “post” anterior. Através do PowerShell instancie um novo objeto COM e efetue a conexão ao Protheus.

#Instanciando um novo objeto com 
$TObj = New-Object -Com apconnxcontrol.apconnx;

#Definindo as variaveis para Conexao
$TEnv = "NDJ_01";
$TSrv = "127.0.0.1";
$TPort = 4321;
$TUser = "TOTVS";
$TPWD = "SIGA";

#Atribuindo as variaveis para Conexao às Propriedades do objeto
$TObj.Environment = $TEnv;
$TObj.Password = $TPWD;
$TObj.Port = $TPort;
$TObj.Server = $TSrv;
$TObj.User = $TUser;

#Conectando
$TObj.Connect();


image



Obtenha os usuários conectados







$TObj.GetUsers();









PS C:\Documents and Settings\marinaldo.jesus.NALDO-PC\Meus documentos> $TObj.GetUsers();
marinaldo.jesus;NALDO-PC;3712;
;2740;1769103725;naldo.jesus



image



image


e, agora, usando SendMessage (string, string, string, string, string) envie-lhe(s) uma mensagem.







$TObj.SendMessage('marinaldo.jesus','NALDO-PC','3712','','ola')




image



image



image


O exemplo acima foi executado no Protheus 10, mas serve também para a versão 11. Observe:


image 





$TObj.GetUsers();

image





$TObj.SendMessage('marinaldo.jesus','NALDO-NOTE-MVPC','1996','','message from PowerShell')

image

image

image

[]s
иαldσ dj

Comentários

Postar um comentário

Postagens mais visitadas