Versão atual:

Integracao Protheus x Fluig - Web Service REST

Bom dia, estou tentando configurar um web service do protheus para que o fluig possa fazer requisições REST sobre o mesmo, no entanto, estou tendo alguns problemas nessa tarefa.

Usei de base as configurações presentes no tdn, no link: http://tdn.totvs.com/pages/viewpage.action?pageId=185747842

Primeiramente, irei expor o que fiz até então: Fui até o arquivo appserver.ini, e adicionei: ... [environmenttesteWSRest]

SourcePath=c:\TOTVS11TESTE\apo\apoteste\ws

RootPath=c:\TOTVS11TESTE

StartPath=\system\

x2_path=

RpoDb=Top

RpoLanguage=portuguese

RpoVersion=110

LocalFiles=ads

Trace=0

localdbextension=.dbf

PictFormat=DEFAULT

DateFormat=DEFAULT

RegionalLanguage=BRA

EnableNumber=0

TOPDataBase=mssql

TOPServer=10.0.1.98

TOPALIAS=TOTVS11TESTE

TOPPROTHEUSONLY=0

HELPSERVER=HELP.OUTSOURCING.COM.BR/P11

SpecialKey=TESTE

[ONSTART] JOBS=HTTPJOB REFRESHRATE=120

[HTTPJOB] MAIN=HTTP_START ENVIRONMENT=environmentteste

[HTTPV11] Enable=1 Sockets=HTTPREST

[HTTPREST] Port=9076 IPsBind= URIs=HTTPURI Security=0

[HTTPURI] URL=/rest PrepareIn= Instances=1,1

[10.0.1.98:9076/ws] enable=1

path=c:\TOTVS11TESTE\web\ws

environment=environmentteste

instances=5,20,3,5

defaultpage=wsindex.apw...

Feito isso, fui na pasta c:\TOTVS11TESTE\apo\apoteste\, copiei o arquivo tttp110.rpo para a pasta c:\TOTVS11TESTE\apo\apoteste\ws, que é a pasta que o environmenttesteWSRest aponta.

Depois, fui na pasta do arquivo appserver.ini, criei um atalho para o appserver.exe, e nele adicionei a clausula -CONSOLE, então executei o programa pra subir o serviço.

Na hora de acessar no navegador por http://10.0.1.98:9076/rest/index/FWMODEL, obtenho a seguinte mensagem de erro: {"errorCode":500,"errorMessage":"argument #0 error, expected C->U, function EncodeUtf8"}

Alguem tem noção do que pode ser?

Versões (2):

Ver a versão formatada

Integracao Protheus x Fluig - Web Service REST

Comentário

new question