PC SOFT

PROFESSIONAL NEWSGROUPS
WINDEVWEBDEV and WINDEV Mobile

Home → WINDEV 25 → WX - Valida Webservice
WX - Valida Webservice
Started by BOLLER, Sep., 29 2017 9:58 PM - No answer
Registered member
3,651 messages
Popularité : +175 (223 votes)
Posted on September, 29 2017 - 9:58 PM
// Summary: <specify the procedure action>
// Syntax:
//[ <Result> = ] ValidaWebservice ()
//
// Parameters:
// None
// Return Value:
// boolean: // None
//
// For instance:
// Indicate an example.
//
Procedure Valida_Webservice( debug )

ok is boolean = False

HTTPTimeOut(1000000) // ====> 10 segundos tempo maximo de tentativa
HTTPRequest("https://site.com.br/ws.asmx?WSDL") //HTTPS
retornohtml is string = HTTPGetResult(httpHeader)
IF PositionOccurrence(retornohtml,"HTTP/1.1 200 OK",firstRank,FromBeginning) THEN

ok = True

IF ok = False AND debug = 1
Info(ErrorInfo())
END

END

IF ok = False
HTTPRequest("http://site.com.br/ws.asmx?WSDL") //HTTP
retornohtml = HTTPGetResult(httpHeader)
IF PositionOccurrence(retornohtml,"HTTP/1.1 200 OK",firstRank,FromBeginning) THEN

ok = True

END

IF ok = False AND debug = 1
Info(ErrorInfo())
END

END

RESULT(ok)


--
Adriano José Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 99949 1800
adrianoboller@gmail.com
skype: adrianoboller
http://wxinformatica.com.br/
Message modified, September, 29 2017 - 10:07 PM