Hello,

I have several routes exposing CXF endpoints as consumers. The endpoints are defined in my camel-config.xml Spring Context using the <cxf:cxfEndpoint/> definition.

When testing them, I am regularly experiencing a "java.lang.RuntimeException: Soap 1.1 endpoint already registered on address http://localhost:9090/..."; error.

I assume that the tests do not properly shutdown the cxfEndpoint and, hence, it is still listening on the port. Even destroying the Spring application context after a test/testclass and/or stopping the camelContext does not resolve this issue.

I have taken a look into the camel-cxf component tests, but there ServerFactoryBeans are used to start the CXF service. So far, I did not manage to get a reference to the server/endpoint impl from my cxfEndpoints created in the Spring context.

Can anybody give me a hint how to properly shutdown cxfEndpoints in order to avoid this error?

Thanks,
marco

Reply via email to