So, I'll start by responding to my own email :-) After digging through some examples this afternoon, I did find one where if the result is a static piece of text back to the client based on the web service being called. So I started playing with that to see if I could get activemq working in it.
The problem I seem to have is around osgi class loading. I created a sample project up on github to see what I've done https://github.com/johnament/servicemix-cxf Right now there are two directories, META-INF Is where the spring config is located, OSGI-INF for the blueprint files. I am essentially trying to get a listener on the cxf runtime, but when I try running it I get an error: used by: org.apache.camel.NoSuchBeanException: Found bean: orderEndpoint in BlueprintContainer: org.apache.aries.blueprint.container.BlueprintContainerImpl@6b6c1329 of type: org.apache.cxf.jaxws.EndpointImpl expected type was: class org.apache.camel.component.cxf.CxfEndpoint at org.apache.camel.blueprint.BlueprintContainerRegistry.lookup(BlueprintContainerRegistry.java:62)[99:org.apache.camel.camel-blueprint:2.10.4] at org.apache.camel.impl.CompositeRegistry.lookup(CompositeRegistry.java:49)[96:org.apache.camel.camel-core:2.10.4] at org.apache.camel.impl.PropertyPlaceholderDelegateRegistry.lookup(PropertyPlaceholderDelegateRegistry.java:62)[96:org.apache.camel.camel-core:2.10.4] at org.apache.camel.util.CamelContextHelper.lookup(CamelContextHelper.java:108)[96:org.apache.camel.camel-core:2.10.4] at org.apache.camel.util.CamelContextHelper.mandatoryLookup(CamelContextHelper.java:128)[96:org.apache.camel.camel-core:2.10.4] at org.apache.camel.component.cxf.CxfComponent.createEndpoint(CxfComponent.java:70)[172:org.apache.camel.camel-cxf:2.10.4] at org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:91)[96:org.apache.camel.camel-core:2.10.4] at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:461)[96:org.apache.camel.camel-core:2.10.4] ... 36 more Caused by: java.lang.ClassCastException: Cannot cast org.apache.cxf.jaxws.EndpointImpl to org.apache.camel.component.cxf.CxfEndpoint at java.lang.Class.cast(Class.java:3014)[:1.7.0_21] at org.apache.camel.blueprint.BlueprintContainerRegistry.lookup(BlueprintContainerRegistry.java:58)[99:org.apache.camel.camel-blueprint:2.10.4] Any idea how I'm supposed to structure my xml to get a CXFendpoint? John On Sat, Jun 29, 2013 at 4:38 PM, John D. Ament <[email protected]>wrote: > So, in my scenario, this is the best I can describe it. > > I want to deploy a couple of web services to my servicemix instance. > These will be consumed by a legacy system that already knows how to talk > to these web services. I want to put these requests into a modified format > on a JMS queue for working and return immediately back to the client (e.g. > don't wait for the JMS listener to process these). > > On the JMS side, I expect to go through a few different transforms, one > reading remote data; another converting it into a common jax-b based > structure and then finally sending that JAX-B message to another system for > processing. > > That other system will send a request over when it's done indicating that > some data has to go to the first system, which I'm sure will also work fine. > > Ideally, I think I want my webservice to process things normally, other > than having a producer that can put message data on to the queue. Based on > how it's structured, I'd prefer to not have anything in the mix in front or > behind it, but could hear some arguments on why this might be best. The > service has a single method, with the signature: > > public boolean importData(int sourceId, int targetId, String sourceRepo, > String sourceRepoGroup, int dataElementId); > > which simply returns true as long as the WS Is up (right now, this just > dumps a message onto a JMS queue). I can't change the argument structure, > but perhaps it can go in a wrap object; not sure. > > After some reading, I thought my best solution would be to use a producer > template, and then the wrapped version. So I threw this into my > webservice, just to see if i could get it to log messages: > > @EndpointInject(uri="log:events") > ProducerTemplate producer; > > and then in the body > > producer.sendBody("Received sourceRepo as "+sourceRepo); > > Which (I honestly wasn't surprised here) generated a null pointer > exception. So I guess I can't inject this into my webservice endpoint? > > Is this use case sensible? It's probably not ideal for the ESB, but it > kind of keeps things moving in the webservice with minimal changes. > > Thanks! > > John >
