<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
Hi all, <br>Not sure if this is the correct place to post this (found oclug-devel via google search) but am struggling to get a basic servicemix prototype to work.<br><br>Basically I'm trying to get a camel cxf producer to send a message to a cxf-nmr consumer (split up into two osgi bundles).&nbsp; I can however all the nmr endpoint just as in example cxf-camel-nmr without issue so I know that bundle is ok.  <br><br>If anyone has any idea's or knows someone with servermix 4 experience please help!<br><br>Env: Java 1.5<br>
Apache Servicemix 4.3.2<br>
<br>
In servicemix I have two separate osgi bundles. I am unable to get my
camel cxf producer to successfully call the nmr endpoint and have zero
clue on how to fix.<br>

Bundle #1 cxf-nmr //consumer<br>
&lt;beans xmlns="http://www.springframework.org/schema/beans"<br>
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"<br>
    xmlns:jaxws="http://cxf.apache.org/jaxws"<br>
    xsi:schemaLocation="<br>
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd<br>
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd"&gt;<br>
<br>
    &lt;import resource="classpath:META-INF/cxf/cxf.xml" /&gt;<br>
    &lt;import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" /&gt;<br>
    &lt;import resource="classpath:META-INF/cxf/transport/nmr/cxf-transport-nmr.xml" /&gt;<br>
<br>
    &lt;jaxws:endpoint id="helloWorld1"<br>
                    implementor="org.apache.servicemix.examples.cxf.HelloWorldImpl"<br>
                    address="nmr:HelloWorld1" /&gt;<br>
<br>
&lt;/beans&gt;<br>
<br>
Bundle #2 //producer<br>
&lt;beans xmlns="http://www.springframework.org/schema/beans"<br>
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"<br>
       xmlns:osgi="http://www.springframework.org/schema/osgi"<br>
       xmlns:camel="http://camel.apache.org/schema/spring"<br>
       xmlns:cxf="http://camel.apache.org/schema/cxf"<br>
<BR>
           xsi:schemaLocation="<br>
           http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd<br>
           http://servicemix.apache.org/http/1.0 http://servicemix.apache.org/http/1.0/servicemix-http.xsd<br>
           http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd<br>
       http://www.springframework.org/schema/osgi  http://www.springframework.org/schema/osgi/spring-osgi.xsd<br>
       http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"&gt;<br>
<BR>
  &lt;import resource="classpath:META-INF/cxf/cxf.xml" /&gt;<br>
  &lt;import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" /&gt;<br>
  &lt;import resource="classpath:META-INF/cxf/transport/nmr/cxf-transport-nmr.xml" /&gt;        <br>
  &lt;import resource="classpath:org/apache/servicemix/camel/nmr/camel-nmr.xml" /&gt;<br>
  &lt;import resource="classpath:META-INF/cxf/cxf-extension-http.xml"/&gt;<br>
<BR>
  &lt;import resource="classpath:META-INF/cxf/cxf-extension-http-jetty.xml" /&gt;<br>
<BR>
  &lt;camel:camelContext xmlns="http://camel.apache.org/schema/spring"&gt;<br>
    &lt;route&gt;<br>
      &lt;from uri="cxf:bean:testEndpoint"/&gt;<br>
      &lt;to uri="nmr:HelloWorld1"/&gt;<br>
    &lt;/route&gt;<br>
 &lt;/camel:camelContext&gt;   <br>
  &lt;cxf:cxfEndpoint<br>
            id="testEndpoint"<br>
            address="http://localhost:9090/test"<br>
            serviceClass="org.apache.servicemix.examples.cxf.HelloWorld"&gt;<br>
            &lt;cxf:properties&gt;<br>
                    &lt;entry key="dataFormat" value="PAYLOAD" /&gt;<br>
            &lt;/cxf:properties&gt;<br>
    &lt;/cxf:cxfEndpoint&gt;        <br>
&lt;/beans&gt;<br>
<BR>
<br>
#################<br>
soap request response<br>
#################<br>
&lt;?xml version="1.0"?&gt;<br>
&lt;SOAP-ENV:Envelope<br>
   xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"<br>
   SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"&gt; <br>
   &lt;SOAP-ENV:Body&gt;<br>
      &lt;m:sayHi xmlns:m="http://cxf.examples.servicemix.apache.org/"&gt;<br>
      &lt;arg0&gt;foobar&lt;/arg0&gt;<br>
      &lt;/m:sayHi&gt;<br>
   &lt;/SOAP-ENV:Body&gt;  <br>
