1 Reply Latest reply on Jun 26, 2019 11:21 AM by ligiajaise

    Soap service not getting hit while routing through camel rest service deployed in JBOSS fuse

    ligiajaise

      Hi All,

       

      I am trying to route to an external SOAP service through CAMEL Java DSL deployed in JBOSS FUSE. I am getting this issue org.apache.cxf.transport.http.HTTPException: HTTP response '405: Method Not Allowed' when communicating with ....

       

      Did anyone face this kind of issue ? Please give any input on this.

       

      Following is my rest java DSL configuration

       

       

            restConfiguration()

                .component("undertow")

                .host("localhost")

                .port("9000")

                .contextPath("/")

                .dataFormatProperty("prettyPrint", "true")

                .enableCORS(true)

                .apiProperty("api.title", "Get Customer API")

                .apiProperty("api.version", "1.0.0 SNAPSHOT")         

                .apiContextPath("api-doc")

                .bindingMode(RestBindingMode.json)

           

       

       

            rest("/domtestcustomer/").description("Offer REST service")

              .produces("application/json")

              .enableCORS(true)

              .get("customer/{id}")          

              .param().name("id").type(RestParamType.path)

              .dataType("integer").

               endParam()     

              .route()  

              .to("direct:getCustomer")      

           

           

             from("direct:getCustomer")  

              .setBody().constant(gc)

              .removeHeaders("CamelHttp*")

          

              .to("cxf://http://localhost:8080/pocService/UserService/?serviceClass=com.test.service.UserService&defaultOperationName=getDomCustomer"+

                                  "&wrapped=true")

            

             .process(

                            new Processor(){

                                @Override

                                public void process(Exchange exchange) throws Exception {

                                   MessageContentsList ls=(MessageContentsList)exchange.getIn().getBody();

                                    exchange.getOut().setBody((DomesticCustomerDto)ls.get(0));

                                    }

                            }

                    );