Kbase 50468: Verificação da api btapi003.r de envio de arquivos para a central de documentos
Autor |
  Caroline Miranda - Produto Framework |
Acesso |
  Público |
Publicação |
  4/2/2015 |
|
1) Execute o comando abaixo no editor do Progress:
DEFINE VARIABLE hDocumentsCentralServiceEndPoint AS HANDLE NO-UNDO.
DEFINE VARIABLE wsdlLocation AS CHARACTER NO-UNDO.
DEFINE VARIABLE hWebService AS HANDLE NO-UNDO.
wsdlLocation = http://servidor:porta/documentsCentral/PublicationService?wsdl. (url localizada no programa btb946aa)
CREATE SERVER hWebService.
hWebService:CONNECT("-WSDL " + wsdlLocation + " ").
IF hWebService:CONNECTED() THEN DO:
DISP FOi .
RUN DocumentsCentralServiceEndPoint SET hDocumentsCentralServiceEndPoint ON hWebService.
END.
ELSE DO:
DISPLAY ERROR .
END.
2) Após isso execute o comando:
RUN btb/btapi003.r (INPUT "c:/tmp/teste.txt").
IF RETURN-VALUE = ERROR THEN DO:
Run utp/ut-msgs.p ( Input "show", Input 17006, Input "Central de Documentos ~~Problema ao executar API de envio.").
END.
ELSE DO:
IF RETURN-VALUE = OK THEN
Run utp/ut-msgs.p ( Input "show", Input 15825,Input "Central de Documentos~~Arquivo enviado para Central de Documentos.").
ELSE
Run utp/ut-msgs.p ( Input "show", Input 27979, Input "Central de Documentos~~O arquivo não foi envidado para Central de Documentos").
END.
Observação: o arquivo teste.txt precisa ter conteúdo.