Hi,
I did a little more testing and found that there seems to be a conflict in the
headers.
When I add this to the XML it works:
http://remco.local:8080/custom_webapi/hello/world,
CamelServletContextPath=/custom_webapi/hello/world, Connection=keep-alive,
Content-Length=3, Content-Type=application/json, Host=remco.local:8080,
Origin=http://petstore.swagger.io,
Referer=http://petstore.swagger.io/?url=http://remco.local:8080/custom_webapi/api-docs/helloWorld,
User-Agent=Mozilla/5.0}
"
That would explain why in some cases it works, the request was already routed
to another webserver, so the headers were already changed before the exception.
--
Met vriendelijke groet,
Remco Schoen
Op 14 okt. 2016, om 16:36 heeft Remco Schoen
mailto:r.sch...@topdesk.com>> het volgende geschreven:
Hi,
I’m trying to use the REST DSL and do validation on the incoming object with
the Bean Validation Component.
I have configured my Spring XML like this:
org.apache.camel.component.bean.validator.BeanValidationException
true
422
Validation error.\n\Message:\n${exception.message}
But when I use the Swagger UI to send a message to my endpoint, I get no body
or HTTP response code. For other exceptions this approach works.
Should this work with this exception?
I’m using version 2.17.3
Kind regards,
Remco Schoen