&lt;/SOAP-ENV:Envelope&gt;<br>
<br>
STATUS: 500<br>
&lt;soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&gt;&lt;soap:Body&gt;&lt;soap:Fault&gt;&lt;faultcode&gt;soap:Server&lt;/faultcode&gt;&lt;faultstring&gt;java.lang.NullPointerException&lt;/faultstring&gt;&lt;/soap:Fault&gt;&lt;/soap:Body&gt;&lt;/soap:Envelope&gt;<br>
<br>
####################<br>
Console Output - No Idea How To Fix<br>
####################<br>
<br>
18:56:04,544 | ERROR | oWorld1-thread-1 | NMRDestination                   |  -  -  | error preparing message<br>
java.lang.NullPointerException<br>
        at org.apache.cxf.staxutils.StaxUtils.createXMLStreamReader(StaxUtils.java:1183)<strike>116:org.apache.cxf.bundle:2.3.2</strike><br>
        at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:427)<strike>116:org.apache.cxf.bundle:2.3.2</strike><br>
        at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:380)<strike>116:org.apache.cxf.bundle:2.3.2</strike><br>
        at org.apache.servicemix.cxf.transport.nmr.NMRMessageHelper.convertMessageToInputStream(NMRMessageHelper.java:43)<strike>203:org.apache.servicemix.cxf.transport.nmr:4.3.0</strike><br>
        at org.apache.servicemix.cxf.transport.nmr.NMRDestination.process(NMRDestination.java:127)<strike>203:org.apache.servicemix.cxf.transport.nmr:4.3.0</strike><br>
        at org.apache.servicemix.nmr.core.InternalEndpointWrapper.process(InternalEndpointWrapper.java:86)<strike>83:org.apache.servicemix.nmr.core:1.4.0</strike><br>
        at org.apache.servicemix.nmr.core.ChannelImpl.process(ChannelImpl.java:255)<strike>83:org.apache.servicemix.nmr.core:1.4.0</strike><br>
        at org.apache.servicemix.nmr.core.ChannelImpl$1.run(ChannelImpl.java:215)<strike>83:org.apache.servicemix.nmr.core:1.4.0</strike><br>
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:651)<strike>:1.5.0_22</strike><br>
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:676)<strike>:1.5.0_22</strike><br>
        at java.lang.Thread.run(Thread.java:595)<strike>:1.5.0_22</strike><br>
