Nabble is still claiming all of my posts are "pending" and they appear
to be getting no views and I have subscribed to the mailing list so I
don't know what's wrong. My posts also do not show up in the mails, so
I am attempting direct to mailing list posting. I apologize if this is
indeed a duplicate for most of you:
I am using camel 2.7.1 and the associated 2.7.1 camel-cxf jar and I have
CXF 2.3.0 on my classpath for that...
I am not using Spring at all and have done everything via API/code. I
have successfully installed the CXF component via code and I have
created a CXF consumer endpoint which successfully serves up the
generated service interface generated WSDL at the proper URL like the
code listed below.
I have an existing web service interface/implementation class that I was
successfully serving up using CXF and Jetty directly in another part of
the application, but now we are using camel and trying to unify the
architecture. It seems to me that I would be able to use that JAX-WS
annotated service interface and implementation class from Camel-CXF
somehow and that is what I am attempting to do, but cannot find any
direct turorial or example of this and cannot find explicit
documentation on this. There are all sorts of CXF related topics but
none that work or apply for me. So my question is:
I have an existing JAX-WS annotated interface and implementation class,
can I not simply use those two classes and have Camel CXF serve up that
service as a consumer for incoming web service calls? If so, how? If
not, then what do I need to do? Below is my more attempt which does not
work.
Thanks again...
String WEB_SERVICES_URL =
"cxf://http://myhost:9999/MyServiceName?dataFormat=POJO&serviceName=
<http://myhost:9999/MyServiceName?dataFormat=POJO&serviceName=>{http://my.name.space}MyServiceName&serviceClass=my.service.MyServiceInterface";
SoapJaxbDataFormat soapDF = new
SoapJaxbDataFormat("my.service.MyServiceInterface", new
ServiceInterfaceStrategy(MyServiceInterface.class, false));
MyServiceInterface serverBean = new MyServiceInterfaceImpl();
from(WEB_SERVICES_URL)
.onException(Exception.class)
.handled(true)
.marshal(soapDF)
.end()
.unmarshal(soapDF)
.bean(serverBean)
.marshal(soapDF);
MyServiceInterface is my JAX-WS annotated service defintion
and MyServiceInterfaceImpl is the implementation obviously.
when I run this code, there is a WSDL present at
http://myhost:9999/MyServiceName?WSDL
with no problems and I can connect to this URL from third party
tools(like visual studio and generate a proxy client with no problem).
However any time I try to actually exercise one of my 2 test methods(int
this case GetDestinations()) I get the following stack trace on the
server and I know the implementation method never actually fired because
I have a trace that is never hit there.
Incidentally, I have run this very same JAX-WS annotated interface and
implementation class in a pure CXF/Jetty test with no problems.
I have no idea what I am doing wrong whatsoever.
2011-05-05 02:50:49,818 [qtp17485453-104 - /MyServiceName] DEBUG
org.apache.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on
interceptor org.apache.cxf.ws.policy.PolicyInInterceptor@1cbc933
2011-05-05 02:50:49,818 [qtp17485453-104 - /MyServiceName] DEBUG
org.apache.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on
interceptor org.apache.cxf.interceptor.AttachmentInInterceptor@1a0ae6d
2011-05-05 02:50:49,818 [qtp17485453-104 - /MyServiceName] DEBUG
org.apache.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on
interceptor
org.apache.cxf.transport.https.CertConstraintsInterceptor@a10ea2
2011-05-05 02:50:49,818 [qtp17485453-104 - /MyServiceName] DEBUG
org.apache.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on
interceptor org.apache.cxf.interceptor.StaxInInterceptor@1b8d82
2011-05-05 02:50:49,818 [qtp17485453-104 - /MyServiceName] DEBUG
org.apache.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on
interceptor
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor@17493f0
2011-05-05 02:50:49,818 [qtp17485453-104 - /MyServiceName] DEBUG
org.apache.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on
interceptor
org.apache.cxf.binding.soap.interceptor.SoapActionInInterceptor@e75a11
2011-05-05 02:50:49,818 [qtp17485453-104 - /MyServiceName] DEBUG
org.apache.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on
interceptor
org.apache.cxf.binding.soap.interceptor.StartBodyInterceptor@9caed5
2011-05-05 02:50:49,819 [qtp17485453-104 - /MyServiceName] DEBUG
org.apache.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on
interceptor
org.apache.cxf.binding.soap.interceptor.MustUnderstandInterceptor@97f5f
2011-05-05 02:50:49,819 [qtp17485453-104 - /MyServiceName] DEBUG
org.apache.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on
interceptor
org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor@9a2557
2011-05-05 02:50:49,819 [qtp17485453-104 - /MyServiceName] DEBUG
org.apache.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on
interceptor
org.apache.cxf.jaxb.attachment.JAXBAttachmentSchemaValidationHack@1ba994b
2011-05-05 02:50:49,819 [qtp17485453-104 - /MyServiceName] DEBUG
org.apache.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on
interceptor org.apache.cxf.interceptor.URIMappingInterceptor@1894e9c
2011-05-05 02:50:49,819 [qtp17485453-104 - /MyServiceName] DEBUG
org.apache.cxf.interceptor.URIMappingInterceptor - Invoking HTTP method
POST
2011-05-05 02:50:49,819 [qtp17485453-104 - /MyServiceName] DEBUG
org.apache.cxf.interceptor.URIMappingInterceptor - URIMappingInterceptor
can only handle HTTP GET, not HTTP POST
2011-05-05 02:50:49,819 [qtp17485453-104 - /MyServiceName] DEBUG
org.apache.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on
interceptor
org.apache.camel.component.cxf.interceptors.ConfigureDocLitWrapperInterceptor@188045a
2011-05-05 02:50:49,819 [qtp17485453-104 - /MyServiceName] DEBUG
org.apache.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on
interceptor org.apache.cxf.interceptor.DocLiteralInInterceptor@ca128d
2011-05-05 02:50:49,819 [qtp17485453-104 - /MyServiceName] DEBUG
org.apache.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on
interceptor
org.apache.camel.component.cxf.interceptors.RemoveClassTypeInterceptor@d5d980
2011-05-05 02:50:49,819 [qtp17485453-104 - /MyServiceName] DEBUG
org.apache.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on
interceptor
org.apache.cxf.binding.soap.interceptor.SoapHeaderInterceptor@881278
2011-05-05 02:50:49,819 [qtp17485453-104 - /MyServiceName] DEBUG
org.apache.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on
interceptor org.apache.cxf.interceptor.OneWayProcessorInterceptor@1bc3ae7
2011-05-05 02:50:49,819 [qtp17485453-104 - /MyServiceName] DEBUG
org.apache.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on
interceptor
org.apache.cxf.jaxws.interceptors.WrapperClassInInterceptor@bf47df
2011-05-05 02:50:49,819 [qtp17485453-104 - /MyServiceName] DEBUG
org.apache.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on
interceptor org.apache.cxf.jaxws.interceptors.SwAInInterceptor@214a7a
2011-05-05 02:50:49,819 [qtp17485453-104 - /MyServiceName] DEBUG
org.apache.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on
interceptor org.apache.cxf.jaxws.interceptors.HolderInInterceptor@7965f
2011-05-05 02:50:49,819 [qtp17485453-104 - /MyServiceName] DEBUG
org.apache.cxf.phase.PhaseInterceptorChain - Invoking handleMessage on
interceptor org.apache.cxf.interceptor.ServiceInvokerInterceptor@63430
2011-05-05 02:50:49,820 [qtp17485453-104 - /MyServiceName] WARN
org.apache.cxf.phase.PhaseInterceptorChain - Interceptor for
{http://my.name.space}MyServiceName#={http://my.name.space}GetDestinations
has thrown exception, unwinding now
java.lang.NullPointerException
at
org.apache.camel.component.cxf.CxfConsumer$1.perpareCamelExchange(CxfConsumer.java:180)
at
org.apache.camel.component.cxf.CxfConsumer$1.asyncInvoke(CxfConsumer.java:85)
at
org.apache.camel.component.cxf.CxfConsumer$1.invoke(CxfConsumer.java:72)
at
org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at
org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
at
org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:247)
at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:113)
at
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:311)
at
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:280)
at
org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:72)
at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:931)
at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:868)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
at
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:247)
at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:114)
at org.eclipse.jetty.server.Server.handle(Server.java:348)
at
org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:596)
at
org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:1051)
at
org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:599)
at
org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:212)
at
org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:426)
at
org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:508)
at
org.eclipse.jetty.io.nio.SelectChannelEndPoint.access$000(SelectChannelEndPoint.java:34)
at
org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)
at
org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:451)
at java.lang.Thread.run(Thread.java:619)
Thanks for your time regarding this...