On Thu September 17 2009 2:47:56 pm Jim Talbut wrote: > Unfortunately that doesn't help. > The main point of #2 is that the port and URL are specified by the > container, which is no good for me. > And the publishedEndpointUrl doesn't work unless Tomcat is configured with > that as a connector - in which case it responds on that port for all web > services installed (and still with a constrained URL, the extra bit I can > specify is added to a Tomcat generated root). > > So it looks like what I need is a separate container for each web service. > But I don't want to have to manage them separately. > So is there are server that is able to host multiple containers? > Or can I embed jetty inside Tomcat via CXF?
You could definitely do this. In your application context, import META- INF/cxf/cxf-extension-http-jetty.xml instead of the cxf-servlet. Any jaxws:endpoint things, use a full URL (http://blah:8081/Foo) or whatever and CXF should bring up jetty on that port and put the endpoint there. The issue is that you cannot have both jetty hosted and CXFServlet hosted endpoints in the same Spring application context since they both register to "handle" the http transport. Thus, if you need some services hosted on the tomcat root, you would need a completely separate context for that. That could be done via a separate war or, within your own code someplace, you could create your own Bus with Jetty and such and use that to manually deploy services (Endpoint.publish or use the factories or such). Dan > > Thanks > > Jim > > > ----- Original Message ----- > From: "Glen Mazza" <[email protected]> > To: <[email protected]> > Sent: Thursday, September 17, 2009 3:02 PM > Subject: Re: How can I configure a CXF web service to listen on a specific > port? > > > Note #2 here, again: > > http://www.jroller.com/gmazza/entry/creating_a_wsdl_first_web1#notes > > > > HTH, > > Glen > > > > Jim Talbut wrote: > >> Hi, > >> > >> I hope this is a simple question, but I'm new to CXF. > >> > >> I have a CXF web service running with Spring and created from a WSDL > >> document via the maven plugin. > >> I need this web service to respond on a different HTTP port - I will > >> have lots of web services and they all need to be on different ports. > >> I can host the WARs in either glassfish or tomcat. > >> > >> The project is pretty much the same as the cxf-htt-basic archetype. > >> > >> Thanks > >> > >> Jim > -- Daniel Kulp [email protected] http://www.dankulp.com/blog