18:56:04,547 | WARN | oWorld1-thread-1 | NMR | 83 -
org.apache.servicemix.nmr.core - 1.4.0 | Error processing exchange [<br>
  id:        a778d16c-2955-41de-89e8-7775f4f976bf<br>
  mep:       InOut<br>
  status:    Active<br>
  role:      Provider<br>
  target:    PropertyMatchingReference<a href="http://fusesource.com/forums/" target="_newWindow">{NAME=HelloWorld1}</a><br>
  properties: [<br>
jaxwsContext =
{javax.xml.ws.wsdl.operation={http://cxf.examples.servicemix.apache.org/}sayHi,
javax.xml.ws.wsdl.description=http://localhost:9090/test?wsdl,
javax.xml.ws.wsdl.service={http://cxf.examples.servicemix.apache.org/}HelloWorldService,
javax.xml.ws.wsdl.interface={http://cxf.examples.servicemix.apache.org/}HelloWorld,
javax.xml.ws.wsdl.port={http://cxf.examples.servicemix.apache.org/}HelloWorldPort}<br>
      CamelToEndpoint = nmr://HelloWorld1<br>
      org.apache.cxf.service.model.BindingOperationInfo = <strike>BindingOperationInfo: {http://cxf.examples.servicemix.apache.org/}sayHi</strike><br>
      mtom-enabled = false<br>
      CamelCreatedTimestamp = Thu Jun 09 18:56:04 PDT 2011<br>
      CamelCXFDataFormat = PAYLOAD<br>
  ]<br>
]<br>
<br>
org.apache.servicemix.nmr.api.ServiceMixException: java.lang.NullPointerException<br>
        at org.apache.servicemix.cxf.transport.nmr.NMRDestination.process(NMRDestination.java:151)<strike>203:org.apache.servicemix.cxf.transport.nmr:4.3.0</strike><br>
        at org.apache.servicemix.nmr.core.InternalEndpointWrapper.process(InternalEndpointWrapper.java:86)<strike>83:org.apache.servicemix.nmr.core:1.4.0</strike><br>
        at org.apache.servicemix.nmr.core.ChannelImpl.process(ChannelImpl.java:255)<strike>83:org.apache.servicemix.nmr.core:1.4.0</strike><br>
        at org.apache.servicemix.nmr.core.ChannelImpl$1.run(ChannelImpl.java:215)<strike>83:org.apache.servicemix.nmr.core:1.4.0</strike><br>
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:651)<strike>:1.5.0_22</strike><br>
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:676)<strike>:1.5.0_22</strike><br>
        at java.lang.Thread.run(Thread.java:595)<strike>:1.5.0_22</strike><br>
Caused by: java.lang.NullPointerException<br>
        at org.apache.cxf.staxutils.StaxUtils.createXMLStreamReader(StaxUtils.java:1183)<strike>116:org.apache.cxf.bundle:2.3.2</strike><br>
        at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:427)<strike>116:org.apache.cxf.bundle:2.3.2</strike><br>
        at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:380)<strike>116:org.apache.cxf.bundle:2.3.2</strike><br>
        at org.apache.servicemix.cxf.transport.nmr.NMRMessageHelper.convertMessageToInputStream(NMRMessageHelper.java:43)<strike>203:org.apache.servicemix.cxf.transport.nmr:4.3.0</strike><br>
        at org.apache.servicemix.cxf.transport.nmr.NMRDestination.process(NMRDestination.java:127)<strike>203:org.apache.servicemix.cxf.transport.nmr:4.3.0</strike><br>
        ... 6 more<br>
18:56:04,552 | ERROR | f2d4607-thread-1 | DefaultErrorHandler | 68 -
org.apache.camel.camel-core - 2.6.0 | Failed delivery for exchangeId:
ID-Dana-PC-45880-1307670949817-0-2. Exhausted after delivery attempt: 1
caught: org.apache.servicemix.nmr.api.ServiceMixException:
java.lang.NullPointerException<br>
org.apache.servicemix.nmr.api.ServiceMixException: java.lang.NullPointerException<br>
        at org.apache.servicemix.cxf.transport.nmr.NMRDestination.process(NMRDestination.java:151)<strike>203:org.apache.servicemix.cxf.transport.nmr:4.3.0</strike><br>
        at org.apache.servicemix.nmr.core.InternalEndpointWrapper.process(InternalEndpointWrapper.java:86)<strike>83:org.apache.servicemix.nmr.core:1.4.0</strike><br>
        at org.apache.servicemix.nmr.core.ChannelImpl.process(ChannelImpl.java:255)<strike>83:org.apache.servicemix.nmr.core:1.4.0</strike><br>
        at org.apache.servicemix.nmr.core.ChannelImpl$1.run(ChannelImpl.java:215)<strike>83:org.apache.servicemix.nmr.core:1.4.0</strike><br>
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:651)<strike>:1.5.0_22</strike><br>
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:676)<strike>:1.5.0_22</strike><br>
        at java.lang.Thread.run(Thread.java:595)<strike>:1.5.0_22</strike><br>
Caused by: java.lang.NullPointerException<br>
        at org.apache.cxf.staxutils.StaxUtils.createXMLStreamReader(StaxUtils.java:1183)<strike>116:org.apache.cxf.bundle:2.3.2</strike><br>
        at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:427)<strike>116:org.apache.cxf.bundle:2.3.2</strike><br>
        at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:380)<strike>116:org.apache.cxf.bundle:2.3.2</strike><br>
        at org.apache.servicemix.cxf.transport.nmr.NMRMessageHelper.convertMessageToInputStream(NMRMessageHelper.java:43)<strike>203:org.apache.servicemix.cxf.transport.nmr:4.3.0</strike><br>
        at org.apache.servicemix.cxf.transport.nmr.NMRDestination.process(NMRDestination.java:127)<strike>203:org.apache.servicemix.cxf.transport.nmr:4.3.0</strike><br>
        ... 6 more<br>
