Na execução esta dando erro
"Error BASE/1004 No exported method: OPEN"

Moderador: Moderadores
hs_paulo escreveu:Na execução esta dando erro
"Error BASE/1004 No exported method: OPEN"
hs_paulo escreveu:Eu acho que precisava baixar o Harbour 3.4 de novo.
hint: add input file "xxx.hbc" instead of specifying raw library using -lxxxx
JoséQuintas escreveu:ASimões, não complica, HBM é só pra complicar
#include "inkey.ch"
FUNCTION MAIN()
LOCAL oElemento
LOCAL oServerWs, oXmlDoc, cUrlWs, cXmlSoap
LOCAL cBairro, cCep, cCidade, cEnd, cUF
oServerWS := Win_OleCreateObject("MSXML2.ServerXMLHTTP")
oXMLDoc := Win_OleCreateObject("MSXML2.DOMDocument")
cUrlWS := [https://apphom.correios.com.br/SigepMasterJPA/AtendeClienteService/AtendeCliente]
cxMLSoap := [<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://cliente.bean.master.sigep.bsb.correios.com.br/">]
cxMLSoap += [<soapenv:Header/>]
cxMLSoap += [<soapenv:Body>]
cxMLSoap += [ <cli:consultaCEP>]
cxMLSoap += [ <!--Optional:-->]
cxMLSoap += [ <cep>20735050</cep>]
cxMLSoap += [ </cli:consultaCEP>]
cxMLSoap += [</soapenv:Body>]
cxMLSoap += [</soapenv:Envelope>]
WITH OBJECT oServerWS
:Open( "POST", cUrlWS, .F. )
:SetRequestHeader( "Content-Type", 'text/xml; charset="utf-8"' )
:SetRequestHeader( "Content-Length", Hb_NtoS( Hb_BLen( cxMLSoap ) ) )
:Send( cxMLSoap )
:WaitForResponse( 500 )
WITH OBJECT oXMLDoc
:async := .F.
IF :load( oServerWS:responseXML )
BEGIN Sequence With __BreakBlock()
cBairro := :getElementsByTagName( "bairro" ):item(0):Text
cCep := :getElementsByTagName( "cep" ):item(0):Text
cCidade := :getElementsByTagName( "cidade" ):item(0):Text
cEnd := :getElementsByTagName( "end" ):item(0):Text
cUF := :getElementsByTagName( "uf" ):item(0):Text
? cEnd
? cBairro
? cCep
? cCidade
? cUF
Inkey(0)
END
ENDIF
END WITH
END WITH
RETURN NIL
JoséQuintas escreveu:A partir daqui, só se preocupa com o que realmente precisa.
-u+hwg_compat.ch
-u+hwg_compat.ch
Usuários vendo este fórum: leandrolinauer e 12 visitantes