cxf-bean can route the request to the bean which you want to export as web 
service.  
It could be a little complicated that if you want to route the request to 
camel-cxf consumer, or the proxy that you just build with camel.
But if you just has a service implementation which wants to be exposed through 
different transport, you need to try cxf-bean.

cxf-bean shows you a good example that we can decouple the transport (physical) 
part and logical part, in this way, you don't need to expose each service again 
if you want to add a new port of the client to invoke, you just need to route 
the request to actual service bean (you don't need to deploy the logical part 
again).

But if you want to implement a proxy, we may need to think about another way to 
do it.  

--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) 
(English)
          http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





On Sunday, February 3, 2013 at 6:56 PM, Christian Müller wrote:

> Hi Willem!
>  
> Thanks for the response.
> Could you please more detailed. I didn't get it.
>  
> At present, we use the camel-cxf bean style configuration for all our
> exposed web services like this one:
> <cxf:cxfEndpoint id="xyzService"
> address="/xyzService"
> wsdlURL="META-INF/xyzService.wsdl"
> serviceClass="org.company.product.service.XYZService"
> endpointName="s:XYZServicePort"
> serviceName="s:XYZService"
> xmlns:s="http://company.com/product/service/1"; />
>  
> We configured ${SMX_HOME}/etc/org.apache.cxf.osgi.cfg:
> org.apache.cxf.servlet.context=/services
>  
> We use an adapted jetty.xml in ${SMX_HOME}/etc and concofigured
> org.ops4j.pax.web.cfg (http://web.cfg) properly.
>  
> What do you suggest in detail? I don't understand it because the
> cxf-bean-component is only a camel producer (as you wrote) and we do not
> have an issue with sending the request...
> Or do you suggest to have a new central route which starts the jetty (for
> each customer one instance) and handle the routing there? If this is your
> suggestion, it's may a bit better than that what we have in place at
> present, but I still think my request to have the possibility to bind a
> camel-cxf service to one specific port is better.
>  
> What do you think? Is it doable?
>  
> [1] http://camel.apache.org/cxf.html
>  
> Best,
> Christian
>  
> On Fri, Feb 1, 2013 at 5:17 AM, Willem jiang <willem.ji...@gmail.com 
> (mailto:willem.ji...@gmail.com)> wrote:
>  
> > Hi Christian,
> >  
> > I think using the cxf-bean[1] component way can make your life easier.
> > You can route the request from different transport ( Using embed Jetty or
> > Servlet) to the cxf-bean component, to the service that you want to expose.
> > It could be more easy for to manage the transport route by using Camel?
> >  
> > [1]http://camel.apache.org/cxf-bean-component.html
> >  
> > --
> > Willem Jiang
> >  
> > Red Hat, Inc.
> > FuseSource is now part of Red Hat
> > Web: http://www.fusesource.com | http://www.redhat.com
> > Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/)
> > (English)
> > http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
> > Twitter: willemjiang
> > Weibo: 姜宁willem
> >  
> >  
> >  
> >  
> >  
> > On Friday, February 1, 2013 at 4:54 AM, Christian Müller wrote:
> >  
> > > Some month ago I was looking for a way to bind camel-cxf to a specific
> > > port, using the OSGI HTTP service.
> > > Achim blogged about binding a web application to a specific port, using
> >  
> >  
> > the
> > > OSGI HTTP service and an adapted jetty.xml configuration [1]. I'm
> >  
> >  
> > wondering
> > > whether we can do the same with camel-cxf?
> > >  
> > > The issue we face at present is, that all your services (service for
> > > customer A, service for customer B, ...) are accessible on all ports. We
> > > use specific ports for each customer, secured with client certificates to
> > > make sure they only can access this port. But because all services are
> > > exposed on all ports, this is useless... :-(
> > > I know we can start an individual jetty for each service, but imagine we
> > > have 10 different customer with individual applications. Each application
> > > is composed of multiple bundles. Let's say 5 different bundles expose a
> >  
> >  
> > web
> > > service. This will end up starting 50 Jetty instances, right? Sounds very
> > > inefficient and difficult to maintain for our operations people...
> > >  
> > > Has an CXF expert time to look into it? I'm willing to sponsor a beer for
> > > him/her - or two... ;-)
> > >  
> > > [1]
> > http://notizblog.nierbeck.de/2013/01/bind-certain-web-applications-to-specific-httpconnectors/
> > >  
> > > Best,
> > > Christian
> > >  
> > > --
>  
>  
> --  


Reply via email to