You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by bocamel <jo...@gmail.com> on 2016/02/19 05:30:36 UTC

SOAP web services issues with 2.16.x

Awhile ago, I posted about a payload parsing issue with 2.16.x.  Aki Yoshida
kindly told me that streamCache needs to be set if the content is to be read
more than once.  I tested it in a standalone Camel process, it worked
perfectly.  Then I tried to deploy it to Karaf (4.0.4).  It failed.  The
error is listed below.  If I switch to Camel 2.15.4 (with all other
components, e.g. CXF, Karaf, etc. unchanged), everything would work.  

Here is my camel route:
  <camelContext xmlns="http://camel.apache.org/schema/spring"
streamCache="true" trace="true">
    <route>
      <from uri="cxf:bean:oneWayTtEndpoint"/>
      <log message="request received on endpoint 1: ${body}"/>
      <log message="request received on endpoint 1: ${body}"/>
    </route>
  </camelContext>

Here is the CXF endpoint:
    <cxf:cxfEndpoint id="oneWayTtEndpoint"
                     address="http://0.0.0.0:9003/test/MessageServiceV1"
                     serviceName="ns1:PciOneWayService"
endpointName="ns1:PciOneWayService"
                     xmlns:ns1="urn:pci:OneWayService:v1">
        <cxf:properties>
            <entry key="dataFormat" value="PAYLOAD" />
            <entry key="schema-validation-enabled" value="false" />
            <entry key="exceptionMessageCauseEnabled" value="true" />
            <entry key="faultStackTraceEnabled" value="true" />
            <entry key="wsdlURL" value="wsdl/oneway/MessageServiceV1.wsdl"
/>
            <entry key="loggingFeatureEnabled" value="true" />
        </cxf:properties>
    </cxf:cxfEndpoint>

To summarize, it works standalone.  It works in Karaf 404 with Camel 2.15.4. 
It fails in Karaf 404 with Camel 2.16.2 with the error:

javax.xml.transform.TransformerException: Can't transform a Source of type
javax.xml.transform.stax.StAXSource
	at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:419)
	at
org.apache.camel.converter.jaxp.XmlConverter.toResult(XmlConverter.java:132)
	at
org.apache.camel.converter.jaxp.XmlConverter.toResult(XmlConverter.java:116)
	at
org.apache.camel.component.cxf.converter.CachedCxfPayload.<init>(CachedCxfPayload.java:75)
	at
org.apache.camel.component.cxf.converter.CxfPayloadConverter.cxfPayLoadToStreamCache(CxfPayloadConverter.java:118)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.8.0_60]
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_60]
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_60]
	at java.lang.reflect.Method.invoke(Method.java:497)[:1.8.0_60]
	at
org.apache.camel.util.ObjectHelper.invokeMethod(ObjectHelper.java:1243)[164:org.apache.camel.camel-core:2.16.2]
	at
org.apache.camel.impl.converter.StaticMethodTypeConverter.convertTo(StaticMethodTypeConverter.java:59)[164:org.apache.camel.camel-core:2.16.2]
	at
org.apache.camel.impl.converter.BaseTypeConverterRegistry.doConvertTo(BaseTypeConverterRegistry.java:293)[164:org.apache.camel.camel-core:2.16.2]
	at
org.apache.camel.impl.converter.BaseTypeConverterRegistry.convertTo(BaseTypeConverterRegistry.java:120)[164:org.apache.camel.camel-core:2.16.2]
	at
org.apache.camel.core.osgi.OsgiTypeConverter.convertTo(OsgiTypeConverter.java:117)[171:org.apache.camel.camel-spring:2.16.2]
	at
org.apache.camel.impl.MessageSupport.getBody(MessageSupport.java:72)[164:org.apache.camel.camel-core:2.16.2]
	at
org.apache.camel.impl.MessageSupport.getBody(MessageSupport.java:47)[164:org.apache.camel.camel-core:2.16.2]
	at
org.apache.camel.impl.DefaultStreamCachingStrategy.cache(DefaultStreamCachingStrategy.java:189)[164:org.apache.camel.camel-core:2.16.2]
	at
org.apache.camel.processor.CamelInternalProcessor$StreamCachingAdvice.before(CamelInternalProcessor.java:765)[164:org.apache.camel.camel-core:2.16.2]
	at
org.apache.camel.processor.CamelInternalProcessor$StreamCachingAdvice.before(CamelInternalProcessor.java:744)[164:org.apache.camel.camel-core:2.16.2]
	at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:138)[164:org.apache.camel.camel-core:2.16.2]
	at
org.apache.camel.processor.Pipeline.process(Pipeline.java:121)[164:org.apache.camel.camel-core:2.16.2]
	at
org.apache.camel.processor.Pipeline.process(Pipeline.java:83)[164:org.apache.camel.camel-core:2.16.2]
	at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190)[164:org.apache.camel.camel-core:2.16.2]
	at
org.apache.camel.component.cxf.CxfConsumer$1.asyncInvoke(CxfConsumer.java:95)[165:org.apache.camel.camel-cxf:2.16.2]
	at
org.apache.camel.component.cxf.CxfConsumer$1.invoke(CxfConsumer.java:75)[165:org.apache.camel.camel-cxf:2.16.2]
	at
org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)[63:org.apache.cxf.cxf-core:3.1.4]
	at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_60]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_60]
	at
org.apache.cxf.interceptor.ServiceInvokerInterceptor$2.run(ServiceInvokerInterceptor.java:126)[63:org.apache.cxf.cxf-core:3.1.4]
	at
org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)[63:org.apache.cxf.cxf-core:3.1.4]
	at
org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:131)[63:org.apache.cxf.cxf-core:3.1.4]
	at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)[63:org.apache.cxf.cxf-core:3.1.4]
	at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)[63:org.apache.cxf.cxf-core:3.1.4]
	at
org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:251)[88:org.apache.cxf.cxf-rt-transports-http:3.1.4]
	at
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:234)[89:org.apache.cxf.cxf-rt-transports-http-jetty:3.1.4]
	at
org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:70)[89:org.apache.cxf.cxf-rt-transports-http-jetty:3.1.4]
	at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1129)[140:org.eclipse.jetty.server:9.2.14.v20151106]
	at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1065)[140:org.eclipse.jetty.server:9.2.14.v20151106]
	at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)[140:org.eclipse.jetty.server:9.2.14.v20151106]
	at
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)[140:org.eclipse.jetty.server:9.2.14.v20151106]
	at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)[140:org.eclipse.jetty.server:9.2.14.v20151106]
	at
org.eclipse.jetty.server.Server.handle(Server.java:499)[140:org.eclipse.jetty.server:9.2.14.v20151106]
	at
org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)[140:org.eclipse.jetty.server:9.2.14.v20151106]
	at
org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)[140:org.eclipse.jetty.server:9.2.14.v20151106]
	at
org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)[132:org.eclipse.jetty.io:9.2.14.v20151106]
	at
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)[143:org.eclipse.jetty.util:9.2.14.v20151106]
	at
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)[143:org.eclipse.jetty.util:9.2.14.v20151106]
	at java.lang.Thread.run(Thread.java:745)[:1.8.0_60]

Any help would be greatly appreciated.  I will be glad to open a JIRA ticket
with the project file attached.



--
View this message in context: http://camel.465427.n5.nabble.com/SOAP-web-services-issues-with-2-16-x-tp5777893.html
Sent from the Camel - Users mailing list archive at Nabble.com.