You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Claus Ibsen <cl...@gmail.com> on 2013/05/01 07:57:36 UTC

Re: How to create a generic SOAP consumer?

Hi

No there is a camel-soap as part of Apache Camel
http://camel.apache.org/soap

This is a transport agnostic soap data format, that can read/write
soap messages.



On Tue, Apr 30, 2013 at 8:22 PM, Smith-John <mi...@gmail.com> wrote:
> Do you mean http://code.google.com/p/camel-soap/wiki/Introduction ?
> I'm not sure about the license since this isn't an official camel component.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/How-to-create-a-generic-SOAP-consumer-tp5731741p5731818.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: How to create a generic SOAP consumer?

Posted by Smith-John <mi...@gmail.com>.
Willem.Jiang wrote
> It looks like you are deploying the camel route into OSGi container?
> The warning means there are more than on javax.xml.ws.WebServiceProvider
> classes are loaded by deferent Classloader. 


Hi,

still having 
/WARNUNG: The javax.xml.ws.WebServiceProvider annotation was already loaded
by another classloader. Please check if there are multiple versions of the
web service annotation jar in your classpath. /
problem.
I double checked all used bundles. Just one bundle exports needed packages
(javax.xml.ws...).

What can I do to fix this problem? (Working with Equinox)

Regards.




--
View this message in context: http://camel.465427.n5.nabble.com/How-to-create-a-generic-SOAP-consumer-tp5731741p5733134.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to create a generic SOAP consumer?

Posted by Smith-John <mi...@gmail.com>.
Hi,

I'm using Equinox.

I checked all my bundles for exporting javax.xml.ws.
But I only found one: jaxws-api-osgi2.2.8.jar. This was added because
cxf-rt-frontend-jaxws-2.7.3.jar needed the javax.xml.ws things.

But I found out that javax.xml.ws is already part of the system library (I'm
using jdk 1.6). 
Can this trigger the problem? If yes, how can I fix this?



--
View this message in context: http://camel.465427.n5.nabble.com/How-to-create-a-generic-SOAP-consumer-tp5731741p5732606.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to create a generic SOAP consumer?

Posted by Smith-John <mi...@gmail.com>.
Hi,

I'm using Equinox.

Regards.



--
View this message in context: http://camel.465427.n5.nabble.com/How-to-create-a-generic-SOAP-consumer-tp5731741p5732584.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to create a generic SOAP consumer?

Posted by Smith-John <mi...@gmail.com>.
Ok, new try.

I want to create a generic SOAP consumer. The consumer should be able to
process all possible kinds of soap messages (+headers like ws-a...). As I'm
already using cxf component in my project I want (if possible) to realize
this with cxf too.

Now the problems I have:

-Using Message format I can't handle headers. So this isn't a option.

-Using CXF_MESSAGE I don't know how the endpoint should look like.
(http://camel.apache.org/cxf doesn't say much about it.)
from("cxf:http://localhost:8050/service?dataFormat=CXF_MESSAGE") gives me a
NP at camelContext.start().

!MESSAGE FrameworkEvent ERROR
!STACK 0
14:38:43.632  DEBUG  o.a.c.core.osgi.OsgiDefaultCamelContext:626    Adding
routes from builder: Routes: []
org.osgi.framework.BundleException: Exception in
soapConsumer.Activator.start() of bundle SOAPConsumer.
	at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:734)
	at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
	at
org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
	at
org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:389)
	at
org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1131)
	at
org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)
	at
org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)
	at
org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)
	at
org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
	at
org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438)
	at
org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:1)
	at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
	at
org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
Caused by: org.apache.camel.RuntimeCamelException:
java.lang.NullPointerException
	at
org.apache.camel.component.cxf.WSDLServiceConfiguration.getDefinition(WSDLServiceConfiguration.java:49)
	at
org.apache.camel.component.cxf.WSDLServiceConfiguration.getServiceQName(WSDLServiceConfiguration.java:57)
	at
org.apache.camel.component.cxf.WSDLServiceConfiguration.getServiceNamespace(WSDLServiceConfiguration.java:98)
	at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.getServiceNamespace(ReflectionServiceFactoryBean.java:1912)
	at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.getServiceQName(ReflectionServiceFactoryBean.java:1864)
	at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.getServiceQName(ReflectionServiceFactoryBean.java:1860)
	at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:445)
	at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:540)
	at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:252)
	at
