camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ranx <>
Subject Re: Netty Server vs Jetty Server
Date Fri, 02 Sep 2016 17:13:35 GMT
I think maybe a better explanation of what I'd like to accomplish is in
order.  The first is about CXF itself and the second is about Netty. The
following is an example of a service I've set up that uses a single
interface called PaymentServicesAPI which is nothing more than an interface
that extends other interfaces like PaymentAuthorization, PaymentSale,
PaymentRefud, etc.  So I only have to set this up once and then it routes to
whatever bundle is listening on the route that matches the operationName. 
This works fine but has the obvious problem that if I want to move the
bundle that implements the service associated with one of the operations the
aggregate interface still exposes that interface.  

To build bundles as portable microservices this is a problem.

Each of the interfaces is decorated with SOAP and Rest annotations.  What
I'd like to do is be able to set up the CXF Rest and SOAP servers with
providers, security, etc. in a single bundle.  Then in my individual bundles
make a reference to it in the same way that I see in the netty example.


The CXF example. I don't want to add the cxf:rsServer and Soap server to
every bundle just to expose the common interface.

It seems likely there's a way to share this information in much the same was
the boot strap options are in Netty.  But I haven't seen an example of it.
In the example below the PaymentServicesAPI is the on that extends all the
others. What I'd like to do is set up the cxf:rsServer in single bundle and
set the service class in the consuming bundles. More like this:

&lt;from uri=&quot;cxfrs:bean:gatewayRESTEndpoint=#gatewayRestServer&quot;
/> In that case the cxf:rsServer wouldn't actually bind the service class
until the individual bundle requested it.  I was able to roll my own version
by hand coding an OSGi service interface that gets exported from the server
bundle and lets individual bundles send registration notices at which point
it adds (or removes) the endpoint.  But I'm wondering if there's just
something I'm missing.

	<cxf:rsServer id="gatewayRESTServer" address="${CXFServer}/resources"

			<bean id="jsonProvider"
				<property name="convention" value="badgerfish" />
			<bean class="org.apache.cxf.jaxrs.model.wadl.WadlGenerator">
				<property name="linkJsonToXmlSchema" value="true" />
				<property name="applicationTitle" value="PaymentHubRestServices" />

	<camelContext id="My-Rest-context"

		<route id="Gateway-RS">
			<from uri="cxfrs:bean:gatewayRESTEndpoint" />
			<log message="Received header.operationName: ${header.operationName}" />



View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message