Estou com a seguinte situação:
uso ASP no meu servidor, mas o ASP não permite conexão segura, pra poder usar o webservice dos correios
Alguém tem alguma dica, ou rotina que possa substituir essa consulta?
Consultar webservice dos correios (em ASP)
Moderador: Moderadores
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Consultar webservice dos correios (em ASP)
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Consultar webservice dos correios (em ASP)
Só pra curiosidade:
A criação de novos CEPs nunca foi tão grande.
Antigamente era uma vez por semestre, agora são várias por mês.
A criação de novos CEPs nunca foi tão grande.
Antigamente era uma vez por semestre, agora são várias por mês.
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Consultar webservice dos correios (em ASP)
Ainda testando...
Mas acrescentando a opção do formato JSON.
Mais prático.
Pra curiosidade, o que usei no ASP pra gerar em JSON:
Mas acrescentando a opção do formato JSON.
Mais prático.
Pra curiosidade, o que usei no ASP pra gerar em JSON:
Código: Selecionar todos
IF cFormato = "json" THEN
cResposta = "{"
cResposta = cResposta & Quoted( "cep" ) & ":" & Quoted( cpcep ) & ","
cResposta = cResposta & Quoted( "logradouro" ) & ":" & Quoted( cpEndereco ) & ","
cResposta = cResposta & Quoted( "bairro" ) & ":" & Quoted( cpBairro ) & ","
cResposta = cResposta & Quoted( "cidade" ) & ":" & Quoted( cpCidade ) & ","
cResposta = cResposta & Quoted( "uf" ) & ":" & Quoted( cpUF ) & ","
cResposta = cResposta & Quoted( "ibge" ) & ":" & Quoted( cpIbge ) & ","
cResposta = cResposta & Quoted( "infalt" ) & ":" & Quoted( cpinfAlt ) & ","
cResposta = cResposta & Quoted( "status" ) & ":" & Quoted( cpStatus )
cResposta = cResposta & "}"
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Consultar webservice dos correios (em ASP)
Pequena reduzida:
Código: Selecionar todos
FUNCTION ToJSON( cName, cValue )
ToJSON = Quoted( cName ) & ":" & Quoted( cValue )
END FUNCTION
...
IF cFormato = "json" THEN
cResposta = "{" & _
ToJSON( "cep", cpcep ) & "," & _
ToJSON( "logradouro", cpEndereco ) & "," & _
ToJSON( "bairro", cpBairro ) & "," & _
ToJSON( "cidade", cpCidade ) & "," & _
ToJSON( "uf", cpUF ) & "," & _
ToJSON( "ibge", cpIbge ) & "," & _
ToJSON( "infalt", cpInfAlt ) & "," & _
ToJSON( "status", cpStatus ) & "}"
ELSE
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Consultar webservice dos correios (em ASP)
A propósito....
Esses documentos, com CEPs criados, basta abrir no Windows e salvar como documento de texto.
Depois dá pra importar relativamente fácil, um registro por linha.
Esses documentos, com CEPs criados, basta abrir no Windows e salvar como documento de texto.
Depois dá pra importar relativamente fácil, um registro por linha.
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/