Problem when setting route for consumption Soap

Asked

Viewed 22 times

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}"); 

https://github.com/igoryy/camel-soap-spring/blob/master/src/main/java/com/example/demo/route/CorreiosRoute.java

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.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.