0
I am having trouble making the request to the end point of the post office. It follows below the route I am using. My biggest doubt would be the .to()
, I don’t know if I’m doing it right.
Below is the code and the code:
from("timer://foo?delay=1000&repeatCount=1")
.id("route-soap")
.log("Iniciando")
.bean(GetCep.class)
.setBody(constant("03576160"))
.setHeader("operationName", constant("consultaCEP"))
.setHeader("operationNamespace", constant("http://cliente.bean.master.sigep.bsb.correios.com.br/"))
.to("cxf://https://apps.correios.com.br/SigepMasterJPA/AtendeClienteService/AtendeCliente"
+"?serviceClass=br.com.correios.bsb.sigep.master.bean.cliente.AtendeCliente"
+ "&wsdlURL=/wsdl/correios.wsdl")
.process(new CorreiosProcessor()).log("${body}");
Obs: The goal of this is to have something in Portuguese to help the community. I see few examples of apache Camel consuming Ws Soap.