Sie sind auf Seite 1von 2

05/10/2016 01.

ConfiguraoTecnologiaTDN
Tecnologia / / 01.WebServicesREST/Server

01.Configurao
CreatedbyFabiodeMoraesRocha,lastmodifiedon18mai,2015

OwebserviceRESTdoAdvPLnoutilizaasseesHTTPeWebServicesutilizadasparaoconfiguraromodeloSOAP.
ApesardissooRESTtambmutilizaworkingthreadsparaatenderasrequisiesrecebidastambmpeloprotocoloHTTP.

Observaes

OprotocolocoHTTPdoRESTnoatendeaoutrostiposderequisiescomooHTTPdoSOAP(quetambmatendearquivos
estticos,APWeAPL)

AchaveMAXSTRINGSIZEobrigatrianaseoGENERALcomvalormnimo10paraqueoRESTsuporterequisiescom
maisde1Mb

AfunoHTTP_STARTquepreparaoApplicationServercomoHTTPparaREST,devendoserconfiguradanaseoONSTART:

[GENERAL]
MAXSTRINGSIZE=10

[ONSTART]
JOBS=HTTPJOB
REFRESHRATE=120

[HTTPJOB]
MAIN=HTTP_START
ENVIRONMENT=environment

SeoHTTPV11

ParahabilitaroHTTPparaRESTcriaraseoabaixonoappserver.ini:

[HTTPV11]
Enable=1
Sockets=HTTPREST

Parametro Descrio Obrigatrio

Enable IndicaseoHTTPestahabilitado x

Sockets SeescomconfiguraodeportaeURL(pelomenosumaseo) x

AchaveSocketsreferenciaa(s)seo(es)comaconfiguraodeportaeURLqueamesmairaatender,permitindoqueoApplication
ServersejaconfiguradocommaisdeumaportaHTTPdoREST:

[HTTPV11]
Enable=1
Sockets=HTTPREST,HTTPREST2

SeesSockets

ExemplodeconfiguraodeumaseoSockets:

[HTTPREST]
Port=8080
IPsBind=
URIs=HTTPURI
Security=1

http://tdn.totvs.com/pages/viewpage.action?pageId=185747842 1/2
05/10/2016 01.ConfiguraoTecnologiaTDN

Observaoes
Parametro
Observao
Parametro Descrio
Descrio Obrigatrio Obrigatrio
Obrigatrio
Port PortaHTTP x

IPsBind IndicaosIPsqueseroatendidosporessaporta,senoinformadoatenderqualquerIP/DNS
associadoaoservidor

URIs SeescomconfiguraodeURLeambiente(pelomenosumaseo) x

Security Indicaseaautenticaoderequisioestahabilitada x

Observao

OHTTPdoRESTverificaexistnciadocampoAuthorizationnoHEADERdarequisio,pormaautorizaorealizadapelo
frameworkdoprodutoqueestautilizandooprotocolo

ParafacilitarodesenvolvimentoetestespodeseconfigurarachaveSecuritycomvalor0(zero)paradesabilitaraautenticao

AchaveURIsreferenciaa(s)seo(es)comaconfiguraodaURLqueaportairatender,permitetambmquesejaconfiguradocom
maisdeumaURL:

[HTTPREST]
Port=8080
IPsBind=
URIs=HTTPURI,HTTPURI2
Security=1

SeesURIs

ExemplodeconfiguraodeumaseoURIs:

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

Parametro Descrio Obrigatrio

URL Indicaoendereoqueseratendido x
Nesseexemplohttp://localhost:8080/rest

Preparein Informaesparapreparaodoambientedasworkingthreads

Instances Configuraodeinicializaodeworkingthreads x

Observaoes

ApreparaodeambientedachavePrepareInrealizadapeloframeworkdoprodutoqueestautilizandooprotocolo

AchaveInstancesconfiguradacomonoHTTPdoSOAP

Vejatambm
Instances
SeoOnStart29403
Seo[general],chaveMaxStringSize

2peoplelikethis

http://tdn.totvs.com/pages/viewpage.action?pageId=185747842 2/2

Das könnte Ihnen auch gefallen