Hi,
I'm a little bit confused with your scenario, could you please explain
your flow?
How could you put message into a ActiveMQ queue through cxf bc
consumer with JMS transport?
Cxf bc consumer with JMS transport would consume message from
queue(but not put message into queue), seems both your cxf bc consumer
and jms consumer consume messasge from same queue(which doesn't make
sense IMHO) , do I miss something?
Freeman
On 2010-6-16, at 上午6:43, jweathers777 wrote:
I have a simple SOAP message in which I have some string data that
uses
French characters. I am using "ISO-8869-1" encoding. When I send this
message into ServiceMix via a cxf:consumer endpoint, I notice in the
logs
that the resulting XML message embedded inside the SOAP envelope
enters the
system with a "UTF-8" encoding. Then, the message gets placed into an
ActiveMQ queue where I have a jms:consumer endpoint read it back
into the
system during which operation I get a stack trace:
2010-06-15 17:24:13:406 GMT-0400, WARN ,
DefaultMessageListenerContainer-3,
org.springframework.jms.listener.DefaultMessageListenerContainer -
Execution
of JMS message listener failed
javax.jms.JMSException: Error sending JBI exchange
at
org
.apache
.servicemix
.jms
.endpoints
.AbstractConsumerEndpoint.onMessage(AbstractConsumerEndpoint.java:580)
at
org.apache.servicemix.jms.endpoints.JmsConsumerEndpoint
$1.onMessage(JmsConsumerEndpoint.java:505)
at
org
.springframework
.jms
.listener
.AbstractMessageListenerContainer
.doInvokeListener(AbstractMessageListenerContainer.java:518)
at
org
.springframework
.jms
.listener
.AbstractMessageListenerContainer
.invokeListener(AbstractMessageListenerContainer.java:479)
at
org
.springframework
.jms
.listener
.AbstractMessageListenerContainer
.doExecuteListener(AbstractMessageListenerContainer.java:451)
at
org
.springframework
.jms
.listener
.AbstractPollingMessageListenerContainer
.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:323)
at
org
.springframework
.jms
.listener
.AbstractPollingMessageListenerContainer
.receiveAndExecute(AbstractPollingMessageListenerContainer.java:241)
at
org.springframework.jms.listener.DefaultMessageListenerContainer
$
AsyncMessageListenerInvoker
.invokeListener(DefaultMessageListenerContainer.java:982)
at
org.springframework.jms.listener.DefaultMessageListenerContainer
$
AsyncMessageListenerInvoker
.executeOngoingLoop(DefaultMessageListenerContainer.java:974)
at
org.springframework.jms.listener.DefaultMessageListenerContainer
$
AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:
876)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.apache.servicemix.soap.api.Fault:
com.ctc.wstx.exc.WstxIOException: Invalid UTF-8 middle byte 0x20 (at
char
#621, byte #-1)
at
org
.apache
.servicemix
.soap
.interceptors
.xml.StaxInInterceptor.handleMessage(StaxInInterceptor.java:64)
at
org
.apache
.servicemix
.soap
.core.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:85)
at
org
.apache
.servicemix
.jms
.endpoints
.DefaultConsumerMarshaler
.populateMessage(DefaultConsumerMarshaler.java:192)
at
org
.apache
.servicemix
.jms
.endpoints
.DefaultConsumerMarshaler
.createExchange(DefaultConsumerMarshaler.java:115)
at
org
.apache
.servicemix
.jms
.endpoints
.AbstractConsumerEndpoint.onMessage(AbstractConsumerEndpoint.java:549)
... 10 more
My cxfbc:consumer is configured like this:
<cxfbc:consumer wsdl="classpath:my_jms.wsdl"
service="test:myJMSQueue"
endpoint="mySOAPJMSQueueIn"
targetService="test:My_JMS_Receive_Service"
targetInterface="test:My_JMS_Receive_Interface"
targetEndpoint="endpoint"
useJBIWrapper="false"
useSOAPEnvelope="false">
<cxfbc:features>
<bean
class="org.apache.cxf.transport.jms.JMSConfigFeature">
<property name="jmsConfig">
<bean
class="org.apache.cxf.transport.jms.JMSConfiguration">
<property
name="concurrentConsumers">
<value>5</value>
</property>
<property
name="connectionFactory">
<ref
bean="myConnectionFactory" />
</property>
<property
name="targetDestination">
<value>My.Inbound.Queue</value>
</property>
<property name="useJms11">
<value>false</value>
</property>
</bean>
</property>
</bean>
</cxfbc:features>
</cxfbc:consumer>
My JMS consumer is configured like this:
<jms:consumer service="test:My_JMS_RMD_Consumer"
endpoint="Input"
targetService="test:My_JMS_Router"
targetEndpoint="Input"
destinationName="RMD"
connectionFactory="#connectionFactory2"
cacheLevel="3"
transacted="xa"
messageSelector ="TargetComponent LIKE 'My_JMS_In'"
useMessageIdInResponse="true"/>
It doesn't seem to make any difference if I encode the original
message in
UTF-8 either.
--
View this message in context:
http://servicemix.396122.n5.nabble.com/Character-Encoding-Problems-Using-CXF-Consumer-with-JMS-tp461424p461424.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
--
Freeman Fang
------------------------
Open Source SOA: http://fusesource.com