org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:101)
	at
org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:159)
	at org.apache.camel.component.cxf.CxfConsumer.<init>(CxfConsumer.java:240)
	at
org.apache.camel.component.cxf.CxfEndpoint.createConsumer(CxfEndpoint.java:203)
	at
org.apache.camel.impl.EventDrivenConsumerRoute.addServices(EventDrivenConsumerRoute.java:65)
	at
org.apache.camel.impl.DefaultRoute.onStartingServices(DefaultRoute.java:80)
	at org.apache.camel.impl.RouteService.warmUp(RouteService.java:133)
	at
org.apache.camel.impl.DefaultCamelContext.doWarmUpRoutes(DefaultCamelContext.java:1986)
	at
org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:1914)
	at
org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:1702)
	at
org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1583)
	at
org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1444)
	at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60)
	at
org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1412)
	at soapConsumer.Activator.start(Activator.java:24)
	at
org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
	at java.security.AccessController.doPrivileged(Native Method)
	at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
	... 12 more
Caused by: java.lang.NullPointerException
	at
org.apache.cxf.transport.TransportURIResolver.resolve(TransportURIResolver.java:68)
	at
org.apache.cxf.catalog.CatalogWSDLLocator.getBaseInputSource(CatalogWSDLLocator.java:72)
	at
org.apache.cxf.wsdl11.AbstractWrapperWSDLLocator.getBaseInputSource(AbstractWrapperWSDLLocator.java:57)
	at
org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:240)
	at
org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:205)
	at
org.apache.camel.component.cxf.WSDLServiceConfiguration.getDefinition(WSDLServiceConfiguration.java:47)
	... 38 more
Root exception:
org.apache.camel.RuntimeCamelException: java.lang.NullPointerException
	at
org.apache.camel.component.cxf.WSDLServiceConfiguration.getDefinition(WSDLServiceConfiguration.java:49)
	at
org.apache.camel.component.cxf.WSDLServiceConfiguration.getServiceQName(WSDLServiceConfiguration.java:57)
	at
org.apache.camel.component.cxf.WSDLServiceConfiguration.getServiceNamespace(WSDLServiceConfiguration.java:98)
	at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.getServiceNamespace(ReflectionServiceFactoryBean.java:1912)
	at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.getServiceQName(ReflectionServiceFactoryBean.java:1864)
	at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.getServiceQName(ReflectionServiceFactoryBean.java:1860)
	at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:445)
	at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:540)
	at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:252)
	at
org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:101)
	at
org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:159)
	at org.apache.camel.component.cxf.CxfConsumer.<init>(CxfConsumer.java:240)
	at
org.apache.camel.component.cxf.CxfEndpoint.createConsumer(CxfEndpoint.java:203)
	at
org.apache.camel.impl.EventDrivenConsumerRoute.addServices(EventDrivenConsumerRoute.java:65)
	at
org.apache.camel.impl.DefaultRoute.onStartingServices(DefaultRoute.java:80)
	at org.apache.camel.impl.RouteService.warmUp(RouteService.java:133)
	at
org.apache.camel.impl.DefaultCamelContext.doWarmUpRoutes(DefaultCamelContext.java:1986)
	at
org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:1914)
	at
org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:1702)
	at
org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1583)
	at
org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1444)
	at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60)
	at
org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1412)
	at soapConsumer.Activator.start(Activator.java:24)
	at
org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
	at java.security.AccessController.doPrivileged(Native Method)
	at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
	at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
	at
org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
	at
org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:389)
	at
org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1131)
	at
org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)
	at
org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)
	at
org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)
	at
org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
	at
org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438)
	at
org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:1)
	at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
	at
org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
Caused by: java.lang.NullPointerException
	at
org.apache.cxf.transport.TransportURIResolver.resolve(TransportURIResolver.java:68)
	at
org.apache.cxf.catalog.CatalogWSDLLocator.getBaseInputSource(CatalogWSDLLocator.java:72)
	at
org.apache.cxf.wsdl11.AbstractWrapperWSDLLocator.getBaseInputSource(AbstractWrapperWSDLLocator.java:57)
	at
org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:240)
	at
org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:205)
	at
org.apache.camel.component.cxf.WSDLServiceConfiguration.getDefinition(WSDLServiceConfiguration.java:47)
	... 38 more



