You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Christian Mueller <ch...@gmail.com> on 2011/02/10 14:42:31 UTC
Problem with multiple CXF services using the same https port
Hello list!
In our ServiceMix 4.2.0-fuse-02-00 we deployed multiple Camel bundles which
provides web services using Apache Camel. In the first phase we used http
for all services. All services used the same port number and different
context paths.
In phase two, we tried to switch all endpoints to https with the following
(general) configuration:
{code}
<camel-cxf:cxfEndpoint id="orderEntryEndpoint"
address="https://0.0.0.0:8443:/Services/OrderEntry"
serviceClass="com.xxx.yyy.interfaces.oe.OrderEntryWebService"
endpointName="ssp:OrderEntryPort"
serviceName="ssp:OrderEntryService"
wsdlURL="META-INF/oe/orderEntry.wsdl"
xmlns:ssp="http://www.xxx.com/oe/services/2">
<camel-cxf:properties>
<entry key="schema-validation-enabled" value="true" />
</camel-cxf:properties>
</camel-cxf:cxfEndpoint>
<httpj:engine-factory bus="cxf">
<httpj:engine port="8443">
<httpj:tlsServerParameters>
<sec:keyManagers keyPassword="password">
<sec:keyStore type="JKS" password="password" file="keyStore.jks" />
</sec:keyManagers>
<sec:cipherSuitesFilter>
<sec:include>.*.*</sec:include>
</sec:cipherSuitesFilter>
<sec:clientAuthentication want="false" required="false" />
</httpj:tlsServerParameters>
</httpj:engine>
</httpj:engine-factory>
{code}
But now, we receive the following exception when we deploy the second
service (using the same https port):
{code}
karaf@root> Exception in thread "SpringOsgiExtenderThread-25"
org.apache.camel.RuntimeCamelException: org.apache.cxf.intercep
tor.Fault: Could not start Jetty server: Address already in use: JVM_Bind
at
org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1055)
at
org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:103)
at
org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:593)
at
org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:7
8)
at
org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
at
org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticast
er.java:76)
at
org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:274)
at
org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:736)
at
org.springframework.osgi.context.support.AbstractOsgiBundleApplicationContext.finishRefresh(AbstractOsgiBundleAppl
icationContext.java:235)
at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecu
tionApplicationContext.java:358)
at
org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDele
gatedExecutionApplicationContext.java:320)
at
org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$Complet
eRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:136)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.apache.cxf.interceptor.Fault: Could not start Jetty server:
Address already in use: JVM_Bind
at
org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine.addServant(JettyHTTPServerEngine.java:371)
at
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.activate(JettyHTTPDestination.java:167)
at
org.apache.cxf.transport.AbstractObservable.setMessageObserver(AbstractObservable.java:48)
at
org.apache.cxf.binding.AbstractBindingFactory.addListener(AbstractBindingFactory.java:164)
at
org.apache.cxf.binding.soap.SoapBindingFactory.addListener(SoapBindingFactory.java:807)
at org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:127)
at
org.apache.camel.component.cxf.CxfConsumer.doStart(CxfConsumer.java:122)
at
org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:53)
at
org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:49)
at
org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:989)
at
org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:197)
at
org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:101)
... 12 more
Caused by: java.net.BindException: Address already in use: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
at java.net.ServerSocket.bind(ServerSocket.java:319)
at java.net.ServerSocket.<init>(ServerSocket.java:185)
at java.net.ServerSocket.<init>(ServerSocket.java:141)
at javax.net.ssl.SSLServerSocket.<init>(SSLServerSocket.java:84)
at
com.sun.net.ssl.internal.ssl.SSLServerSocketImpl.<init>(SSLServerSocketImpl.java:79)
at
com.sun.net.ssl.internal.ssl.SSLServerSocketFactoryImpl.createServerSocket(SSLServerSocketFactoryImpl.java:65)
at
org.mortbay.jetty.security.SslSocketConnector.newServerSocket(SslSocketConnector.java:450)
at
org.apache.cxf.transport.https_jetty.CXFJettySslSocketConnector.newServerSocket(CXFJettySslSocketConnector.java:13
9)
at
org.mortbay.jetty.bio.SocketConnector.open(SocketConnector.java:73)
at
org.mortbay.jetty.AbstractConnector.doStart(AbstractConnector.java:283)
at
org.mortbay.jetty.bio.SocketConnector.doStart(SocketConnector.java:147)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.Server.doStart(Server.java:235)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at
org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine.addServant(JettyHTTPServerEngine.java:338)
... 23 more
{code}
Did we something wrong? Is there another possible configuration which works?
Thanks in advance for any help,
Christian
--
View this message in context: http://camel.465427.n5.nabble.com/Problem-with-multiple-CXF-services-using-the-same-https-port-tp3379301p3379301.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Problem with multiple CXF services using the same https port
Posted by ychawla <pr...@gmail.com>.
Hello all,
I got a little further with my configuration and think I got it working. I
looked at the camel-example-cxf-osgi and it looks like all you really have
to do is remove the standalone jetty HTTP(s) listener and then provide your
address as a relative path in your Camel CXF bean. Just remove the protocol
and host.
Here are a few observations. It seems like you need to have a Jetty bean
set up to perform unit tests or have a ServiceMix instance running with the
jetty port running. The jetty bean looks like:
<httpj:engine-factory id="httpsSettings"
bus="cxf">
<httpj:engine port="8888">
<httpj:tlsServerParameters>
<sec:keyManagers keyPassword="password">
<sec:keyStore type="jks" password="password" file="keystore.jks" />
</sec:keyManagers>
<sec:cipherSuitesFilter>
<sec:include>TLS_DHE_RSA_WITH_AES_128_CBC_SHA</sec:include>
<sec:include>SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA</sec:include>
<sec:include>TLS_RSA_WITH_AES_128_CBC_SHA</sec:include>
<sec:include>SSL_RSA_WITH_3DES_EDE_CBC_SHA</sec:include>
</sec:cipherSuitesFilter>
<sec:clientAuthentication want="false"
required="false" />
</httpj:tlsServerParameters>
</httpj:engine>
</httpj:engine-factory>
You can include this jetty bean under src/test/resources as your build
process allows.
It also appears as if all urls require 'cxf' in the path. For the camel
example, the URL is:
http://localhost:8181/cxf/camel-example-cxf-osgi/webservices/incident?wsdl
There is a reference in the documentation to editing this so you can set
your own property:
Changing /cxf servlet alias
---------------------------
By default CXF Servlet is assigned a '/cxf' alias. You can
change it in a couple of ways
a. Add org.apache.cxf.osgi.cfg to the /etc directory and set
the 'org.apache.cxf.servlet.context' property, for example:
org.apache.cxf.servlet.context=/custom
b. Use shell config commands, for example :
config:edit org.apache.cxf.osgi
config:propset org.apache.cxf.servlet.context /super
config:update
To remove 'http' and only provide a secure port, comment out this line:
#org.osgi.service.http.port=8181
Hopefully this is helpful to someone who visits this thread later.
Thanks!
Yogesh
--
View this message in context: http://camel.465427.n5.nabble.com/Problem-with-multiple-CXF-services-using-the-same-https-port-tp3379301p5762271.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Problem with multiple CXF services using the same https port
Posted by ychawla <pr...@gmail.com>.
Hi Christian,
Can you provide an example of how to set this up? The situation I have is
this, which I think is the exact same as you describe.
I have a central broker server on it with many different bundles:
bundle A
bundle B
bundle C
Each bundle hosts a web service with a distinct WSDL and schema. Rather
than host each bundle on a different port which creates a firewall
nightmare, we want to set up a single port and host all service on it.
I updated my pax config file like this:
org.osgi.service.http.secure.enabled=true
org.ops4j.pax.web.ssl.keystore=etc/my-keystore.jks
org.ops4j.pax.web.ssl.password=my-keystore
org.ops4j.pax.web.ssl.keypassword=my-key
org.osgi.service.http.port.secure=8443
org.ops4j.pax.web.config.file=etc/jetty.xml
org.osgi.service.http.port=8181
javax.servlet.context.tempdir=data/pax-web-jsp
I installed the 'http' feature in ServiceMix and can see this page in a
browser served up by Jetty:
https://localhost:8443/
In my camel bundle, I set up a CXF endpoint with a URL like this:
https://localhost:8443/MyService
However, I can not start up my service in a simple Camel Context in a unit
test and I get an error like this:
java.lang.IllegalStateException: Port 8443 is configured with wrong protocol
"http" for "https://localhost:8443/MyService"
My understanding is that I should set up my CXF endpoint as usual and then
remove the embedded Jetty instance. That way the bundle doesn't attempt to
start a standalone instance of Jetty. Originally in standalone mode i used
a bean like this:
<httpj:engine-factory id="MyHttpsSettings"
bus="cxf">
Any ideas of how I can set up multiple bundles in the same SMX instance that
use different WSDLs / schemas on the same port?
Thanks!
Yogesh
--
View this message in context: http://camel.465427.n5.nabble.com/Problem-with-multiple-CXF-services-using-the-same-https-port-tp3379301p5762264.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Problem with multiple CXF services using the same https port
Posted by Daniel Kulp <dk...@apache.org>.
On Thursday, February 09, 2012 5:47:09 AM snatera wrote:
> Hello Dan!
>
> Thanks for taking your time to reply to me.
>
> In this link Fuse Source explains the way that I implemented:
> http://fusesource.com/docs/esb/4.3/cxf_security/HTTPCompatible.html#i488847
Nice of them to promote the use of generally bad ideas... :-(
> I was trying to use <import resource="classpath:META-INF/cxf/cxf.xml" />
> before, but I had this Exception:
>
> -- Exception in thread "SpringOsgiExtenderThread-29"
> org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find
> class [org.apache.cxf.bus.spring.SpringBus] for bean with name 'cxf' defined
> in OSGi
> resource[classpath:META-INF/cxf/cxf.xml|bnd.id=219|bnd.sym=cnti-sw-dev-https
> ]; nested exception is java.lang.ClassNotFoundException:
> org.apache.cxf.bus.spring.SpringBus not found from bundle [my-bundle] --
You likely need to either add some imports (org.apache.cxf.bus.spring) or add
a "Require-Bundle: org.apache.cxf.bundle" header to the manifest.
Definitely one of the more annoying things about spring-dm.
> And.. if I do this <cxf:bus name="cxf"/> I get this Exception:
>
> -- org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
> Line 24 in XML document from URL
> [bundle://219.29:0/META-INF/spring/beans.xml] is invalid; nested exception
> is org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching
> wildcard is strict, but no declaration can be found for element 'cxf:bus'.
This is easier.... You need to update the schemaLocation attribute on the
root beans to add
"http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd"
to the list of namespaces to map to a schema for validation purposes.
Dan
> --
>
> What can I do to solve this?
> Thanks a lot,
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Problem-with-multiple-CXF-services-using-
> the-same-https-port-tp3379301p5469462.html Sent from the Camel - Users
> mailing list archive at Nabble.com.
--
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com
Re: Problem with multiple CXF services using the same https port
Posted by Willem Jiang <wi...@gmail.com>.
As Dan suggested, CXF already does some hacking itself to setup a right
class loader.
You don't need to import lots of CXF related package in your bundle.
On Thu Feb 9 03:25:38 2012, Daniel Kulp wrote:
> On Wednesday, February 08, 2012 11:10:35 AM snatera wrote:
>> I could solve the last post, where I mention the Exception about 'cxf'
>> bean.
>>
>> In your beans.xml or camel-config.xml you have to put this source:
>>
>> <bean id="cxf" class="org.apache.cxf.bus.CXFBusImpl"/>
>
> Please do not do that. That's a surefire way to make sure you'll have
> configuration issues, strange errors, and issues upgrading to newer versions
> of CXF.
>
> Just import:
> <import resource="classpath:META-INF/cxf/cxf.xml" />
>
> or do a:
>
> <cxf:bus name="cxf"/>
>
> And let CXF setup the bus. CXFBusImpl is not spring aware and is also not
> even CXF extension aware. Thus, it's quite likely that nothing using that bus
> will even work.
>
>
> Dan
>
>
>
>>
>> Then, go to pom.xml and put this dependendy and this import:
>>
>> Dependency:
>>
>> <dependency>
>> <groupId>org.apache.camel</groupId>
>> <artifactId>camel-cxf</artifactId>
>> <version>${camel.version}</version>
>> </dependency>
>>
>> Import:
>>
>> <Import-Package>
>> ...,
>> org.apache.cxf.bus
>> </Import-Package>
>>
>>
>> This way I could solve it.
>>
>> --
>> View this message in context:
>> http://camel.465427.n5.nabble.com/Problem-with-multiple-CXF-services-using-
>> the-same-https-port-tp3379301p5467423.html Sent from the Camel - Users
>> mailing list archive at Nabble.com.
--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang
Re: Problem with multiple CXF services using the same https port
Posted by snatera <sn...@divux.com>.
Hello Dan!
Thanks for taking your time to reply to me.
In this link Fuse Source explains the way that I implemented:
http://fusesource.com/docs/esb/4.3/cxf_security/HTTPCompatible.html#i488847
I was trying to use <import resource="classpath:META-INF/cxf/cxf.xml" />
before, but I had this Exception:
-- Exception in thread "SpringOsgiExtenderThread-29"
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find
class [org.apache.cxf.bus.spring.SpringBus] for bean with name 'cxf' defined
in OSGi
resource[classpath:META-INF/cxf/cxf.xml|bnd.id=219|bnd.sym=cnti-sw-dev-https];
nested exception is java.lang.ClassNotFoundException:
org.apache.cxf.bus.spring.SpringBus not found from bundle [my-bundle] --
And.. if I do this <cxf:bus name="cxf"/> I get this Exception:
-- org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
Line 24 in XML document from URL
[bundle://219.29:0/META-INF/spring/beans.xml] is invalid; nested exception
is org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching
wildcard is strict, but no declaration can be found for element 'cxf:bus'.
--
What can I do to solve this?
Thanks a lot,
--
View this message in context: http://camel.465427.n5.nabble.com/Problem-with-multiple-CXF-services-using-the-same-https-port-tp3379301p5469462.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Problem with multiple CXF services using the same https port
Posted by Daniel Kulp <dk...@apache.org>.
On Wednesday, February 08, 2012 11:10:35 AM snatera wrote:
> I could solve the last post, where I mention the Exception about 'cxf'
> bean.
>
> In your beans.xml or camel-config.xml you have to put this source:
>
> <bean id="cxf" class="org.apache.cxf.bus.CXFBusImpl"/>
Please do not do that. That's a surefire way to make sure you'll have
configuration issues, strange errors, and issues upgrading to newer versions
of CXF.
Just import:
<import resource="classpath:META-INF/cxf/cxf.xml" />
or do a:
<cxf:bus name="cxf"/>
And let CXF setup the bus. CXFBusImpl is not spring aware and is also not
even CXF extension aware. Thus, it's quite likely that nothing using that bus
will even work.
Dan
>
> Then, go to pom.xml and put this dependendy and this import:
>
> Dependency:
>
> <dependency>
> <groupId>org.apache.camel</groupId>
> <artifactId>camel-cxf</artifactId>
> <version>${camel.version}</version>
> </dependency>
>
> Import:
>
> <Import-Package>
> ...,
> org.apache.cxf.bus
> </Import-Package>
>
>
> This way I could solve it.
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Problem-with-multiple-CXF-services-using-
> the-same-https-port-tp3379301p5467423.html Sent from the Camel - Users
> mailing list archive at Nabble.com.
--
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com
Re: Problem with multiple CXF services using the same https port
Posted by snatera <sn...@divux.com>.
I could solve the last post, where I mention the Exception about 'cxf' bean.
In your beans.xml or camel-config.xml you have to put this source:
<bean id="cxf" class="org.apache.cxf.bus.CXFBusImpl"/>
Then, go to pom.xml and put this dependendy and this import:
Dependency:
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-cxf</artifactId>
<version>${camel.version}</version>
</dependency>
Import:
<Import-Package>
...,
org.apache.cxf.bus
</Import-Package>
This way I could solve it.
--
View this message in context: http://camel.465427.n5.nabble.com/Problem-with-multiple-CXF-services-using-the-same-https-port-tp3379301p5467423.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Problem with multiple CXF services using the same https port
Posted by snatera <sn...@divux.com>.
Thank you for share this link.
I have a Exception with this example, it's about Bus attribute in
httpj:engine-factory element, the example defined it this way
httpj:engine-factory bus="cxf", but when I install this bundle in
fuse-esb-servicemix I have this exception:
-- Error creating bean with name
'org.apache.cxf.transport.http_jetty.JettyHTTPServerEngineFactory': Cannot
resolve reference to bean 'cxf' while setting constructor argument; nested
exception is
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean
named 'cxf' is defined --
This exception has some logic, but in the example, they don't define a 'cxf'
bean.
Could you help me what do I have to do in this case?
--
View this message in context: http://camel.465427.n5.nabble.com/Problem-with-multiple-CXF-services-using-the-same-https-port-tp3379301p5466997.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Problem with multiple CXF services using the same https port
Posted by "Moulliard, Charles" <cm...@fusesource.com>.
Hi,
You can follow instructions explained here :
http://fusesource.com/docs/esb/4.4.1/esb_security/CamelCXF-SecureProxy.html
Regards,
Charles
On Mon, Feb 6, 2012 at 8:31 PM, snatera <sn...@divux.com> wrote:
> Hi cristian,
>
> I am working with apache camel and i would like to configure https in the
> route.
> can you help me with this?
>
> This is my beans.xml:
>
> <beans xmlns="http://www.springframework.org/schema/beans"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:cxf="http://camel.apache.org/schema/cxf"
>
> xmlns:cc="
> http://www.cnti.gob.ve/servicio/ServicioDirectorioEstadoVenezolano"
> xsi:schemaLocation="
> http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans.xsd
> http://camel.apache.org/schema/spring
> http://camel.apache.org/schema/spring/camel-spring.xsd
> http://camel.apache.org/schema/cxf
> http://camel.apache.org/schema/cxf/camel-cxf.xsd
> ">
>
> <cxf:cxfEndpoint id="servicio_web_bus"
> address="http://localhost:9003/servicios"
> wsdlURL="ServicioDirectorioEstadoVenezolano.wsdl"
> serviceName="cc:ServicioDirectorioEstadoVenezolano"
> endpointName="cc:ServicioDirectorioEstadoVenezolanoUbicacion">
> <cxf:properties>
> <entry key="dataFormat" value="MESSAGE"/>
> </cxf:properties>
> </cxf:cxfEndpoint>
>
> <cxf:cxfEndpoint id="servicio_web"
> address="
> http://192.168.0.128:8080/cnti_servicios/ServicioDirectorioEstadoVenezolano
> "
> wsdlURL="ServicioDirectorioEstadoVenezolano.wsdl"
> serviceName="cc:ServicioDirectorioEstadoVenezolano"
> endpointName="cc:ServicioDirectorioEstadoVenezolanoUbicacion">
> <cxf:properties>
> <entry key="dataFormat" value="MESSAGE"/>
> </cxf:properties>
> </cxf:cxfEndpoint>
>
> <camelContext id="converter"
> xmlns="http://camel.apache.org/schema/spring" >
> <route streamCache="true">
> <from uri="cxf:bean:servicio_web_bus" />
> <to uri="cxf:bean:servicio_web" />
> </route>
> </camelContext>
>
> </beans>
>
> I hope for your response.
>
> Thank you
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Problem-with-multiple-CXF-services-using-the-same-https-port-tp3379301p5461039.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
--
--
*Charles Moulliard*
Sr. Principal Consultant | *FuseSource Corp.*
cmoulliard@fusesource.com | fusesource.com
*mobile: *+32 473 604 014
skype: cmoulliard | twitter: @cmoulliard
blog: cmoulliard.blogspot.com
<http://www.progress.com/>
Re: Problem with multiple CXF services using the same https port
Posted by snatera <sn...@divux.com>.
Hi cristian,
I am working with apache camel and i would like to configure https in the
route.
can you help me with this?
This is my beans.xml:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:cxf="http://camel.apache.org/schema/cxf"
xmlns:cc="http://www.cnti.gob.ve/servicio/ServicioDirectorioEstadoVenezolano"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd
http://camel.apache.org/schema/cxf
http://camel.apache.org/schema/cxf/camel-cxf.xsd
">
<cxf:cxfEndpoint id="servicio_web_bus"
address="http://localhost:9003/servicios"
wsdlURL="ServicioDirectorioEstadoVenezolano.wsdl"
serviceName="cc:ServicioDirectorioEstadoVenezolano"
endpointName="cc:ServicioDirectorioEstadoVenezolanoUbicacion">
<cxf:properties>
<entry key="dataFormat" value="MESSAGE"/>
</cxf:properties>
</cxf:cxfEndpoint>
<cxf:cxfEndpoint id="servicio_web"
address="http://192.168.0.128:8080/cnti_servicios/ServicioDirectorioEstadoVenezolano"
wsdlURL="ServicioDirectorioEstadoVenezolano.wsdl"
serviceName="cc:ServicioDirectorioEstadoVenezolano"
endpointName="cc:ServicioDirectorioEstadoVenezolanoUbicacion">
<cxf:properties>
<entry key="dataFormat" value="MESSAGE"/>
</cxf:properties>
</cxf:cxfEndpoint>
<camelContext id="converter"
xmlns="http://camel.apache.org/schema/spring" >
<route streamCache="true">
<from uri="cxf:bean:servicio_web_bus" />
<to uri="cxf:bean:servicio_web" />
</route>
</camelContext>
</beans>
I hope for your response.
Thank you
--
View this message in context: http://camel.465427.n5.nabble.com/Problem-with-multiple-CXF-services-using-the-same-https-port-tp3379301p5461039.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Problem with multiple CXF services using the same https port
Posted by Christian Mueller <ch...@gmail.com>.
Thank you all for your help on this example.
I think this is a very useful feature for all people which use excessive
camel-cxf in multiple different bundles (like we). Without this (and we did
it in the past), we have to choose a different port for each web service we
provided and we had to duplicate the SSL configuration for each service.
Now, it's much more easier to configure and maintain. We only have to
configure PAX WEB in org.ops4j.pax.web.cfg and everything is done.
Thank you again,
Christian
P.S.: Ade, may be a good topic for a further webinar about CXF? ;o)
--
View this message in context: http://camel.465427.n5.nabble.com/Problem-with-multiple-CXF-services-using-the-same-https-port-tp3379301p4296566.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Problem with multiple CXF services using the same https port
Posted by Willem Jiang <wi...@gmail.com>.
Hi Charles,
You can use patch -p1 < patch to apply the patch which is generated by git.
BTW, I'm working on the patch now.
Willem
On 4/11/11 2:46 PM, Moulliard, Charles wrote:
> Hi Christian,
>
> Can you send us your maven project as I do not use now GIT repo for camel
> and cannot apply your patch to build the project using subversion ?
>
> Regards,
>
> Charles
>
> On Fri, Apr 8, 2011 at 11:32 PM, Christian Müller<
> christian.mueller@gmail.com> wrote:
>
>> Hello Ade, Willem, Charles,
>>
>> I updated https://issues.apache.org/jira/browse/CAMEL-3756. May be you
>> could
>> have a look on it. I have a problem with deploying it into ServiceMix
>> 4.3.1-fuse-01-09. With ServiceMix 4.2.0-fuse-02-00 everything works as
>> expected.
>>
>> Cheers,
>> Christian
>>
>
>
>
--
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
Re: Problem with multiple CXF services using the same https port
Posted by "Moulliard, Charles" <cm...@fusesource.com>.
Hi Christian,
Can you send us your maven project as I do not use now GIT repo for camel
and cannot apply your patch to build the project using subversion ?
Regards,
Charles
On Fri, Apr 8, 2011 at 11:32 PM, Christian Müller <
christian.mueller@gmail.com> wrote:
> Hello Ade, Willem, Charles,
>
> I updated https://issues.apache.org/jira/browse/CAMEL-3756. May be you
> could
> have a look on it. I have a problem with deploying it into ServiceMix
> 4.3.1-fuse-01-09. With ServiceMix 4.2.0-fuse-02-00 everything works as
> expected.
>
> Cheers,
> Christian
>
--
--
Charles Moulliard - Sr. Principal Solution Architect
FuseSource
Phone: +32 473 604 014
Email: cmoulliard@fusesource.com
Web: http://cmoulliard.blogspot.com, http://fusesource.com
Twitter: cmoulliard
<http://www.progress.com/>
Re: Problem with multiple CXF services using the same https port
Posted by Christian Müller <ch...@gmail.com>.
Hello Ade, Willem, Charles,
I updated https://issues.apache.org/jira/browse/CAMEL-3756. May be you could
have a look on it. I have a problem with deploying it into ServiceMix
4.3.1-fuse-01-09. With ServiceMix 4.2.0-fuse-02-00 everything works as
expected.
Cheers,
Christian
Re: Problem with multiple CXF services using the same https port
Posted by Christian Müller <ch...@gmail.com>.
Hello Ade!
Good to hear from you.
If we "only" use HTTP, everithing works well. I think the
"httpj:engine-factory" config for HTTPS is the problematic configuration. I
don't know whether there is another way to configure HTTPS for the CXF
server.
Because your suggestion "OSGi HTTP service" introduce big changes (under the
hood), I would like to stay with the current solution and use multiple
different ports, if this is a missing feature for https...
Cheers,
Christian
Re: Problem with multiple CXF services using the same https port
Posted by Christian Mueller <ch...@gmail.com>.
It would be great.
Looking forward to hear from you...
Christian
--
View this message in context: http://camel.465427.n5.nabble.com/Problem-with-multiple-CXF-services-using-the-same-https-port-tp3379301p3379974.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Problem with multiple CXF services using the same https port
Posted by cm...@fusesource.com.
Will explain tomorrow morning how you can do that easily with your fusr rsb server !
Sent via BlackBerry offered by Proximus
-----Original Message-----
From: Christian Mueller <ch...@gmail.com>
Date: Thu, 10 Feb 2011 10:57:55
To: <us...@camel.apache.org>
Reply-To: users@camel.apache.org
Subject: Re: Problem with multiple CXF services using the same https port
This is nice for the future. At present, we are using ServiceMix
4.2.0-fuse-02-00 which use Karaf 1.4.0.fuse-02-00 and I need a solution for
this environment.
Any doubts about my proposal (jetty.xml in ${SMX_ROOT} and reusing this
central jetty instance)?
Christian
--
View this message in context: http://camel.465427.n5.nabble.com/Problem-with-multiple-CXF-services-using-the-same-https-port-tp3379301p3379902.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Problem with multiple CXF services using the same https port
Posted by Christian Mueller <ch...@gmail.com>.
This is nice for the future. At present, we are using ServiceMix
4.2.0-fuse-02-00 which use Karaf 1.4.0.fuse-02-00 and I need a solution for
this environment.
Any doubts about my proposal (jetty.xml in ${SMX_ROOT} and reusing this
central jetty instance)?
Christian
--
View this message in context: http://camel.465427.n5.nabble.com/Problem-with-multiple-CXF-services-using-the-same-https-port-tp3379301p3379902.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Problem with multiple CXF services using the same https port
Posted by Adrian Trenaman <TR...@progress.com>.
Excellent. I favour this approach, moving the SSL config to the container rather than having it in the service/bundle.
----- Original Message -----
From: cmoulliard@fusesource.com [mailto:cmoulliard@fusesource.com]
Sent: Thursday, February 10, 2011 12:57 PM
To: users@camel.apache.org <us...@camel.apache.org>
Subject: Re: Problem with multiple CXF services using the same https port
This has been implemented in karaf 2,2 which will be released soon
Sent via BlackBerry offered by Proximus
-----Original Message-----
From: Christian Müller <ch...@gmail.com>
Date: Thu, 10 Feb 2011 18:43:04
To: <us...@camel.apache.org>
Reply-To: users@camel.apache.org
Subject: Re: Problem with multiple CXF services using the same https port
After a fresh cup of cafe, I think I have a good idea. Why not providing a
jetty.xml file in ${SMX_HOME}/etc (like the activemq-broker.xml) and
configuring jetty there.
And in our (multiple) CXF bundle configurations, we using the already
running Jetty as Charles suggested.
Sounds also a good idea for you?
I'm working on a default jetty configuration which provides http and https
connectors. Maybe this is also interesting feature for the ServiceMix
guys...
Christian
Re: Problem with multiple CXF services using the same https port
Posted by cm...@fusesource.com.
This has been implemented in karaf 2,2 which will be released soon
Sent via BlackBerry offered by Proximus
-----Original Message-----
From: Christian Müller <ch...@gmail.com>
Date: Thu, 10 Feb 2011 18:43:04
To: <us...@camel.apache.org>
Reply-To: users@camel.apache.org
Subject: Re: Problem with multiple CXF services using the same https port
After a fresh cup of cafe, I think I have a good idea. Why not providing a
jetty.xml file in ${SMX_HOME}/etc (like the activemq-broker.xml) and
configuring jetty there.
And in our (multiple) CXF bundle configurations, we using the already
running Jetty as Charles suggested.
Sounds also a good idea for you?
I'm working on a default jetty configuration which provides http and https
connectors. Maybe this is also interesting feature for the ServiceMix
guys...
Christian
Re: Problem with multiple CXF services using the same https port
Posted by Christian Müller <ch...@gmail.com>.
After a fresh cup of cafe, I think I have a good idea. Why not providing a
jetty.xml file in ${SMX_HOME}/etc (like the activemq-broker.xml) and
configuring jetty there.
And in our (multiple) CXF bundle configurations, we using the already
running Jetty as Charles suggested.
Sounds also a good idea for you?
I'm working on a default jetty configuration which provides http and https
connectors. Maybe this is also interesting feature for the ServiceMix
guys...
Christian
Re: Problem with multiple CXF services using the same https port
Posted by Christian Müller <ch...@gmail.com>.
That's the same question I had (where can we configure the SSL). :-)
If it's work, this will be grat!
Christian
Re: Problem with multiple CXF services using the same https port
Posted by Adrian Trenaman <tr...@progress.com>.
Nice one Charles. Question then is - can you point to where can we
configure the SSL options for the servlet engine?
Cheers,
Ade.
On 10/02/2011 14:05, Moulliard, Charles wrote:
> Hi,
>
> To avoid that jetty creates both HTTP servers competing for the same port
> number, you must use a relative path for the address
> address="https://0.0.0.0:8443:/Services/OrderEntry" -->
> address="/Services/OrderEntry". In this case, the camel cxf servlet will be
> registered with the Servlet Engine configured by default.
>
> Here is an example : http://camel.apache.org/cxf-tomcat-example.html
>
> Regards,
>
> Charles
>
> On Thu, Feb 10, 2011 at 2:49 PM, Adrian Trenaman<tr...@progress.com>wrote:
>
>> Hi Christian,
>>
>> Both bundles are separately competing for the same port - so whoever gets
>> it first wins, and the loser then complains. AFAIK, this will happen for
>> both HTTP and HTTPS ports; I'm not sure of a way to share the port using the
>> normal CXF configuration.
>>
>> However, you could just configure the CXF services to use the OSGi HTTP
>> service from ServiceMix, and then put your SSL/TLS configuration on that
>> port. Would that work for you?
>>
>> Cheers,
>> Ade
>>
>> On 10/02/2011 13:42, Christian Mueller wrote:
>>
>>>
>>> Hello list!
>>>
>>> In our ServiceMix 4.2.0-fuse-02-00 we deployed multiple Camel bundles
>>> which
>>> provides web services using Apache Camel. In the first phase we used http
>>> for all services. All services used the same port number and different
>>> context paths.
>>> In phase two, we tried to switch all endpoints to https with the following
>>> (general) configuration:
>>>
>>> {code}
>>> <camel-cxf:cxfEndpoint id="orderEntryEndpoint"
>>> address="https://0.0.0.0:8443:/Services/OrderEntry"
>>>
>>> serviceClass="com.xxx.yyy.interfaces.oe.OrderEntryWebService"
>>> endpointName="ssp:OrderEntryPort"
>>> serviceName="ssp:OrderEntryService"
>>> wsdlURL="META-INF/oe/orderEntry.wsdl"
>>> xmlns:ssp="http://www.xxx.com/oe/services/2">
>>>
>>> <camel-cxf:properties>
>>> <entry key="schema-validation-enabled" value="true"
>>> />
>>> </camel-cxf:properties>
>>> </camel-cxf:cxfEndpoint>
>>>
>>> <httpj:engine-factory bus="cxf">
>>> <httpj:engine port="8443">
>>> <httpj:tlsServerParameters>
>>> <sec:keyManagers keyPassword="password">
>>> <sec:keyStore type="JKS"
>>> password="password" file="keyStore.jks" />
>>> </sec:keyManagers>
>>> <sec:cipherSuitesFilter>
>>> <sec:include>.*.*</sec:include>
>>> </sec:cipherSuitesFilter>
>>> <sec:clientAuthentication want="false"
>>> required="false" />
>>> </httpj:tlsServerParameters>
>>> </httpj:engine>
>>> </httpj:engine-factory>
>>> {code}
>>>
>>> But now, we receive the following exception when we deploy the second
>>> service (using the same https port):
>>>
>>> {code}
>>> karaf@root> Exception in thread "SpringOsgiExtenderThread-25"
>>> org.apache.camel.RuntimeCamelException: org.apache.cxf.intercep
>>> tor.Fault: Could not start Jetty server: Address already in use: JVM_Bind
>>> at
>>>
>>> org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1055)
>>> at
>>>
>>> org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:103)
>>> at
>>>
>>> org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:593)
>>> at
>>>
>>> org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:7
>>> 8)
>>> at
>>>
>>> org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
>>> at
>>>
>>> org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticast
>>> er.java:76)
>>> at
>>>
>>> org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:274)
>>> at
>>>
>>> org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:736)
>>> at
>>>
>>> org.springframework.osgi.context.support.AbstractOsgiBundleApplicationContext.finishRefresh(AbstractOsgiBundleAppl
>>> icationContext.java:235)
>>> at
>>>
>>> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecu
>>> tionApplicationContext.java:358)
>>> at
>>>
>>> org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
>>> at
>>>
>>> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDele
>>> gatedExecutionApplicationContext.java:320)
>>> at
>>>
>>> org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$Complet
>>> eRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:136)
>>> at java.lang.Thread.run(Thread.java:619)
>>> Caused by: org.apache.cxf.interceptor.Fault: Could not start Jetty server:
>>> Address already in use: JVM_Bind
>>> at
>>>
>>> org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine.addServant(JettyHTTPServerEngine.java:371)
>>> at
>>>
>>> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.activate(JettyHTTPDestination.java:167)
>>> at
>>>
>>> org.apache.cxf.transport.AbstractObservable.setMessageObserver(AbstractObservable.java:48)
>>> at
>>>
>>> org.apache.cxf.binding.AbstractBindingFactory.addListener(AbstractBindingFactory.java:164)
>>> at
>>>
>>> org.apache.cxf.binding.soap.SoapBindingFactory.addListener(SoapBindingFactory.java:807)
>>> at org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:127)
>>> at
>>> org.apache.camel.component.cxf.CxfConsumer.doStart(CxfConsumer.java:122)
>>> at
>>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:53)
>>> at
>>> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:49)
>>> at
>>>
>>> org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:989)
>>> at
>>>
>>> org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:197)
>>> at
>>>
>>> org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:101)
>>> ... 12 more
>>> Caused by: java.net.BindException: Address already in use: JVM_Bind
>>> at java.net.PlainSocketImpl.socketBind(Native Method)
>>> at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
>>> at java.net.ServerSocket.bind(ServerSocket.java:319)
>>> at java.net.ServerSocket.<init>(ServerSocket.java:185)
>>> at java.net.ServerSocket.<init>(ServerSocket.java:141)
>>> at javax.net.ssl.SSLServerSocket.<init>(SSLServerSocket.java:84)
>>> at
>>>
>>> com.sun.net.ssl.internal.ssl.SSLServerSocketImpl.<init>(SSLServerSocketImpl.java:79)
>>> at
>>>
>>> com.sun.net.ssl.internal.ssl.SSLServerSocketFactoryImpl.createServerSocket(SSLServerSocketFactoryImpl.java:65)
>>> at
>>>
>>> org.mortbay.jetty.security.SslSocketConnector.newServerSocket(SslSocketConnector.java:450)
>>> at
>>>
>>> org.apache.cxf.transport.https_jetty.CXFJettySslSocketConnector.newServerSocket(CXFJettySslSocketConnector.java:13
>>> 9)
>>> at
>>> org.mortbay.jetty.bio.SocketConnector.open(SocketConnector.java:73)
>>> at
>>> org.mortbay.jetty.AbstractConnector.doStart(AbstractConnector.java:283)
>>> at
>>> org.mortbay.jetty.bio.SocketConnector.doStart(SocketConnector.java:147)
>>> at
>>> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
>>> at org.mortbay.jetty.Server.doStart(Server.java:235)
>>> at
>>> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
>>> at
>>>
>>> org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine.addServant(JettyHTTPServerEngine.java:338)
>>> ... 23 more
>>>
>>> {code}
>>>
>>> Did we something wrong? Is there another possible configuration which
>>> works?
>>>
>>> Thanks in advance for any help,
>>> Christian
>>>
>>
>
>
Re: Problem with multiple CXF services using the same https port
Posted by Christian Mueller <ch...@gmail.com>.
I could successful downgrade the
camel-example-reportincident-ws-security-osgi to Camel 2.2.0 (to deploy it
into ServiceMix 4.2.0-fuse-02-00) with only one little Code change.
I added "META-INF.cxf.osgi," to Import-Package definition in the pom.xml.
I removed the following import from camel-context.xml
<import resource="classpath:META-INF/cxf/cxf-extension-http-jetty.xml"/>
I added the following two imports in camel-context.xml
<import resource="classpath:META-INF/cxf/cxf-extension-http.xml"/>
<import resource="classpath:META-INF/cxf/osgi/cxf-extension-osgi.xml" />
I changed the address in cxf:cxfEndpoint to
address="/camel-example-reportincident/webservices/incident"
AND IT WORKS!!!
Must be something wrong in my code. I will analyze this and add an FAQ entry
and/or a new camel-example-reportincident-osgi example (at present we do not
have an example which use the Camel CXF bean binding in OSGI with a
cxfEndpoint configuration using a relative path without protocol, host or
port).
Thanks Willem and Charles for your help. I will keep you posted...
Christian
--
View this message in context: http://camel.465427.n5.nabble.com/Problem-with-multiple-CXF-services-using-the-same-https-port-tp3379301p3410289.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Problem with multiple CXF services using the same https port
Posted by Charles Moulliard <cm...@gmail.com>.
Hi Christian,
Have you tried to disable the webconsole on SMX ?
Regards,
Charles
On Fri, Mar 4, 2011 at 5:08 PM, Christian Müller
<ch...@gmail.com> wrote:
> It looks like it doesn't work.
> Charles also had this problem (everything looks good, but it seams to
> service is not listening for the web service endpoint). See [1]. And another
> user also [2].
>
> The working CXF OSGI examples using the jaxws configuration.
>
> I will test the Camel report incident example using the OSGI servlet
> transport. If it fails, I will raise a JIRA...
>
> [1]
> http://camel.465427.n5.nabble.com/camel-cxf-relative-path-for-webService-resource-td3396633.html
> [2]
> http://servicemix.396122.n5.nabble.com/A-cxf-Endpoint-in-Servicemix-td419588.html
>
> Christian
>
Re: Problem with multiple CXF services using the same https port
Posted by Christian Müller <ch...@gmail.com>.
It looks like it doesn't work.
Charles also had this problem (everything looks good, but it seams to
service is not listening for the web service endpoint). See [1]. And another
user also [2].
The working CXF OSGI examples using the jaxws configuration.
I will test the Camel report incident example using the OSGI servlet
transport. If it fails, I will raise a JIRA...
[1]
http://camel.465427.n5.nabble.com/camel-cxf-relative-path-for-webService-resource-td3396633.html
[2]
http://servicemix.396122.n5.nabble.com/A-cxf-Endpoint-in-Servicemix-td419588.html
Christian
Re: Problem with multiple CXF services using the same https port
Posted by Christian Mueller <ch...@gmail.com>.
Thank you Charles and Willem for your responses!
I try to collect the information I received from you:
- I do not have to change my cxfEndpoint configuration. It can/should looks
like the following:
<camel-cxf:cxfEndpoint id="wsService"
address="services/OrderEntryService"
serviceClass="com.company.product.OrderEntryService"/>
- In my Spring configuration, the cxf resource imports should looks like the
following:
<import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-http.xml" />
<import resource="classpath:META-INF/cxf/osgi/cxf-extension-osgi.xml" />
This means I have to remove the import:
<import resource="classpath:META-INF/cxf/cxf-extension-http-jetty.xml" />
And add the imports:
<import resource="classpath:META-INF/cxf/cxf-extension-http.xml" />
<import resource="classpath:META-INF/cxf/osgi/cxf-extension-osgi.xml" />
I still have to questions:
- The import of the resource "META-INF/cxf/osgi/cxf-extension-osgi.xml"
introduce a dependency to OSGI which we normaly configure in a separate
Spring configuration (bundle-context-OSGI.xml). Should we put this import
into bundle-context-OSGI.xml and in our unit tests, which didn't load this
Spring configuration, we should import another or no additional resource?
- If I want test this route in a normal unit test (no OSGI environment), do
I have to start e.g. Jetty be myself and CXF will detect this and use the
Jetty? Is there any code you can share with me?
- Something else I have to have in mind?
Thanks in advance,
Christian
--
View this message in context: http://camel.465427.n5.nabble.com/Problem-with-multiple-CXF-services-using-the-same-https-port-tp3379301p3409357.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Problem with multiple CXF services using the same https port
Posted by Willem Jiang <wi...@gmail.com>.
Hi Christian,
Please check out my comments in the mail.
On 3/4/11 3:46 PM, Christian Mueller wrote:
> Hello Willem!
>
> I have the same problem... :-(
> I will try to describe the problem and ask my question again:
> In our integration project we use multiple Camel OSGI bundles which expose
> multiple web servives (via Camel CXF consumer). We use the
> camel-cxf:cxfEndpoint configuration (including properties and interceptors)
> with an address like address="
> https://0.0.0.0:8443/Services/OrderEntryService" and the
> httpj:engine-factory configuration (see my first post).
>
> We have the problem, that we have to configure a different port for each web
> service we expose to prevent the Could not start Jetty server: Address
> already in use: JVM_Bind Exception (also in my first post).
>
> Charles suggested to use an address like
> address="/Services/OrderEntryService". My questions are:
> - At present, I use in my route from("cxf:bean:orderEntryService"). Do I
> have to use now from(cxf:/Services/OrderEntryService?...) or is it also
> possible with the CXF bean binding?
> - If I can still use the CXF bean binding: I didn't found any unit test or
> example which test/shows this possibility. Currently I don't know how I can
> test this (I think I have to start Jetty and configure it for HTTPS in my
> set up method).
> - If I have to use from("cxf:/Services/OrderEntryService"), how I can
> configure our cxf properties (e.g. schema-validation-enabled) and
> interceptors?
I'm afraid you have to use the cxf;bean way to configure the CXF
endpoint, as you know there are lots properties cannot be configured
from a simple URI.
>
> In short: My goal is to provide multiple web services (Apache CXF consumers)
> which use the same port for the HTTPS configuration. It should be possible
> to switch to HTTP without touching my Spring configuration (only my
> externalized environment specific properties).
>
For the CXF consumers, current camel-cxf supports to configure HTTPS
parameters per port, I think if you change camel-cxf endpoint address to
servlet, CXF will not load the configuration on the Jetty engine per port.
> The next FAQ entry I would like to write... ;-)
>
> Christian
>
> On Fri, Mar 4, 2011 at 5:48 AM, Willem.Jiang [via Camel]<
> ml-node+3408939-1332669798-65331@n5.nabble.com> wrote:
>
>> Hi Christian,
>>
>> I cannot see any code inside the {code}{code} block.
>> And I didn't get your question.
>>
>> Willem
>>
>> ------------------------------
>> If you reply to this email, your message will be added to the discussion
>> below:
>>
>> http://camel.465427.n5.nabble.com/Problem-with-multiple-CXF-services-using-the-same-https-port-tp3379301p3408939.html
>> To unsubscribe from Problem with multiple CXF services using the same
>> https port, click here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3379301&code=Y2hyaXN0aWFuLm11ZWxsZXJAZ21haWwuY29tfDMzNzkzMDF8LTY2MDEwNjQxMA==>.
>>
>>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Problem-with-multiple-CXF-services-using-the-same-https-port-tp3379301p3409050.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Re: Problem with multiple CXF services using the same https port
Posted by "Moulliard, Charles" <cm...@fusesource.com>.
On Fri, Mar 4, 2011 at 8:46 AM, Christian Mueller <
christian.mueller@gmail.com> wrote:
> Hello Willem!
>
> I have the same problem... :-(
> I will try to describe the problem and ask my question again:
> In our integration project we use multiple Camel OSGI bundles which expose
> multiple web servives (via Camel CXF consumer). We use the
> camel-cxf:cxfEndpoint configuration (including properties and interceptors)
> with an address like address="
> https://0.0.0.0:8443/Services/OrderEntryService" and the
> httpj:engine-factory configuration (see my first post).
>
> We have the problem, that we have to configure a different port for each
> web
> service we expose to prevent the Could not start Jetty server: Address
> already in use: JVM_Bind Exception (also in my first post).
>
> Charles suggested to use an address like
> address="/Services/OrderEntryService". My questions are:
> - At present, I use in my route from("cxf:bean:orderEntryService"). Do I
> have to use now from(cxf:/Services/OrderEntryService?...) or is it also
> possible with the CXF bean binding?
>
>> The configuration of the Camel-cxf component remains the same
--> rom("cxf:bean:orderEntryService")
> - If I can still use the CXF bean binding: I didn't found any unit test or
> example which test/shows this possibility. Currently I don't know how I can
> test this (I think I have to start Jetty and configure it for HTTPS in my
> set up method).
>
>> To use CXF OSGI Servlet instead of registering a new Jetty HTTP Server,
you must configure your xml like that
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:cxf="http://camel.apache.org/schema/cxf"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-
cxf.xsd
http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd
">
<import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-http.xml" />
<import resource="classpath:META-INF/cxf/osgi/cxf-extension-osgi.xml" />
<cxf:cxfEndpoint id="wsService"
address="services/getAlias"
serviceClass="com.sfr.pates.GetAliasManager"/>
...
You should be access the service from "http://localhost:8081/cxf
/services/getAlias"
> - If I have to use from("cxf:/Services/OrderEntryService"), how I can
> configure our cxf properties (e.g. schema-validation-enabled) and
> interceptors?
>
>> that does not change
>
> In short: My goal is to provide multiple web services (Apache CXF
> consumers)
> which use the same port for the HTTPS configuration. It should be possible
> to switch to HTTP without touching my Spring configuration (only my
> externalized environment specific properties).
>
> The next FAQ entry I would like to write... ;-)
>
> Christian
>
> On Fri, Mar 4, 2011 at 5:48 AM, Willem.Jiang [via Camel] <
> ml-node+3408939-1332669798-65331@n5.nabble.com> wrote:
>
> > Hi Christian,
> >
> > I cannot see any code inside the {code}{code} block.
> > And I didn't get your question.
> >
> > Willem
> >
> > ------------------------------
> > If you reply to this email, your message will be added to the discussion
> > below:
> >
> >
> http://camel.465427.n5.nabble.com/Problem-with-multiple-CXF-services-using-the-same-https-port-tp3379301p3408939.html
> > To unsubscribe from Problem with multiple CXF services using the same
> > https port, click here<
> http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3379301&code=Y2hyaXN0aWFuLm11ZWxsZXJAZ21haWwuY29tfDMzNzkzMDF8LTY2MDEwNjQxMA==
> >.
> >
> >
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Problem-with-multiple-CXF-services-using-the-same-https-port-tp3379301p3409050.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
--
--
Charles Moulliard - Sr. Principal Solution Architect
FuseSource
Phone: +32 473 604 014
Email: cmoulliard@fusesource.com
Web: http://cmoulliard.blogspot.com, http://fusesource.com
Twitter: cmoulliard
"The experts in open source integration and messaging."
<http://www.progress.com/>
Re: Problem with multiple CXF services using the same https port
Posted by Christian Mueller <ch...@gmail.com>.
Hello Willem!
I have the same problem... :-(
I will try to describe the problem and ask my question again:
In our integration project we use multiple Camel OSGI bundles which expose
multiple web servives (via Camel CXF consumer). We use the
camel-cxf:cxfEndpoint configuration (including properties and interceptors)
with an address like address="
https://0.0.0.0:8443/Services/OrderEntryService" and the
httpj:engine-factory configuration (see my first post).
We have the problem, that we have to configure a different port for each web
service we expose to prevent the Could not start Jetty server: Address
already in use: JVM_Bind Exception (also in my first post).
Charles suggested to use an address like
address="/Services/OrderEntryService". My questions are:
- At present, I use in my route from("cxf:bean:orderEntryService"). Do I
have to use now from(cxf:/Services/OrderEntryService?...) or is it also
possible with the CXF bean binding?
- If I can still use the CXF bean binding: I didn't found any unit test or
example which test/shows this possibility. Currently I don't know how I can
test this (I think I have to start Jetty and configure it for HTTPS in my
set up method).
- If I have to use from("cxf:/Services/OrderEntryService"), how I can
configure our cxf properties (e.g. schema-validation-enabled) and
interceptors?
In short: My goal is to provide multiple web services (Apache CXF consumers)
which use the same port for the HTTPS configuration. It should be possible
to switch to HTTP without touching my Spring configuration (only my
externalized environment specific properties).
The next FAQ entry I would like to write... ;-)
Christian
On Fri, Mar 4, 2011 at 5:48 AM, Willem.Jiang [via Camel] <
ml-node+3408939-1332669798-65331@n5.nabble.com> wrote:
> Hi Christian,
>
> I cannot see any code inside the {code}{code} block.
> And I didn't get your question.
>
> Willem
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/Problem-with-multiple-CXF-services-using-the-same-https-port-tp3379301p3408939.html
> To unsubscribe from Problem with multiple CXF services using the same
> https port, click here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3379301&code=Y2hyaXN0aWFuLm11ZWxsZXJAZ21haWwuY29tfDMzNzkzMDF8LTY2MDEwNjQxMA==>.
>
>
--
View this message in context: http://camel.465427.n5.nabble.com/Problem-with-multiple-CXF-services-using-the-same-https-port-tp3379301p3409050.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Problem with multiple CXF services using the same https port
Posted by Christian Mueller <ch...@gmail.com>.
Me again...
In my privios mail I forgot to mention that our Camel bundles will be
deployed into ServiceMix and we will use PAX Web to configure (HTTPS) and
start a Jetty instance.
It would be nice if we can (re-) use this instance. If this is possible, we
have a centralized Web/Jetty configuration and doesn't have to configure
each Bundle (protocol, port, keystore, password, ...).
Christian
--
View this message in context: http://camel.465427.n5.nabble.com/Problem-with-multiple-CXF-services-using-the-same-https-port-tp3379301p3409094.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Problem with multiple CXF services using the same https port
Posted by "Willem.Jiang" <wi...@gmail.com>.
Hi Christian,
I cannot see any code inside the {code}{code} block.
And I didn't get your question.
Willem
--
View this message in context: http://camel.465427.n5.nabble.com/Problem-with-multiple-CXF-services-using-the-same-https-port-tp3379301p3408939.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Problem with multiple CXF services using the same https port
Posted by Christian Mueller <ch...@gmail.com>.
And how I can test this configuration which should use https? Any suggestions
or code sample?
Thanks in advance,
Christian
--
View this message in context: http://camel.465427.n5.nabble.com/Problem-with-multiple-CXF-services-using-the-same-https-port-tp3379301p3408664.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Problem with multiple CXF services using the same https port
Posted by Christian Mueller <ch...@gmail.com>.
At present, we have a similar configuration like this one:
{code}
{code}
if we change to the solution you suggest, the configuration should looks
like this:
{code}
{code}
Right?
But I doesn't know how to configure the camel-cxf:properties and
camel-cxf:inInterceptors. Any help is welcome.
Christian
--
View this message in context: http://camel.465427.n5.nabble.com/Problem-with-multiple-CXF-services-using-the-same-https-port-tp3379301p3408654.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Problem with multiple CXF services using the same https port
Posted by "Moulliard, Charles" <cm...@fusesource.com>.
Hi,
To avoid that jetty creates both HTTP servers competing for the same port
number, you must use a relative path for the address
address="https://0.0.0.0:8443:/Services/OrderEntry" -->
address="/Services/OrderEntry". In this case, the camel cxf servlet will be
registered with the Servlet Engine configured by default.
Here is an example : http://camel.apache.org/cxf-tomcat-example.html
Regards,
Charles
On Thu, Feb 10, 2011 at 2:49 PM, Adrian Trenaman <tr...@progress.com>wrote:
> Hi Christian,
>
> Both bundles are separately competing for the same port - so whoever gets
> it first wins, and the loser then complains. AFAIK, this will happen for
> both HTTP and HTTPS ports; I'm not sure of a way to share the port using the
> normal CXF configuration.
>
> However, you could just configure the CXF services to use the OSGi HTTP
> service from ServiceMix, and then put your SSL/TLS configuration on that
> port. Would that work for you?
>
> Cheers,
> Ade
>
> On 10/02/2011 13:42, Christian Mueller wrote:
>
>>
>> Hello list!
>>
>> In our ServiceMix 4.2.0-fuse-02-00 we deployed multiple Camel bundles
>> which
>> provides web services using Apache Camel. In the first phase we used http
>> for all services. All services used the same port number and different
>> context paths.
>> In phase two, we tried to switch all endpoints to https with the following
>> (general) configuration:
>>
>> {code}
>> <camel-cxf:cxfEndpoint id="orderEntryEndpoint"
>> address="https://0.0.0.0:8443:/Services/OrderEntry"
>>
>> serviceClass="com.xxx.yyy.interfaces.oe.OrderEntryWebService"
>> endpointName="ssp:OrderEntryPort"
>> serviceName="ssp:OrderEntryService"
>> wsdlURL="META-INF/oe/orderEntry.wsdl"
>> xmlns:ssp="http://www.xxx.com/oe/services/2">
>>
>> <camel-cxf:properties>
>> <entry key="schema-validation-enabled" value="true"
>> />
>> </camel-cxf:properties>
>> </camel-cxf:cxfEndpoint>
>>
>> <httpj:engine-factory bus="cxf">
>> <httpj:engine port="8443">
>> <httpj:tlsServerParameters>
>> <sec:keyManagers keyPassword="password">
>> <sec:keyStore type="JKS"
>> password="password" file="keyStore.jks" />
>> </sec:keyManagers>
>> <sec:cipherSuitesFilter>
>> <sec:include>.*.*</sec:include>
>> </sec:cipherSuitesFilter>
>> <sec:clientAuthentication want="false"
>> required="false" />
>> </httpj:tlsServerParameters>
>> </httpj:engine>
>> </httpj:engine-factory>
>> {code}
>>
>> But now, we receive the following exception when we deploy the second
>> service (using the same https port):
>>
>> {code}
>> karaf@root> Exception in thread "SpringOsgiExtenderThread-25"
>> org.apache.camel.RuntimeCamelException: org.apache.cxf.intercep
>> tor.Fault: Could not start Jetty server: Address already in use: JVM_Bind
>> at
>>
>> org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1055)
>> at
>>
>> org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:103)
>> at
>>
>> org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:593)
>> at
>>
>> org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:7
>> 8)
>> at
>>
>> org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
>> at
>>
>> org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticast
>> er.java:76)
>> at
>>
>> org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:274)
>> at
>>
>> org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:736)
>> at
>>
>> org.springframework.osgi.context.support.AbstractOsgiBundleApplicationContext.finishRefresh(AbstractOsgiBundleAppl
>> icationContext.java:235)
>> at
>>
>> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecu
>> tionApplicationContext.java:358)
>> at
>>
>> org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
>> at
>>
>> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDele
>> gatedExecutionApplicationContext.java:320)
>> at
>>
>> org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$Complet
>> eRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:136)
>> at java.lang.Thread.run(Thread.java:619)
>> Caused by: org.apache.cxf.interceptor.Fault: Could not start Jetty server:
>> Address already in use: JVM_Bind
>> at
>>
>> org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine.addServant(JettyHTTPServerEngine.java:371)
>> at
>>
>> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.activate(JettyHTTPDestination.java:167)
>> at
>>
>> org.apache.cxf.transport.AbstractObservable.setMessageObserver(AbstractObservable.java:48)
>> at
>>
>> org.apache.cxf.binding.AbstractBindingFactory.addListener(AbstractBindingFactory.java:164)
>> at
>>
>> org.apache.cxf.binding.soap.SoapBindingFactory.addListener(SoapBindingFactory.java:807)
>> at org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:127)
>> at
>> org.apache.camel.component.cxf.CxfConsumer.doStart(CxfConsumer.java:122)
>> at
>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:53)
>> at
>> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:49)
>> at
>>
>> org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:989)
>> at
>>
>> org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:197)
>> at
>>
>> org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:101)
>> ... 12 more
>> Caused by: java.net.BindException: Address already in use: JVM_Bind
>> at java.net.PlainSocketImpl.socketBind(Native Method)
>> at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
>> at java.net.ServerSocket.bind(ServerSocket.java:319)
>> at java.net.ServerSocket.<init>(ServerSocket.java:185)
>> at java.net.ServerSocket.<init>(ServerSocket.java:141)
>> at javax.net.ssl.SSLServerSocket.<init>(SSLServerSocket.java:84)
>> at
>>
>> com.sun.net.ssl.internal.ssl.SSLServerSocketImpl.<init>(SSLServerSocketImpl.java:79)
>> at
>>
>> com.sun.net.ssl.internal.ssl.SSLServerSocketFactoryImpl.createServerSocket(SSLServerSocketFactoryImpl.java:65)
>> at
>>
>> org.mortbay.jetty.security.SslSocketConnector.newServerSocket(SslSocketConnector.java:450)
>> at
>>
>> org.apache.cxf.transport.https_jetty.CXFJettySslSocketConnector.newServerSocket(CXFJettySslSocketConnector.java:13
>> 9)
>> at
>> org.mortbay.jetty.bio.SocketConnector.open(SocketConnector.java:73)
>> at
>> org.mortbay.jetty.AbstractConnector.doStart(AbstractConnector.java:283)
>> at
>> org.mortbay.jetty.bio.SocketConnector.doStart(SocketConnector.java:147)
>> at
>> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
>> at org.mortbay.jetty.Server.doStart(Server.java:235)
>> at
>> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
>> at
>>
>> org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine.addServant(JettyHTTPServerEngine.java:338)
>> ... 23 more
>>
>> {code}
>>
>> Did we something wrong? Is there another possible configuration which
>> works?
>>
>> Thanks in advance for any help,
>> Christian
>>
>
--
--
Charles Moulliard - Sr. Principal Solution Architect
FuseSource
Phone: +32 473 604 014
Email: cmoulliard@fusesource.com
Web: http://cmoulliard.blogspot.com, http://fusesource.com
Twitter: cmoulliard
"The experts in open source integration and messaging."
<http://www.progress.com/>
Re: Problem with multiple CXF services using the same https port
Posted by Adrian Trenaman <tr...@progress.com>.
Hi Christian,
Both bundles are separately competing for the same port - so whoever
gets it first wins, and the loser then complains. AFAIK, this will
happen for both HTTP and HTTPS ports; I'm not sure of a way to share the
port using the normal CXF configuration.
However, you could just configure the CXF services to use the OSGi HTTP
service from ServiceMix, and then put your SSL/TLS configuration on that
port. Would that work for you?
Cheers,
Ade
On 10/02/2011 13:42, Christian Mueller wrote:
>
> Hello list!
>
> In our ServiceMix 4.2.0-fuse-02-00 we deployed multiple Camel bundles which
> provides web services using Apache Camel. In the first phase we used http
> for all services. All services used the same port number and different
> context paths.
> In phase two, we tried to switch all endpoints to https with the following
> (general) configuration:
>
> {code}
> <camel-cxf:cxfEndpoint id="orderEntryEndpoint"
> address="https://0.0.0.0:8443:/Services/OrderEntry"
> serviceClass="com.xxx.yyy.interfaces.oe.OrderEntryWebService"
> endpointName="ssp:OrderEntryPort"
> serviceName="ssp:OrderEntryService"
> wsdlURL="META-INF/oe/orderEntry.wsdl"
> xmlns:ssp="http://www.xxx.com/oe/services/2">
>
> <camel-cxf:properties>
> <entry key="schema-validation-enabled" value="true" />
> </camel-cxf:properties>
> </camel-cxf:cxfEndpoint>
>
> <httpj:engine-factory bus="cxf">
> <httpj:engine port="8443">
> <httpj:tlsServerParameters>
> <sec:keyManagers keyPassword="password">
> <sec:keyStore type="JKS" password="password" file="keyStore.jks" />
> </sec:keyManagers>
> <sec:cipherSuitesFilter>
> <sec:include>.*.*</sec:include>
> </sec:cipherSuitesFilter>
> <sec:clientAuthentication want="false" required="false" />
> </httpj:tlsServerParameters>
> </httpj:engine>
> </httpj:engine-factory>
> {code}
>
> But now, we receive the following exception when we deploy the second
> service (using the same https port):
>
> {code}
> karaf@root> Exception in thread "SpringOsgiExtenderThread-25"
> org.apache.camel.RuntimeCamelException: org.apache.cxf.intercep
> tor.Fault: Could not start Jetty server: Address already in use: JVM_Bind
> at
> org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1055)
> at
> org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:103)
> at
> org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:593)
> at
> org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:7
> 8)
> at
> org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
> at
> org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticast
> er.java:76)
> at
> org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:274)
> at
> org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:736)
> at
> org.springframework.osgi.context.support.AbstractOsgiBundleApplicationContext.finishRefresh(AbstractOsgiBundleAppl
> icationContext.java:235)
> at
> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecu
> tionApplicationContext.java:358)
> at
> org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
> at
> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDele
> gatedExecutionApplicationContext.java:320)
> at
> org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$Complet
> eRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:136)
> at java.lang.Thread.run(Thread.java:619)
> Caused by: org.apache.cxf.interceptor.Fault: Could not start Jetty server:
> Address already in use: JVM_Bind
> at
> org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine.addServant(JettyHTTPServerEngine.java:371)
> at
> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.activate(JettyHTTPDestination.java:167)
> at
> org.apache.cxf.transport.AbstractObservable.setMessageObserver(AbstractObservable.java:48)
> at
> org.apache.cxf.binding.AbstractBindingFactory.addListener(AbstractBindingFactory.java:164)
> at
> org.apache.cxf.binding.soap.SoapBindingFactory.addListener(SoapBindingFactory.java:807)
> at org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:127)
> at
> org.apache.camel.component.cxf.CxfConsumer.doStart(CxfConsumer.java:122)
> at
> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:53)
> at
> org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:49)
> at
> org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:989)
> at
> org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:197)
> at
> org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:101)
> ... 12 more
> Caused by: java.net.BindException: Address already in use: JVM_Bind
> at java.net.PlainSocketImpl.socketBind(Native Method)
> at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
> at java.net.ServerSocket.bind(ServerSocket.java:319)
> at java.net.ServerSocket.<init>(ServerSocket.java:185)
> at java.net.ServerSocket.<init>(ServerSocket.java:141)
> at javax.net.ssl.SSLServerSocket.<init>(SSLServerSocket.java:84)
> at
> com.sun.net.ssl.internal.ssl.SSLServerSocketImpl.<init>(SSLServerSocketImpl.java:79)
> at
> com.sun.net.ssl.internal.ssl.SSLServerSocketFactoryImpl.createServerSocket(SSLServerSocketFactoryImpl.java:65)
> at
> org.mortbay.jetty.security.SslSocketConnector.newServerSocket(SslSocketConnector.java:450)
> at
> org.apache.cxf.transport.https_jetty.CXFJettySslSocketConnector.newServerSocket(CXFJettySslSocketConnector.java:13
> 9)
> at
> org.mortbay.jetty.bio.SocketConnector.open(SocketConnector.java:73)
> at
> org.mortbay.jetty.AbstractConnector.doStart(AbstractConnector.java:283)
> at
> org.mortbay.jetty.bio.SocketConnector.doStart(SocketConnector.java:147)
> at
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
> at org.mortbay.jetty.Server.doStart(Server.java:235)
> at
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
> at
> org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine.addServant(JettyHTTPServerEngine.java:338)
> ... 23 more
>
> {code}
>
> Did we something wrong? Is there another possible configuration which works?
>
> Thanks in advance for any help,
> Christian