18:56:04,553 | WARN | qtp407691725-242 | PhaseInterceptorChain | - - |
Interceptor for
{http://cxf.examples.servicemix.apache.org/}HelloWorldService#{http://cxf.examples.servicemix.apache.org/}sayHi
has thrown exception, unwinding now<br>
org.apache.cxf.interceptor.Fault: java.lang.NullPointerException<br>
        at org.apache.camel.component.cxf.CxfConsumer$1.checkFailure(CxfConsumer.java:219)<strike>118:org.apache.camel.camel-cxf:2.6.0</strike><br>
        at org.apache.camel.component.cxf.CxfConsumer$1.setResponseBack(CxfConsumer.java:196)<strike>118:org.apache.camel.camel-cxf:2.6.0</strike><br>
        at org.apache.camel.component.cxf.CxfConsumer$1.asyncInvoke(CxfConsumer.java:116)<strike>118:org.apache.camel.camel-cxf:2.6.0</strike><br>
        at org.apache.camel.component.cxf.CxfConsumer$1.invoke(CxfConsumer.java:73)<strike>118:org.apache.camel.camel-cxf:2.6.0</strike><br>
        at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)<strike>116:org.apache.cxf.bundle:2.3.2</strike><br>
        at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:93)<strike>116:org.apache.cxf.bundle:2.3.2</strike><br>
        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)<strike>116:org.apache.cxf.bundle:2.3.2</strike><br>
        at org.apache.cxf.phase.PhaseInterceptorChain.resume(PhaseInterceptorChain.java:224)<strike>116:org.apache.cxf.bundle:2.3.2</strike><br>
        at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:70)<strike>116:org.apache.cxf.bundle:2.3.2</strike><br>
        at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:311)<strike>116:org.apache.cxf.bundle:2.3.2</strike><br>
        at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:280)<strike>116:org.apache.cxf.bundle:2.3.2</strike><br>
        at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:72)<strike>116:org.apache.cxf.bundle:2.3.2</strike><br>
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:931)<strike>149:org.eclipse.jetty.server:7.2.2.v20101205</strike><br>
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:868)<strike>149:org.eclipse.jetty.server:7.2.2.v20101205</strike><br>
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)<strike>149:org.eclipse.jetty.server:7.2.2.v20101205</strike><br>
        at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:185)<strike>149:org.eclipse.jetty.server:7.2.2.v20101205</strike><br>
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:114)<strike>149:org.eclipse.jetty.server:7.2.2.v20101205</strike><br>
        at org.eclipse.jetty.server.Server.handleAsync(Server.java:397)<strike>149:org.eclipse.jetty.server:7.2.2.v20101205</strike><br>
        at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:601)<strike>149:org.eclipse.jetty.server:7.2.2.v20101205</strike><br>
        at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:410)<strike>149:org.eclipse.jetty.server:7.2.2.v20101205</strike><br>
        at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:508)<strike>144:org.eclipse.jetty.io:7.2.2.v20101205</strike><br>
        at org.eclipse.jetty.io.nio.SelectChannelEndPoint.access$000(SelectChannelEndPoint.java:34)<strike>144:org.eclipse.jetty.io:7.2.2.v20101205</strike><br>
        at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)<strike>144:org.eclipse.jetty.io:7.2.2.v20101205</strike><br>
        at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:451)<strike>143:org.eclipse.jetty.util:7.2.2.v20101205</strike><br>
        at java.lang.Thread.run(Thread.java:595)<strike>:1.5.0_22</strike><br>
Caused by: org.apache.servicemix.nmr.api.ServiceMixException: java.lang.NullPointerException<br>
        at org.apache.servicemix.cxf.transport.nmr.NMRDestination.process(NMRDestination.java:151)<strike>203:org.apache.servicemix.cxf.transport.nmr:4.3.0</strike><br>
        at org.apache.servicemix.nmr.core.InternalEndpointWrapper.process(InternalEndpointWrapper.java:86)<strike>83:org.apache.servicemix.nmr.core:1.4.0</strike><br>
        at org.apache.servicemix.nmr.core.ChannelImpl.process(ChannelImpl.java:255)<strike>83:org.apache.servicemix.nmr.core:1.4.0</strike><br>
        at org.apache.servicemix.nmr.core.ChannelImpl$1.run(ChannelImpl.java:215)<strike>83:org.apache.servicemix.nmr.core:1.4.0</strike><br>
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:651)<strike>:1.5.0_22</strike><br>
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:676)<strike>:1.5.0_22</strike><br>
        ... 1 more<br>
Caused by: java.lang.NullPointerException<br>
        at org.apache.cxf.staxutils.StaxUtils.createXMLStreamReader(StaxUtils.java:1183)<strike>116:org.apache.cxf.bundle:2.3.2</strike><br>
        at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:427)<strike>116:org.apache.cxf.bundle:2.3.2</strike><br>
        at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:380)<strike>116:org.apache.cxf.bundle:2.3.2</strike><br>
        at org.apache.servicemix.cxf.transport.nmr.NMRMessageHelper.convertMessageToInputStream(NMRMessageHelper.java:43)<strike>203:org.apache.servicemix.cxf.transport.nmr:4.3.0</strike><br>
        at org.apache.servicemix.cxf.transport.nmr.NMRDestination.process(NMRDestination.java:127)<strike>203:org.apache.servicemix.cxf.transport.nmr:4.3.0</strike><br>
        ... 6 more<BR><br><br><br><br><br><b><font color="#000000" size="+1"></font></b>                                               </body>
</html>