Got JAXB error when migrate from spring to Spring boot I with Camel 3

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Got JAXB error when migrate from spring to Spring boot I with Camel 3

Jessie Ding

I will work on Spring-ws component for spring boot.
The example under the following directory is running well. When I try to migrate the example from spring to spring boot. I got some jaxb errors. I wonder whether it is jaxb problem or my endpoint configuration problems. Please help! Thanks a lot!

In the

public class IncrementRoute extends RouteBuilder {

    public void configure() throws Exception {

        JaxbDataFormat jaxb = new JaxbDataFormat(IncrementRequest.class.getPackage().getName());

        .process(new IncrementProcessor())

When I use soap UI to send request, I got the following errors.

No adapter for endpoint [Consumer[spring-ws://rootqname:(}incrementRequest?endpointMapping=%23endpointMapping]]: Is your endpoint annotated with @Endpoint, or does it implement a supported interface like MessageHandler or PayloadEndpoint?</faultstring>
I used spring boot 2.1.2 and camel 3 version.  (using Camel-spring-ws-starter and camel-jaxb-starter components)
The webservice configuration is like

public ServletRegistrationBean messageDispatcherServlet(ApplicationContext applicationContext) {
    MessageDispatcherServlet servlet = new MessageDispatcherServlet();
    servlet.setApplicationContext( applicationContext );
    ServletRegistrationBean bean = new ServletRegistrationBean(servlet, CAMEL_URL_MAPPING);
    return bean;

 * Endpoint mappings
@Bean(name = "endpointMapping")
public CamelEndpointMapping camelEndpointMapping()
throws IOException {
    CamelEndpointMapping endpointMapping = new CamelEndpointMapping();

    EndpointInterceptor[] interceptors = {validatingInterceptor(), loggingInterceptor() };
    return endpointMapping;

@Bean(name = "validatingInterceptor")
public PayloadValidatingInterceptor validatingInterceptor() {
    PayloadValidatingInterceptor payloadValidatingInterceptor = new PayloadValidatingInterceptor();
    payloadValidatingInterceptor.setSchema(new ClassPathResource( "increment.xsd" ));
    return payloadValidatingInterceptor;

@Bean(name = "loggingInterceptor")
public PayloadLoggingInterceptor loggingInterceptor() {
    return new PayloadLoggingInterceptor();

Jessie Ding