-Using PAYLOAD dataformat like
from("cxf:http://localhost:8050/service?dataFormat=PAYLOAD") I also get a
NP:
!MESSAGE FrameworkEvent ERROR
14:45:11.326  DEBUG  o.a.c.core.osgi.OsgiDefaultCamelContext:626    Adding
routes from builder: Routes: []
!STACK 0
org.osgi.framework.BundleException: Exception in
soapConsumer.Activator.start() of bundle SOAPConsumer.
	at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:734)
	at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
	at
org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
	at
org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:389)
	at
org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1131)
	at
org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)
	at
org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)
	at
org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)
	at
org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
	at
org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438)
	at
org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:1)
	at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
	at
org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
Caused by: java.lang.NullPointerException
	at java.lang.Class.isAssignableFrom(Native Method)
	at
org.apache.cxf.jaxws.support.JaxWsServiceConfiguration.isWebMethod(JaxWsServiceConfiguration.java:166)
	at
org.apache.cxf.jaxws.support.JaxWsServiceConfiguration.isOperation(JaxWsServiceConfiguration.java:205)
	at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.isValidMethod(ReflectionServiceFactoryBean.java:1932)
	at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.createInterface(ReflectionServiceFactoryBean.java:981)
	at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:469)
	at
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.buildServiceFromClass(JaxWsServiceFactoryBean.java:690)
	at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:540)
	at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:252)
	at
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:205)
	at
org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:101)
	at
org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:159)
	at
org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:211)
	at org.apache.camel.component.cxf.CxfConsumer.<init>(CxfConsumer.java:240)
	at
org.apache.camel.component.cxf.CxfEndpoint.createConsumer(CxfEndpoint.java:203)
	at
org.apache.camel.impl.EventDrivenConsumerRoute.addServices(EventDrivenConsumerRoute.java:65)
	at
org.apache.camel.impl.DefaultRoute.onStartingServices(DefaultRoute.java:80)
	at org.apache.camel.impl.RouteService.warmUp(RouteService.java:133)
	at
org.apache.camel.impl.DefaultCamelContext.doWarmUpRoutes(DefaultCamelContext.java:1986)
	at
org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:1914)
	at
org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:1702)
	at
org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1583)
	at
org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1444)
	at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60)
	at
org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1412)
	at soapConsumer.Activator.start(Activator.java:24)
	at
org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
	at java.security.AccessController.doPrivileged(Native Method)
	at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
	... 12 more
Root exception:
java.lang.NullPointerException
	at java.lang.Class.isAssignableFrom(Native Method)
	at
org.apache.cxf.jaxws.support.JaxWsServiceConfiguration.isWebMethod(JaxWsServiceConfiguration.java:166)
	at
org.apache.cxf.jaxws.support.JaxWsServiceConfiguration.isOperation(JaxWsServiceConfiguration.java:205)
	at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.isValidMethod(ReflectionServiceFactoryBean.java:1932)
	at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.createInterface(ReflectionServiceFactoryBean.java:981)
	at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:469)
	at
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.buildServiceFromClass(JaxWsServiceFactoryBean.java:690)
	at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:540)
	at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:252)
	at
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:205)
	at
org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:101)
	at
org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:159)
	at
org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:211)
	at org.apache.camel.component.cxf.CxfConsumer.<init>(CxfConsumer.java:240)
	at
org.apache.camel.component.cxf.CxfEndpoint.createConsumer(CxfEndpoint.java:203)
	at
org.apache.camel.impl.EventDrivenConsumerRoute.addServices(EventDrivenConsumerRoute.java:65)
	at
org.apache.camel.impl.DefaultRoute.onStartingServices(DefaultRoute.java:80)
	at org.apache.camel.impl.RouteService.warmUp(RouteService.java:133)
	at
org.apache.camel.impl.DefaultCamelContext.doWarmUpRoutes(DefaultCamelContext.java:1986)
	at
org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:1914)
	at
org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:1702)
	at
org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1583)
	at
org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1444)
	at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60)
	at
org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1412)
	at soapConsumer.Activator.start(Activator.java:24)
	at
org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
	at java.security.AccessController.doPrivileged(Native Method)
	at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
	at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
	at
org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
	at
org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:389)
	at
org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1131)
	at
org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)
	at
org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)
	at
org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)
	at
org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
	at
org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438)
	at
org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:1)
	at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
	at
org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)

