Skip to content
Gabriell Huver edited this page Feb 23, 2018 · 1 revision

Welcome to the SROCorreiosAPI wiki!

How to use:


public class test { public static void main(String[] args) { SROCorreiosAPI correiosAPI = new SROCorreiosAPI(); String searchObject = correiosAPI.SearchObject("PPXxxxxxXBR"); System.out.println(searchObject); } }

OutPut :

<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header><X-OPNET-Transaction-Trace:X-OPNET-Transaction-Trace xmlns:X-OPNET-Transaction-Trace="http://opnet.com">pid=xx,requestid=xxx</X-OPNET-Transaction-Trace:X-OPNET-Transaction-Trace></soapenv:Header><soapenv:Body><ns2:buscaEventosResponse xmlns:ns2="http://resource.webservice.correios.com.br/"><return><versao>2.0</versao><qtd>1</qtd><objeto><numero>PP416076405BR</numero><sigla>PP</sigla><nome>ETIQUETA LÓGICA PAC PP</nome><categoria>ENCOMENDA PAC</categoria><evento><tipo>DO</tipo><status>01</status><data>21/02/2018</data><hora>22:01</hora><descricao>Objeto encaminhado </descricao><local>CTCE PORTO ALEGRE</local><codigo>91040972</codigo><cidade>PORTO ALEGRE</cidade><uf>RS</uf><destino><local>CTCE VITORIA</local><codigo>29045975</codigo><cidade>VIANA</cidade><bairro>VILA BETHANIA</bairro><uf>ES</uf></destino></evento></objeto></return></ns2:buscaEventosResponse></soapenv:Body></soapenv:Envelope>

Clone this wiki locally