Can I have a look of you test code?
If you shutdown the camel context , the cxfconsumer should stop the server at the same time.

Willem

On 5/3/11 4:52 PM, Marco Zapletal wrote:
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



--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
         http://jnn.javaeye.com (Chinese)
Twitter: willemjiang

Connect at CamelOne May 24-26
The Open Source Integration Conference
http://camelone.com

Reply via email to