Dear all,

hopefully you can give me some advice:
I have created with the actual camel-restdsl-openapi-plugin a plain rest
implementation. (with dto)

<artifactId>camel-restdsl-openapi-plugin</artifactId>
<version>3.1.0</version>
....
      <goal>generate-with-dto</goal>

The generated RestController looks like:

@Generated("org.apache.camel.generator.openapi.SpringBootProjectSourceCodeGenerator")
@RestController
public final class CamelRestController {
    @RequestMapping("/**")
    public void camelServlet(HttpServletRequest request,
HttpServletResponse response) {
        try {
            String path = request.getRequestURI();
            System.out.println("Handled by Spring:" + path);
            request.getServletContext().getRequestDispatcher("/camel" +
path).forward(request, response);
        } catch (Exception e) {

response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
        }
    }
}

If I make a call:
curl -X POST "
http://localhost:8081/internal/eai/ecom/delivery/status/v1/ATFO"; -H
"accept: application/json" -H "X-API-KEY: asdsad" -H "X-API-ORIGIN:
dasdasdas" -H "Content-Type: application/json" -d
"{\"consignmentId\":\"CF12345678\",\"consignmentStatus\":\"PickingStarted\",\"orderId\":\"BF12345678\"}"

I am getting a stack overflow Error with this Log output:

Handled by Spring:/internal/eai/ecom/delivery/status/v1/ATFO
Handled by Spring:/camel/internal/eai/ecom/delivery/status/v1/ATFO
Handled by Spring:/camel/camel/internal/eai/ecom/delivery/status/v1/ATFO
Handled by
Spring:/camel/camel/camel/internal/eai/ecom/delivery/status/v1/ATFO

......


And the the camel route never gets called:


restConfiguration().component("servlet").contextPath("").apiContextPath("eaiAPI");
rest("/internal/eai/ecom/delivery/status/v1")
        .post("/{shopId}")
        .id("updateConsignmentStatus")

Reply via email to