I had once again I look into my test code, and discovered that I mixed
something up with TestNGs after*** methods. camelContext.stop() is
working properly. Sorry for the confusion,
marco
On 03.05.2011 14:54, Willem Jiang wrote:
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