Log:
...14:45:11.012  DEBUG  o.a.c.core.osgi.OsgiDefaultCamelContext:1985  
Warming up route id: route2 having autoStartup=true
14:45:11.013  DEBUG  org.apache.camel.impl.RouteService:129         Starting
services on route: route2
14:45:11.067  DEBUG  o.apache.camel.component.cxf.CxfEndpoint:279   Ignore
DataFormat mode PAYLOAD since SEI class is annotated with WebServiceProvider
14:45:11.099  DEBUG  o.apache.camel.component.cxf.CxfEndpoint:307  
ServerFactoryBean: org.apache.cxf.jaxws.JaxWsServerFactoryBean@8c858a added
properties: {}
14:45:11.206  DEBUG  o.apache.camel.component.cxf.CxfEndpoint:740   Using
DefaultBus org.apache.cxf.bus.extension.ExtensionManagerBus@10b23cf
16.05.2013 14:45:11 org.apache.cxf.jaxws.support.JaxWsImplementorInfo
getWebServiceProviderAnnotation
*WARNUNG: The javax.xml.ws.WebServiceProvider annotation was already loaded
by another classloader. Please check if there are multiple versions of the
web service annotation jar in your classpath.*
16.05.2013 14:45:11 org.apache.cxf.jaxws.support.JaxWsImplementorInfo
getWebServiceProviderAnnotation
WARNUNG: The javax.xml.ws.WebServiceProvider annotation was already loaded
by another classloader. Please check if there are multiple versions of the
web service annotation jar in your classpath.
16.05.2013 14:45:11
org.apache.cxf.service.factory.ReflectionServiceFactoryBean
buildServiceFromClass
INFO: Creating Service
{http://cxf.component.camel.apache.org/}DefaultPayloadProviderSEIService
from class org.apache.camel.component.cxf.DefaultPayloadProviderSEI
14:45:11.273  INFO   o.a.c.core.osgi.OsgiDefaultCamelContext:1590   Apache
Camel 2.10.4 (CamelContext: 193-camel-4) is shutting down
14:45:11.275  DEBUG  org.apache.camel.impl.RouteService:197         Stopping
services on route: route2
14:45:11.276  DEBUG  org.apache.camel.impl.RouteService:240         Shutting
down services on route: route2
...


Checked all used bundles but just found one that has
javax.xml.ws.WebServiceProvider (jaxws-api-osgi2.2.8.jar needed from
cxf-rt-frontend-jaxws-2.7.3.jar.)
How can I fix this?


I'm using Equinox, Eclipse, JDK 1.6, Camel 2.10.4.

Best Regards.




--
View this message in context: http://camel.465427.n5.nabble.com/How-to-create-a-generic-SOAP-consumer-tp5731741p5732677.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to create a generic SOAP consumer?

Posted by Claus Ibsen <cl...@gmail.com>.
On Tue, May 14, 2013 at 11:35 PM, Smith-John <mi...@gmail.com> wrote:
> Will someone please help me?
>

If you want to get help faster then check the bottom sections of this page
http://camel.apache.org/support


>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/How-to-create-a-generic-SOAP-consumer-tp5731741p5732538.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



--
Claus Ibsen
-----------------
www.camelone.org: The open source integration conference.

Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: How to create a generic SOAP consumer?

Posted by Smith-John <mi...@gmail.com>.
Will someone please help me?



--
View this message in context: http://camel.465427.n5.nabble.com/How-to-create-a-generic-SOAP-consumer-tp5731741p5732538.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to create a generic SOAP consumer?

Posted by Willem jiang <wi...@gmail.com>.
Hi,

It looks like you are deploying the camel route into OSGi container?
The warning means there are more than on javax.xml.ws.WebServiceProvider classes are loaded by deferent Classloader.
Are you using Karaf or ServiceMix?


--  
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 Saturday, May 11, 2013 at 6:21 PM, Smith-John wrote:

> Hi,
>  
> my route now looks like this:
> from("cxf:http://localhost:8050/service?dataFormat=PAYLOAD")...
> (PAYLOAD mode without wsdl and serviceClass).
>  
> But with this I get a NullPointer exception where I add the route to the
> CamelContext (camelContext.addRoutes(new GenericSOAPRoute());).
>  
> Don't know if it helps, but LOG says:
>  
> 12:08:27.575 DEBUG o.a.c.core.osgi.OsgiDefaultCamelContext:1985 Warming
> up route id: route3 having autoStartup=true
> 12:08:27.575 TRACE org.apache.camel.support.ServiceSupport:54 Service
> already started
> 12:08:27.575 DEBUG org.apache.camel.impl.RouteService:129 Starting
> services on route: route3
> 12:08:27.591 DEBUG o.apache.camel.component.cxf.CxfEndpoint:279 Ignore
> DataFormat mode PAYLOAD since SEI class is annotated with WebServiceProvider
> 12:08:27.591 DEBUG o.apache.camel.component.cxf.CxfEndpoint:307  
> ServerFactoryBean: org.apache.cxf.jaxws.JaxWsServerFactoryBean@1a0283e added
> properties: {}
> 12:08:27.607 DEBUG o.apache.camel.component.cxf.CxfEndpoint:740 Using
> DefaultBus org.apache.cxf.bus.extension.ExtensionManagerBus@eeabe8
> 11.05.2013 12:08:27 org.apache.cxf.jaxws.support.JaxWsImplementorInfo
> getWebServiceProviderAnnotation
> WARNUNG: The javax.xml.ws.WebServiceProvider annotation was already loaded
> by another classloader. Please check if there are multiple versions of the
> web service annotation jar in your classpath.
> 12:08:27.622 INFO o.a.c.core.osgi.OsgiDefaultCamelContext:1590 Apache
> Camel 2.10.4 (CamelContext: 101-camel-6) is shutting down
> 12:08:27.622 TRACE org.apache.camel.util.ServiceHelper:111 Stopping
> service org.apache.camel.impl.RouteService@16c14c0
> 12:08:27.622 TRACE o.a.c.m.DefaultManagementLifecycleStrategy:541 The
> route is not managed:
> EventDrivenConsumerRoute[Endpoint[cxf://http://localhost:8050/service?dataFormat=PAYLOAD]
> ->
> Instrumentation:route[DelegateAsync[UnitOfWork(Channel[sendTo(Endpoint[stream://out])])]]]
> 12:08:27.622 DEBUG org.apache.camel.impl.RouteService:197 Stopping
> services on route: route3
> 12:08:27.622 TRACE org.apache.camel.util.ServiceHelper:111 Stopping
> service
> EventDrivenConsumerRoute[Endpoint[cxf://http://localhost:8050/service?dataFormat=PAYLOAD]
> ->
> Instrumentation:route[DelegateAsync[UnitOfWork(Channel[sendTo(Endpoint[stream://out])])]]]
> 12:08:27.622 TRACE org.apache.camel.util.ServiceHelper:186 Shutting
> down service:
> EventDrivenConsumerRoute[Endpoint[cxf://http://localhost:8050/service?dataFormat=PAYLOAD]
> ->
> Instrumentation:route[DelegateAsync[UnitOfWork(Channel[sendTo(Endpoint[stream://out])])]]]
> 12:08:27.622 TRACE org.apache.camel.support.ServiceSupport:82 Service
> already stopped
> 12:08:27.622 TRACE org.apache.camel.util.ServiceHelper:163 Shutting
> down service org.apache.camel.impl.RouteService@16c14c0
> 12:08:27.622 DEBUG org.apache.camel.impl.RouteService:240 Shutting
> down services on route: route3
> 12:08:27.622 TRACE org.apache.camel.util.ServiceHelper:106 Service
> already stopped:
> EventDrivenConsumerRoute[Endpoint[cxf://http://localhost:8050/service?dataFormat=PAYLOAD]
> ->
> Instrumentation:route[DelegateAsync[UnitOfWork(Channel[sendTo(Endpoint[stream://out])])]]]
> 12:08:27.622 TRACE org.apache.camel.util.ServiceHelper:186 Shutting
> down service:
> EventDrivenConsumerRoute[Endpoint[cxf://http://localhost:8050/service?dataFormat=PAYLOAD]
> ->
> Instrumentation:route[DelegateAsync[UnitOfWork(Channel[sendTo(Endpoint[stream://out])])]]]
> 12:08:27.622 TRACE org.apache.camel.support.ServiceSupport:149 Service
> already shut down
> 12:08:27.622 TRACE org.apache.camel.util.ServiceHelper:111 Stopping
> service Endpoint[cxf://http://localhost:8050/service?dataFormat=PAYLOAD]
> 12:08:27.622 TRACE org.apache.camel.util.ServiceHelper:186 Shutting
> down service:
> Endpoint[cxf://http://localhost:8050/service?dataFormat=PAYLOAD]
> 12:08:27.622 TRACE org.apache.camel.support.ServiceSupport:82 Service
> already stopped
> 12:08:27.622 TRACE o.a.c.m.DefaultManagementLifecycleStrategy:541 The
> route is not managed:
> EventDrivenConsumerRoute[Endpoint[cxf://http://localhost:8050/service?dataFormat=PAYLOAD]
> ->
> Instrumentation:route[DelegateAsync[UnitOfWork(Channel[sendTo(Endpoint[stream://out])])]]]
>  
>  
>  
> --
> View this message in context: http://camel.465427.n5.nabble.com/How-to-create-a-generic-SOAP-consumer-tp5731741p5732332.html
> Sent from the Camel - Users mailing list archive at Nabble.com (http://Nabble.com).




Re: How to create a generic SOAP consumer?

Posted by Smith-John <mi...@gmail.com>.
Hi,

my route now looks like this:
from("cxf:http://localhost:8050/service?dataFormat=PAYLOAD")...
(PAYLOAD mode without wsdl and serviceClass).

But with this I get a NullPointer exception where I add the route to the
CamelContext (camelContext.addRoutes(new GenericSOAPRoute());).

Don't know if it helps, but LOG says:

12:08:27.575  DEBUG  o.a.c.core.osgi.OsgiDefaultCamelContext:1985   Warming
up route id: route3 having autoStartup=true
12:08:27.575  TRACE  org.apache.camel.support.ServiceSupport:54     Service
already started
12:08:27.575  DEBUG  org.apache.camel.impl.RouteService:129         Starting
services on route: route3
12:08:27.591  DEBUG  o.apache.camel.component.cxf.CxfEndpoint:279   Ignore
DataFormat mode PAYLOAD since SEI class is annotated with WebServiceProvider
12:08:27.591  DEBUG  o.apache.camel.component.cxf.CxfEndpoint:307  
ServerFactoryBean: org.apache.cxf.jaxws.JaxWsServerFactoryBean@1a0283e added
properties: {}
12:08:27.607  DEBUG  o.apache.camel.component.cxf.CxfEndpoint:740   Using
DefaultBus org.apache.cxf.bus.extension.ExtensionManagerBus@eeabe8
11.05.2013 12:08:27 org.apache.cxf.jaxws.support.JaxWsImplementorInfo
getWebServiceProviderAnnotation
WARNUNG: The javax.xml.ws.WebServiceProvider annotation was already loaded
by another classloader. Please check if there are multiple versions of the
web service annotation jar in your classpath.
12:08:27.622  INFO   o.a.c.core.osgi.OsgiDefaultCamelContext:1590   Apache
Camel 2.10.4 (CamelContext: 101-camel-6) is shutting down
12:08:27.622  TRACE  org.apache.camel.util.ServiceHelper:111        Stopping
service org.apache.camel.impl.RouteService@16c14c0
12:08:27.622  TRACE  o.a.c.m.DefaultManagementLifecycleStrategy:541 The
route is not managed:
EventDrivenConsumerRoute[Endpoint[cxf://http://localhost:8050/service?dataFormat=PAYLOAD]
->
Instrumentation:route[DelegateAsync[UnitOfWork(Channel[sendTo(Endpoint[stream://out])])]]]
12:08:27.622  DEBUG  org.apache.camel.impl.RouteService:197         Stopping
services on route: route3
12:08:27.622  TRACE  org.apache.camel.util.ServiceHelper:111        Stopping
service
EventDrivenConsumerRoute[Endpoint[cxf://http://localhost:8050/service?dataFormat=PAYLOAD]
->
Instrumentation:route[DelegateAsync[UnitOfWork(Channel[sendTo(Endpoint[stream://out])])]]]
12:08:27.622  TRACE  org.apache.camel.util.ServiceHelper:186        Shutting
down service:
EventDrivenConsumerRoute[Endpoint[cxf://http://localhost:8050/service?dataFormat=PAYLOAD]
->
Instrumentation:route[DelegateAsync[UnitOfWork(Channel[sendTo(Endpoint[stream://out])])]]]
12:08:27.622  TRACE  org.apache.camel.support.ServiceSupport:82     Service
already stopped
12:08:27.622  TRACE  org.apache.camel.util.ServiceHelper:163        Shutting
down service org.apache.camel.impl.RouteService@16c14c0
12:08:27.622  DEBUG  org.apache.camel.impl.RouteService:240         Shutting
down services on route: route3
12:08:27.622  TRACE  org.apache.camel.util.ServiceHelper:106        Service
already stopped:
EventDrivenConsumerRoute[Endpoint[cxf://http://localhost:8050/service?dataFormat=PAYLOAD]
->
Instrumentation:route[DelegateAsync[UnitOfWork(Channel[sendTo(Endpoint[stream://out])])]]]
12:08:27.622  TRACE  org.apache.camel.util.ServiceHelper:186        Shutting
down service:
EventDrivenConsumerRoute[Endpoint[cxf://http://localhost:8050/service?dataFormat=PAYLOAD]
->
Instrumentation:route[DelegateAsync[UnitOfWork(Channel[sendTo(Endpoint[stream://out])])]]]
12:08:27.622  TRACE  org.apache.camel.support.ServiceSupport:149    Service
already shut down
12:08:27.622  TRACE  org.apache.camel.util.ServiceHelper:111        Stopping
service Endpoint[cxf://http://localhost:8050/service?dataFormat=PAYLOAD]
12:08:27.622  TRACE  org.apache.camel.util.ServiceHelper:186        Shutting
down service:
Endpoint[cxf://http://localhost:8050/service?dataFormat=PAYLOAD]
12:08:27.622  TRACE  org.apache.camel.support.ServiceSupport:82     Service
already stopped
12:08:27.622  TRACE  o.a.c.m.DefaultManagementLifecycleStrategy:541 The
route is not managed:
EventDrivenConsumerRoute[Endpoint[cxf://http://localhost:8050/service?dataFormat=PAYLOAD]
->
Instrumentation:route[DelegateAsync[UnitOfWork(Channel[sendTo(Endpoint[stream://out])])]]]



--
View this message in context: http://camel.465427.n5.nabble.com/How-to-create-a-generic-SOAP-consumer-tp5731741p5732332.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to create a generic SOAP consumer?

Posted by Aki Yoshida <el...@gmail.com>.
If you want to have the soap header part processed by CXF and let the
payload (i.e,, the soap body content) generically to be propagated to the
camel route, you should configure the cxf endpoint using the jaxws generic
provider mode (i.e, use PAYLOAD mode with no wsdl nor serviceClass given).
I think this is what you are looking for.
regards, aki




2013/5/9 Smith-John <mi...@gmail.com>

> Hi,
>
> I have no problem with cxf and SOAP in general.
>
> But the consumer I need has to be generic. It should be able to consume all
> incoming SOAP messages however they look like. Therefore I either need a
> "generic" wsdl (if this is possible) or I need a way to realise this
> without
> a wsdl.
>
> I would appreciate if anyone could provide me a Java DSL snippet how to
> create a generic SOAP consumer (with cxf and headers support).
>
> Regards.
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/How-to-create-a-generic-SOAP-consumer-tp5731741p5732223.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

RE: How to create a generic SOAP consumer?

Posted by Smith-John <mi...@gmail.com>.
Hi,

I have no problem with cxf and SOAP in general.

But the consumer I need has to be generic. It should be able to consume all
incoming SOAP messages however they look like. Therefore I either need a
"generic" wsdl (if this is possible) or I need a way to realise this without
a wsdl.

I would appreciate if anyone could provide me a Java DSL snippet how to
create a generic SOAP consumer (with cxf and headers support).

Regards.



--
View this message in context: http://camel.465427.n5.nabble.com/How-to-create-a-generic-SOAP-consumer-tp5731741p5732223.html
Sent from the Camel - Users mailing list archive at Nabble.com.

RE: How to create a generic SOAP consumer?

Posted by "Siano, Stephan" <st...@sap.com>.
Hi,

What do you mean by "the incoming soap message doesn't match the expected one from the wsdl"? The incoming message is of course supposed to match the format defined in the wsdl (that's the contract for the communication), so if you provide a wsdl the messages sent to that provider have to match the description in there.

I think the example http://camel.apache.org/cxf-example.html may give you some guidance for communications without a WSDL.

Best regards
Stephan

-----Original Message-----
From: Smith-John [mailto:micha89@gmail.com] 
Sent: Dienstag, 7. Mai 2013 13:57
To: users@camel.apache.org
Subject: Re: How to create a generic SOAP consumer?

Hi,

can you please give me a example how to use CXF_MESSAGE format?
http://camel.apache.org/cxf doesn't say much about it.

Trying it like
from("cxf:http://localhost:8080/service?dataFormat=CXF_MESSAGE") I'm getting
a NP exception.

And with providing a wsdl like
from("cxf:http://localhost:8050/SoapPluginCallback?wsdlURL=someurltoawsdl&dataFormat=CXF_MESSAGE")
I have the problem again that incoming soap messages doesn't match the
ecpected ones from the wsdl. ("Message part XXX was not recognized.  (Does
it exist in service WSDL?)")

Regards.



--
View this message in context: http://camel.465427.n5.nabble.com/How-to-create-a-generic-SOAP-consumer-tp5731741p5732117.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to create a generic SOAP consumer?

Posted by Smith-John <mi...@gmail.com>.
Hi,

can you please give me a example how to use CXF_MESSAGE format?
http://camel.apache.org/cxf doesn't say much about it.

Trying it like
from("cxf:http://localhost:8080/service?dataFormat=CXF_MESSAGE") I'm getting
a NP exception.

And with providing a wsdl like
from("cxf:http://localhost:8050/SoapPluginCallback?wsdlURL=someurltoawsdl&dataFormat=CXF_MESSAGE")
I have the problem again that incoming soap messages doesn't match the
ecpected ones from the wsdl. ("Message part XXX was not recognized.  (Does
it exist in service WSDL?)")

Regards.



--
View this message in context: http://camel.465427.n5.nabble.com/How-to-create-a-generic-SOAP-consumer-tp5731741p5732117.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to create a generic SOAP consumer?

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

There is a CXF_MESSAGE format that may allow you to do a generic SOAP
consumer with camel-cxf.
http://camel.apache.org/cxf

On Sat, May 4, 2013 at 2:05 PM, Smith-John <mi...@gmail.com> wrote:
> Hi,
>
> thanks for the survey.
>
> But is it possible with cxf to get a generic SOAP consumer? With generic I
> mean that it can handle all possible kinds of different SOAP messages. Using
> MESSAGE dataformat it can't handle headers and with POJO dataformat I have
> to provide e.g. serviceClass that I haven't, cause it should be generic.
>
> Using jetty component and parsing the message with soap.MessageFactory
> should work I think but since I already need cxf-compnent for an other route
> I would also like to use it for this problem.
>
> So, is it possible with cxf?
>
> Regards.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/How-to-create-a-generic-SOAP-consumer-tp5731741p5732014.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: How to create a generic SOAP consumer?

Posted by Smith-John <mi...@gmail.com>.
Hi,

thanks for the survey.

But is it possible with cxf to get a generic SOAP consumer? With generic I
mean that it can handle all possible kinds of different SOAP messages. Using
MESSAGE dataformat it can't handle headers and with POJO dataformat I have
to provide e.g. serviceClass that I haven't, cause it should be generic.

Using jetty component and parsing the message with soap.MessageFactory
should work I think but since I already need cxf-compnent for an other route
I would also like to use it for this problem.

So, is it possible with cxf?

Regards.



--
View this message in context: http://camel.465427.n5.nabble.com/How-to-create-a-generic-SOAP-consumer-tp5731741p5732014.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to create a generic SOAP consumer?

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

For web services you can use
http://camel.apache.org/cxf
http://camel.apache.org/spring-web-services.html

Or use a plain HTTP service such as jetty with the soap data format
http://camel.apache.org/jetty

And for WS/SOAP examples you can find some here
http://camel.apache.org/examples

For example the little proxy example may be a good start
http://camel.apache.org/cxf-proxy-example.html

Or if you want to use spring WS then there is also an example
http://camel.apache.org/spring-ws-example.html


If you have a copy of Camel in Action book, then check chapter 7, as
there is web service examples with the camel-cxf component.

On Wed, May 1, 2013 at 11:00 AM, Smith-John <mi...@gmail.com> wrote:
> But I need to expose a Web Service first to receive the soap messages at all.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/How-to-create-a-generic-SOAP-consumer-tp5731741p5731844.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: How to create a generic SOAP consumer?

Posted by Smith-John <mi...@gmail.com>.
But I need to expose a Web Service first to receive the soap messages at all.



--
View this message in context: http://camel.465427.n5.nabble.com/How-to-create-a-generic-SOAP-consumer-tp5731741p5731844.html
Sent from the Camel - Users mailing list archive at Nabble.com.