Re: multiple CXFNonSpringJaxrsServlets
Yes correct. I have two servlets - one for jax-ws, one for jax-rs, the latter with two jaxrsServerFactories. Den tir. 30. okt. 2018 kl. 22:41 skrev Scott Lewis : > On 10/30/2018 12:53 PM, David Karlsen wrote: > > I register several jaxrsServerFactoryBean beans with the same but - under > > different addresses - which works fine > > So that I understand: you register multiple beans with the same > instance of CXFNonSpringServlet...with different aliases (e.g. '/foo' > and '/bar')? I also assume you are not using the OSGi HttpService to > register multiple servlet instances, correct? > > If at all possible, I would like to use multiple instances of > CXFNonSpringServlet with HttpService, and not have them conflict. > > Scott > > > > > Den tir. 30. okt. 2018 kl. 16:56 skrev Scott Lewis >: > > > >> Separate bus instances are created for the CXFNonSpringServlets init, > >> but what apparently blows up is the create/use/start of more than one > >> org.apache.cxf.endpoint.ServerImpl instance at: at > >> org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:123). > >> > >> Any insights on how to avoid/work around this? > >> > >> Scott > >> > >>On 10/21/2018 9:53 AM, Scott Lewis wrote: > >>> On 10/21/2018 2:38 AM, David Karlsen wrote: > If you have separate CxfBus'es per servlet it should work AFAIK. > >>> It seems that by default in the superclass > >>> > org.apache.cxf.transport.servlet.CXFNonSpringServlet.init(ServletConfig) > >>> the loadBus method is called during init, and that's implemented as: > >>> > >>> protected void loadBus(ServletConfig sc) { > >>> this.bus = BusFactory.newInstance().createBus(); > >>> } > >>> > >>> This seems to be a separate Bus instance (createBus())...apparently of > >>> the same type. > >>> > >>> So the two servlet instances do have separate Bus instances, but I > >>> still get the error described. > >>> > >>> Thanksinadvance, > >>> > >>> Scott > >>> > Den lør. 20. okt. 2018 kl. 23:32 skrev Scott Lewis > : > > > Hi, > > > > Using OSGi HttpService, if I register more than one instance of > > CXFNonSpringJaxrsServlet...i.e. at different aliases...then I get an > > exception. For example if I have two aliases > > > > '/foo' -> instance 1 of CXFNonSpringJaxrsServlet > > > > '/bar' -> instance 2 of CXFNonSpringJaxrsServlet > > > > on the second call to httpService.registerServlet I get exception and > > stack trace below. > > > > Is there a way to create/configure/register multiple > > CXFNonSpringJaxrsServlet instances...and/or the underlying > > JAXRSServerFactoryBean so that they don't conflict in this manner? > Or > > is there some other cxf jaxrs servlet/bean classes that would allow > > this? > > > > Thanksinadvance, > > > > Scott > > > > org.apache.cxf.service.factory.ServiceConstructionException > >at > > > > > >> > org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:219) > >> > >at > > > > > >> > org.apache.cxf.jaxrs.servlet.CXFNonSpringJaxrsServlet.createServerFromApplication(CXFNonSpringJaxrsServlet.java:546) > >> > >at > > > > > >> > org.apache.cxf.jaxrs.servlet.CXFNonSpringJaxrsServlet.init(CXFNonSpringJaxrsServlet.java:115) > >> > >at > > > > > >> > org.eclipse.equinox.http.servlet.internal.HttpServiceRuntimeImpl$LegacyServlet.init(HttpServiceRuntimeImpl.java:1206) > >> > >at > > > > > >> > org.eclipse.equinox.http.servlet.internal.registration.EndpointRegistration.init(EndpointRegistration.java:94) > >> > >at > > > > > >> > org.eclipse.equinox.http.servlet.internal.context.ContextController.doAddServletRegistration(ContextController.java:596) > >> > >at > > > > > >> > org.eclipse.equinox.http.servlet.internal.context.ContextController.addServletRegistration(ContextController.java:450) > >> > >at > > > > > >> > org.eclipse.equinox.http.servlet.internal.customizer.ContextServletTrackerCustomizer.addingService(ContextServletTrackerCustomizer.java:55) > >> > >at > > > > > >> > org.eclipse.equinox.http.servlet.internal.customizer.ContextServletTrackerCustomizer.addingService(ContextServletTrackerCustomizer.java:1) > >> > >at > > > > > >> > org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941) > >> > >at > > > > > >> > org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:1) > >> > >at > > > >> > org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256) > >at > > org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229) > >at > > > > > >> > org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:901) > >> > >at
Re: multiple CXFNonSpringJaxrsServlets
On 10/30/2018 12:53 PM, David Karlsen wrote: I register several jaxrsServerFactoryBean beans with the same but - under different addresses - which works fine So that I understand: you register multiple beans with the same instance of CXFNonSpringServlet...with different aliases (e.g. '/foo' and '/bar')? I also assume you are not using the OSGi HttpService to register multiple servlet instances, correct? If at all possible, I would like to use multiple instances of CXFNonSpringServlet with HttpService, and not have them conflict. Scott Den tir. 30. okt. 2018 kl. 16:56 skrev Scott Lewis : Separate bus instances are created for the CXFNonSpringServlets init, but what apparently blows up is the create/use/start of more than one org.apache.cxf.endpoint.ServerImpl instance at: at org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:123). Any insights on how to avoid/work around this? Scott On 10/21/2018 9:53 AM, Scott Lewis wrote: On 10/21/2018 2:38 AM, David Karlsen wrote: If you have separate CxfBus'es per servlet it should work AFAIK. It seems that by default in the superclass org.apache.cxf.transport.servlet.CXFNonSpringServlet.init(ServletConfig) the loadBus method is called during init, and that's implemented as: protected void loadBus(ServletConfig sc) { this.bus = BusFactory.newInstance().createBus(); } This seems to be a separate Bus instance (createBus())...apparently of the same type. So the two servlet instances do have separate Bus instances, but I still get the error described. Thanksinadvance, Scott Den lør. 20. okt. 2018 kl. 23:32 skrev Scott Lewis : Hi, Using OSGi HttpService, if I register more than one instance of CXFNonSpringJaxrsServlet...i.e. at different aliases...then I get an exception. For example if I have two aliases '/foo' -> instance 1 of CXFNonSpringJaxrsServlet '/bar' -> instance 2 of CXFNonSpringJaxrsServlet on the second call to httpService.registerServlet I get exception and stack trace below. Is there a way to create/configure/register multiple CXFNonSpringJaxrsServlet instances...and/or the underlying JAXRSServerFactoryBean so that they don't conflict in this manner? Or is there some other cxf jaxrs servlet/bean classes that would allow this? Thanksinadvance, Scott org.apache.cxf.service.factory.ServiceConstructionException at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:219) at org.apache.cxf.jaxrs.servlet.CXFNonSpringJaxrsServlet.createServerFromApplication(CXFNonSpringJaxrsServlet.java:546) at org.apache.cxf.jaxrs.servlet.CXFNonSpringJaxrsServlet.init(CXFNonSpringJaxrsServlet.java:115) at org.eclipse.equinox.http.servlet.internal.HttpServiceRuntimeImpl$LegacyServlet.init(HttpServiceRuntimeImpl.java:1206) at org.eclipse.equinox.http.servlet.internal.registration.EndpointRegistration.init(EndpointRegistration.java:94) at org.eclipse.equinox.http.servlet.internal.context.ContextController.doAddServletRegistration(ContextController.java:596) at org.eclipse.equinox.http.servlet.internal.context.ContextController.addServletRegistration(ContextController.java:450) at org.eclipse.equinox.http.servlet.internal.customizer.ContextServletTrackerCustomizer.addingService(ContextServletTrackerCustomizer.java:55) at org.eclipse.equinox.http.servlet.internal.customizer.ContextServletTrackerCustomizer.addingService(ContextServletTrackerCustomizer.java:1) at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941) at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:1) at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256) at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229) at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:901) at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109) at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:920) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:862) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:801) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:225) at
Re: multiple CXFNonSpringJaxrsServlets
I register several jaxrsServerFactoryBean beans with the same but - under different addresses - which works fine Den tir. 30. okt. 2018 kl. 16:56 skrev Scott Lewis : > > Separate bus instances are created for the CXFNonSpringServlets init, > but what apparently blows up is the create/use/start of more than one > org.apache.cxf.endpoint.ServerImpl instance at: at > org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:123). > > Any insights on how to avoid/work around this? > > Scott > > On 10/21/2018 9:53 AM, Scott Lewis wrote: > > On 10/21/2018 2:38 AM, David Karlsen wrote: > >> If you have separate CxfBus'es per servlet it should work AFAIK. > > > > It seems that by default in the superclass > > org.apache.cxf.transport.servlet.CXFNonSpringServlet.init(ServletConfig) > > the loadBus method is called during init, and that's implemented as: > > > > protected void loadBus(ServletConfig sc) { > > this.bus = BusFactory.newInstance().createBus(); > > } > > > > This seems to be a separate Bus instance (createBus())...apparently of > > the same type. > > > > So the two servlet instances do have separate Bus instances, but I > > still get the error described. > > > > Thanksinadvance, > > > > Scott > > > >> > >> Den lør. 20. okt. 2018 kl. 23:32 skrev Scott Lewis > >> : > >> > >>> Hi, > >>> > >>> Using OSGi HttpService, if I register more than one instance of > >>> CXFNonSpringJaxrsServlet...i.e. at different aliases...then I get an > >>> exception. For example if I have two aliases > >>> > >>> '/foo' -> instance 1 of CXFNonSpringJaxrsServlet > >>> > >>> '/bar' -> instance 2 of CXFNonSpringJaxrsServlet > >>> > >>> on the second call to httpService.registerServlet I get exception and > >>> stack trace below. > >>> > >>> Is there a way to create/configure/register multiple > >>> CXFNonSpringJaxrsServlet instances...and/or the underlying > >>> JAXRSServerFactoryBean so that they don't conflict in this manner? Or > >>> is there some other cxf jaxrs servlet/bean classes that would allow > >>> this? > >>> > >>> Thanksinadvance, > >>> > >>> Scott > >>> > >>> org.apache.cxf.service.factory.ServiceConstructionException > >>> at > >>> > >>> > org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:219) > > >>> > >>> at > >>> > >>> > org.apache.cxf.jaxrs.servlet.CXFNonSpringJaxrsServlet.createServerFromApplication(CXFNonSpringJaxrsServlet.java:546) > > >>> > >>> at > >>> > >>> > org.apache.cxf.jaxrs.servlet.CXFNonSpringJaxrsServlet.init(CXFNonSpringJaxrsServlet.java:115) > > >>> > >>> at > >>> > >>> > org.eclipse.equinox.http.servlet.internal.HttpServiceRuntimeImpl$LegacyServlet.init(HttpServiceRuntimeImpl.java:1206) > > >>> > >>> at > >>> > >>> > org.eclipse.equinox.http.servlet.internal.registration.EndpointRegistration.init(EndpointRegistration.java:94) > > >>> > >>> at > >>> > >>> > org.eclipse.equinox.http.servlet.internal.context.ContextController.doAddServletRegistration(ContextController.java:596) > > >>> > >>> at > >>> > >>> > org.eclipse.equinox.http.servlet.internal.context.ContextController.addServletRegistration(ContextController.java:450) > > >>> > >>> at > >>> > >>> > org.eclipse.equinox.http.servlet.internal.customizer.ContextServletTrackerCustomizer.addingService(ContextServletTrackerCustomizer.java:55) > > >>> > >>> at > >>> > >>> > org.eclipse.equinox.http.servlet.internal.customizer.ContextServletTrackerCustomizer.addingService(ContextServletTrackerCustomizer.java:1) > > >>> > >>> at > >>> > >>> > org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941) > > >>> > >>> at > >>> > >>> > org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:1) > > >>> > >>> at > >>> > org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256) > >>> > >>> at > >>> org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229) > >>> at > >>> > >>> > org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:901) > > >>> > >>> at > >>> > >>> > org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109) > > >>> > >>> at > >>> > >>> > org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:920) > > >>> > >>> at > >>> > >>> > org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) > > >>> > >>> at > >>> > >>> > org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) > > >>> > >>> at > >>> > >>> > org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:862) > > >>> > >>> at > >>> > >>> > org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:801) > > >>> > >>> at > >>> > >>> >
Re: multiple CXFNonSpringJaxrsServlets
Separate bus instances are created for the CXFNonSpringServlets init, but what apparently blows up is the create/use/start of more than one org.apache.cxf.endpoint.ServerImpl instance at: at org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:123). Any insights on how to avoid/work around this? Scott On 10/21/2018 9:53 AM, Scott Lewis wrote: On 10/21/2018 2:38 AM, David Karlsen wrote: If you have separate CxfBus'es per servlet it should work AFAIK. It seems that by default in the superclass org.apache.cxf.transport.servlet.CXFNonSpringServlet.init(ServletConfig) the loadBus method is called during init, and that's implemented as: protected void loadBus(ServletConfig sc) { this.bus = BusFactory.newInstance().createBus(); } This seems to be a separate Bus instance (createBus())...apparently of the same type. So the two servlet instances do have separate Bus instances, but I still get the error described. Thanksinadvance, Scott Den lør. 20. okt. 2018 kl. 23:32 skrev Scott Lewis : Hi, Using OSGi HttpService, if I register more than one instance of CXFNonSpringJaxrsServlet...i.e. at different aliases...then I get an exception. For example if I have two aliases '/foo' -> instance 1 of CXFNonSpringJaxrsServlet '/bar' -> instance 2 of CXFNonSpringJaxrsServlet on the second call to httpService.registerServlet I get exception and stack trace below. Is there a way to create/configure/register multiple CXFNonSpringJaxrsServlet instances...and/or the underlying JAXRSServerFactoryBean so that they don't conflict in this manner? Or is there some other cxf jaxrs servlet/bean classes that would allow this? Thanksinadvance, Scott org.apache.cxf.service.factory.ServiceConstructionException at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:219) at org.apache.cxf.jaxrs.servlet.CXFNonSpringJaxrsServlet.createServerFromApplication(CXFNonSpringJaxrsServlet.java:546) at org.apache.cxf.jaxrs.servlet.CXFNonSpringJaxrsServlet.init(CXFNonSpringJaxrsServlet.java:115) at org.eclipse.equinox.http.servlet.internal.HttpServiceRuntimeImpl$LegacyServlet.init(HttpServiceRuntimeImpl.java:1206) at org.eclipse.equinox.http.servlet.internal.registration.EndpointRegistration.init(EndpointRegistration.java:94) at org.eclipse.equinox.http.servlet.internal.context.ContextController.doAddServletRegistration(ContextController.java:596) at org.eclipse.equinox.http.servlet.internal.context.ContextController.addServletRegistration(ContextController.java:450) at org.eclipse.equinox.http.servlet.internal.customizer.ContextServletTrackerCustomizer.addingService(ContextServletTrackerCustomizer.java:55) at org.eclipse.equinox.http.servlet.internal.customizer.ContextServletTrackerCustomizer.addingService(ContextServletTrackerCustomizer.java:1) at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941) at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:1) at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256) at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229) at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:901) at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109) at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:920) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:862) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:801) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:225) at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:469) at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:487) at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:1004) at org.eclipse.equinox.http.servlet.internal.HttpServiceRuntimeImpl.registerHttpServiceServlet(HttpServiceRuntimeImpl.java:722) at org.eclipse.equinox.http.servlet.internal.HttpServiceImpl$3.run(HttpServiceImpl.java:148) at org.eclipse.equinox.http.servlet.internal.HttpServiceImpl$3.run(HttpServiceImpl.java:1)
Re: addressing client response Failed to correlate message
Hello! Request header: xmlns="http://www.w3.org/2005/08/addressing;>urn:hl7-org:v3:PRPA_IN201305UV02 xmlns="http://www.w3.org/2005/08/addressing;>urn:uuid:acdd5cd4-1b7d-4027-b8a5-5b269c488d56 xmlns="http://www.w3.org/2005/08/addressing;>http://localhost:8085/mesa/test http://www.w3.org/2005/08/addressing;> http://schemas.xmlsoap.org/ws/2003/03/addressing/role/anonymous http://www.w3.org/2005/08/addressing;> http://schemas.xmlsoap.org/ws/2003/03/addressing/role/anonymous Response header: http://localhost:8085/mesa/test urn:hl7-org:v3:PRPA_IN201306UV02 uuid:1.2.3.4.5.11312R1 uuid:d00e3a83-7d95-499e-a1b5-c8da600bbbf2.1 Thanx Csaba On 2018-10-30 15:22, Colm O hEigeartaigh wrote: What do the request and response messages look like? Colm. On Tue, Oct 30, 2018 at 1:11 PM Tóth Csaba wrote: Hello! I tried to write a we client. I need to send addressing info (its already working), but it cant parse the response: the error: WARN org.apache.cxf.ws.addressing.soap.MAPCodec - Failed to correlate message, aborting dispatch. And the proxy response object is become null. At the response there is an addressing: "" but its pointed to the server's address. ( I dont know its right value or not) How can I fix this warning, or turn off the addressing handling only for the responses? Thanx Csaba
Re: addressing client response Failed to correlate message
What do the request and response messages look like? Colm. On Tue, Oct 30, 2018 at 1:11 PM Tóth Csaba wrote: > Hello! > > I tried to write a we client. I need to send addressing info (its > already working), but it cant parse the response: > the error: > WARN org.apache.cxf.ws.addressing.soap.MAPCodec - Failed to > correlate message, aborting dispatch. > > And the proxy response object is become null. > > At the response there is an addressing: "" but its pointed to the > server's address. ( I dont know its right value or not) > > How can I fix this warning, or turn off the addressing handling only for > the responses? > > Thanx > Csaba > > -- Colm O hEigeartaigh Talend Community Coder http://coders.talend.com
addressing client response Failed to correlate message
Hello! I tried to write a we client. I need to send addressing info (its already working), but it cant parse the response: the error: WARN org.apache.cxf.ws.addressing.soap.MAPCodec - Failed to correlate message, aborting dispatch. And the proxy response object is become null. At the response there is an addressing: "" but its pointed to the server's address. ( I dont know its right value or not) How can I fix this warning, or turn off the addressing handling only for the responses? Thanx Csaba