LOCAL loQueryProcessor AS "XML Web Service" * LOCAL loQueryProcessor AS "MSSOAP.SoapClient30" * Do not remove or alter following line. It is used to support IntelliSense for your XML Web service. *__VFPWSDef__: loQueryProcessor = http://consultacep.correios.com.br/office2003/query.asmx?WSDL , QueryProcessor , QueryProcessorSoap LOCAL loException, lcErrorMsg, loWSHandler TRY loWSHandler = NEWOBJECT("WSHandler",IIF(VERSION(2)=0,"",HOME()+"FFC\")+"_ws3client.vcx") loQueryProcessor = loWSHandler.SetupClient("http://consultacep.correios.com.br/office2003/query.asmx?WSDL", "QueryProcessor", "QueryProcessorSoap") * Call your XML Web service here. ex: leResult = loQueryProcessor.SomeMethod() LOCAL lcCep as String lcCep = thisform.textbox1.Value lcStringBusca = [<?xml version="1.0" encoding="utf-8"?>] + ; [<QueryPacket xmlns="urn:Microsoft.Search.Query">] + ; [<Query>] + ; [<Context>] + ; [<QueryText>&lcCep</QueryText>] + ; [</Context>] + ; [<OfficeContext xmlns="urn:Microsoft.Search.Query.Office.Context">] + ; [<ApplicationContext>]+ ; [<Name>Microsoft Office</Name>] + ; [<Version>(11.0.6568)</Version>] + ; [</ApplicationContext>] + ; [</OfficeContext>] + ; [</Query>] + ; [</QueryPacket>] lcResultado = loQueryProcessor.Query(lcStringBusca) thisform.editbox1.Value = lcResultado CATCH TO loException lcErrorMsg="Error: "+TRANSFORM(loException.Errorno)+" - "+loException.Message DO CASE CASE VARTYPE(loQueryProcessor)#"O" * Handle SOAP error connecting to web service CASE !EMPTY(loQueryProcessor.FaultCode) * Handle SOAP error calling method lcErrorMsg=lcErrorMsg+CHR(13)+loQueryProcessor.Detail OTHERWISE * Handle other error ENDCASE * Use for debugging purposes MESSAGEBOX(lcErrorMsg) FINALLY ENDTRYEspero que possamos desvendar esse mistério.