You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Wilson Freitas <wi...@gmail.com> on 2008/01/10 17:09:46 UTC
CXF-BC + JMS problem
Hi,
I am using servicemix 3.2.1.
I am trying to do this:
External client-----[SOAP]---->CXF-BC Consumer---->JMS Provider---->(
jms queue)------>JMS Consumer------> CXF-BC
Provider----[SOAP]---->External service
All MEPs are InOnly. If CXF-BC sends messages directly to CXF-BC
provider (no JMS) it works fine. When I add the JMS endpoints the
message is not delivered and I have the following console output
during message exchange:
-------------CONSOLE OUTPUT - BEGIN ---------------------------------
ERROR - CxfBcComponent - Error processing exchange InOnly[
id: ID:10.0.0.71-11763adf8e5-11:10
status: Active
role: provider
service: {http://www.tc.com/ pedido}pedido
endpoint: pedidoSOAP
in: <? xml version="1.0" encoding="UTF-8"?><jbi:message
xmlns:jbi="http://java.sun.com/ xml/ns/jbi/wsdl -11-wrapper"
xmlns:msg="http://www. tc.com/pedido" name=" enviarPedidoRequest"
type="msg:enviarPedidoRequest" version="
1.0"><jbi:part><ns2:enviarPedido xmlns:ns2="http://www.
tc.com/pedido"><in>AAAAAAAAAAHHHHH![0]</in></ns2:
enviarPedido></jbi:part></jbi:message>
]
java. lang.NullPointerException
at java.util.concurrent.
ConcurrentHashMap.hash(ConcurrentHashMap.java:157)
at java.util.concurrent.
ConcurrentHashMap.get(ConcurrentHashMap.java:730)
at org. apache.cxf.service.model.BindingInfo.
getOperation(BindingInfo.java:112)
at org.apache. servicemix.cxfbc.CxfBcProvider.process(
CxfBcProvider.java:123)
at org.apache.servicemix.common.
AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:538)
at org. apache.servicemix.common.
AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:490)
at org. apache.servicemix.common.
BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
at org. apache.servicemix.jbi.messaging.
DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
at org. apache.servicemix.jbi .nmr.flow.AbstractFlow.
doRouting(AbstractFlow.java:170)
at org.apache. servicemix.jbi.nmr.flow.
seda.SedaFlow.doRouting( SedaFlow.java:167)
at org.apache.servicemix. jbi.nmr.flow.seda.
SedaQueue$1.run(SedaQueue.java:134)
at java.util.concurrent.
ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at java. util.concurrent.ThreadPoolExecutor$Worker.run(
ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)
ERROR - JmsComponent - Error processing exchange InOnly[
id: ID:10.0.0.71-11763adf8e5-11:10
status: Error
role: consumer
service: {http://www.tc.com/pedido} pedido
endpoint: pedidoSOAP
in: <?xml version="1.0" encoding=" UTF-8"?><jbi:message
xmlns:jbi="http://java.sun.com/ xml/ns/jbi/wsdl -11-wrapper"
xmlns:msg="http://www. tc.com/pedido" name=" enviarPedidoRequest"
type="msg:enviarPedidoRequest" version="
1.0"><jbi:part><ns2:enviarPedido xmlns:ns2="http://www.
tc.com/pedido"><in>AAAAAAAAAAHHHHH![0]</in></ns2:
enviarPedido></jbi:part></jbi:message>
error: java. lang.NullPointerException
]
java.lang. UnsupportedOperationException: A destination must be specified.
at org.apache.
activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:448)
at org. apache.activemq.ActiveMQMessageProducer
.send(ActiveMQMessageProducer.java:356)
at org.apache.
servicemix.jms.multiplexing.MultiplexingConsumerProcessor.process(
MultiplexingConsumerProcessor.java:120)
at org.apache.servicemix.common. AsyncBaseLifeCycle.doProcess(
AsyncBaseLifeCycle.java:538)
at org.apache.servicemix.common.
AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:512)
at org. apache.servicemix.common.
BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
at org. apache.servicemix.jbi.messaging.
DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
at org. apache.servicemix.jbi .nmr.flow.AbstractFlow.
doRouting(AbstractFlow.java:170)
at org.apache. servicemix.jbi.nmr.flow.
seda.SedaFlow.doRouting( SedaFlow.java:167)
at org.apache.servicemix. jbi.nmr.flow.seda.
SedaQueue$1.run(SedaQueue.java:134)
at java.util.concurrent.
ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at java. util.concurrent.ThreadPoolExecutor$Worker.run(
ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)
ERROR - JmsComponent - Error setting exchange status to ERROR
javax.jbi .messaging.MessagingException: illegal call to send / sendSync
at org. apache.servicemix.jbi
.messaging.MessageExchangeImpl.handleSend(
MessageExchangeImpl.java:614)
at org.apache.servicemix.
jbi.messaging.DeliveryChannelImpl.doSend(
DeliveryChannelImpl.java:385)
at org.apache.servicemix.
jbi.messaging.DeliveryChannelImpl.send(DeliveryChannelImpl.java:431)
at org. apache.servicemix.common.
BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:58)
at org. apache.servicemix.jbi.messaging.
DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
at org. apache.servicemix.jbi .nmr.flow.AbstractFlow.
doRouting(AbstractFlow.java:170)
at org.apache. servicemix.jbi.nmr.flow.
seda.SedaFlow.doRouting( SedaFlow.java:167)
at org.apache.servicemix. jbi.nmr.flow.seda.
SedaQueue$1.run(SedaQueue.java:134)
at java.util.concurrent.
ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at java. util.concurrent.ThreadPoolExecutor$Worker.run(
ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)
-------------CONSOLE OUTPUT - END ---------------------------------
Endpoints configuration:
------------CXF-BC---BEGIN-------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
xmlns:pedido="http://www.tc.com/pedido">
<cxfbc:consumer
wsdl="classpath:pedido.wsdl"
endpoint="pedidoHTTPConsumer"
interfaceName="pedido:pedidoHTTPConsumerInterface"
targetService="pedido:PedidoFilaProvider"
/>
<cxfbc:provider
wsdl="classpath:pedido.wsdl"
endpoint="pedidoSOAP"
service="pedido:pedido"
interfaceName="pedido:pedidoInterface"
locationURI="http://localhost:9000/pedidoService"
/>
</beans>
------------CXF-BC---END-------------------------------------------------
------------JMS---BEGIN-------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns:jms="http://servicemix.apache.org/jms/1.0"
xmlns:pedido="http://www.tc.com/pedido">
<jms:endpoint
service="pedido:PedidoFilaProvider"
endpoint="PedidoFilaProvider"
role="provider"
destinationStyle="queue"
jmsProviderDestinationName="queue/pedidoFila"
connectionFactory="#connectionFactory"
interfaceName="pedido:PedidoFila"
/>
<jms:endpoint
service="pedido:PedidoFilaConsumer"
endpoint="PedidoFilaConsumer"
targetService="pedido:pedido"
role="consumer"
destinationStyle="queue"
jmsProviderDestinationName="queue/pedidoFila"
connectionFactory="#connectionFactory"
defaultMep="http://www.w3.org/2004/08/wsdl/in-only"
/>
<bean
id="connectionFactory"
class="org.apache.activemq.ActiveMQConnectionFactory">
<property
name="brokerURL"
value="tcp://localhost:61616"
/>
</bean>
</beans>
------------JMS---END-------------------------------------------------
------------WSDL-BEGIN--------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://www.tc.com/pedido"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="pedido"
targetNamespace="http://www.tc.com/pedido">
<wsdl:types>
<xsd:schema targetNamespace="http://www.tc.com/pedido">
<xsd:element name="enviarPedido">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="in" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</wsdl:types>
<wsdl:message name="enviarPedidoRequest">
<wsdl:part element="tns:enviarPedido" name="parameters" />
</wsdl:message>
<wsdl:portType name="pedido">
<wsdl:operation name="enviarPedido">
<wsdl:input message="tns:enviarPedidoRequest" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="pedidoSOAP" type="tns:pedido">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="enviarPedido">
<soap:operation
soapAction="http://www.tc.com/pedido/enviarPedido" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="pedido">
<wsdl:port binding="tns:pedidoSOAP" name="pedidoSOAP">
<soap:address location="http://0.0.0.0:9001/pedidoService" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
------------WSDL-END--------------------------------------------
Any ideas?
Thank you,
Wilson
Re: CXF-BC + JMS problem
Posted by Wilson <wi...@gmail.com>.
Hi Freeman,
I did the change you suggested. Now it is working!
Thank you!
Wilson.
Freeman Fang-2 wrote:
>
> Hi Wilson,
>
> Seems that the operation info of the MessageExchange is missing.
> Would you please add
> defaultOperation="pedido :enviarPedido "
> for your jms consumer endpoint and try again?
>
> Best Regards
>
> Freeman
>
> Wilson Freitas wrote:
>> Hi,
>>
>> I am using servicemix 3.2.1.
>>
>> I am trying to do this:
>>
>> External client-----[SOAP]---->CXF-BC Consumer---->JMS Provider---->(
>> jms queue)------>JMS Consumer------> CXF-BC
>> Provider----[SOAP]---->External service
>>
>> All MEPs are InOnly. If CXF-BC sends messages directly to CXF-BC
>> provider (no JMS) it works fine. When I add the JMS endpoints the
>> message is not delivered and I have the following console output
>> during message exchange:
>>
>> -------------CONSOLE OUTPUT - BEGIN ---------------------------------
>> ERROR - CxfBcComponent - Error processing exchange
>> InOnly[
>> id: ID:10.0.0.71-11763adf8e5-11:10
>> status: Active
>> role: provider
>> service: {http://www.tc.com/ pedido}pedido
>> endpoint: pedidoSOAP
>> in: <? xml version="1.0" encoding="UTF-8"?><jbi:message
>> xmlns:jbi="http://java.sun.com/ xml/ns/jbi/wsdl -11-wrapper"
>> xmlns:msg="http://www. tc.com/pedido" name=" enviarPedidoRequest"
>> type="msg:enviarPedidoRequest" version="
>> 1.0"><jbi:part><ns2:enviarPedido xmlns:ns2="http://www.
>> tc.com/pedido"><in>AAAAAAAAAAHHHHH![0]</in></ns2:
>> enviarPedido></jbi:part></jbi:message>
>> ]
>> java. lang.NullPointerException
>> at java.util.concurrent.
>> ConcurrentHashMap.hash(ConcurrentHashMap.java:157)
>> at java.util.concurrent.
>> ConcurrentHashMap.get(ConcurrentHashMap.java:730)
>> at org. apache.cxf.service.model.BindingInfo.
>> getOperation(BindingInfo.java:112)
>> at org.apache. servicemix.cxfbc.CxfBcProvider.process(
>> CxfBcProvider.java:123)
>> at org.apache.servicemix.common.
>> AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:538)
>> at org. apache.servicemix.common.
>> AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:490)
>> at org. apache.servicemix.common.
>> BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
>> at org. apache.servicemix.jbi.messaging.
>> DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
>> at org. apache.servicemix.jbi .nmr.flow.AbstractFlow.
>> doRouting(AbstractFlow.java:170)
>> at org.apache. servicemix.jbi.nmr.flow.
>> seda.SedaFlow.doRouting( SedaFlow.java:167)
>> at org.apache.servicemix. jbi.nmr.flow.seda.
>> SedaQueue$1.run(SedaQueue.java:134)
>> at java.util.concurrent.
>> ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
>> at java. util.concurrent.ThreadPoolExecutor$Worker.run(
>> ThreadPoolExecutor.java:675)
>> at java.lang.Thread.run(Thread.java:595)
>> ERROR - JmsComponent - Error processing exchange
>> InOnly[
>> id: ID:10.0.0.71-11763adf8e5-11:10
>> status: Error
>> role: consumer
>> service: {http://www.tc.com/pedido} pedido
>> endpoint: pedidoSOAP
>> in: <?xml version="1.0" encoding=" UTF-8"?><jbi:message
>> xmlns:jbi="http://java.sun.com/ xml/ns/jbi/wsdl -11-wrapper"
>> xmlns:msg="http://www. tc.com/pedido" name=" enviarPedidoRequest"
>> type="msg:enviarPedidoRequest" version="
>> 1.0"><jbi:part><ns2:enviarPedido xmlns:ns2="http://www.
>> tc.com/pedido"><in>AAAAAAAAAAHHHHH![0]</in></ns2:
>> enviarPedido></jbi:part></jbi:message>
>> error: java. lang.NullPointerException
>> ]
>> java.lang. UnsupportedOperationException: A destination must be
>> specified.
>> at org.apache.
>> activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:448)
>> at org. apache.activemq.ActiveMQMessageProducer
>> .send(ActiveMQMessageProducer.java:356)
>> at org.apache.
>> servicemix.jms.multiplexing.MultiplexingConsumerProcessor.process(
>> MultiplexingConsumerProcessor.java:120)
>> at org.apache.servicemix.common. AsyncBaseLifeCycle.doProcess(
>> AsyncBaseLifeCycle.java:538)
>> at org.apache.servicemix.common.
>> AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:512)
>> at org. apache.servicemix.common.
>> BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
>> at org. apache.servicemix.jbi.messaging.
>> DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
>> at org. apache.servicemix.jbi .nmr.flow.AbstractFlow.
>> doRouting(AbstractFlow.java:170)
>> at org.apache. servicemix.jbi.nmr.flow.
>> seda.SedaFlow.doRouting( SedaFlow.java:167)
>> at org.apache.servicemix. jbi.nmr.flow.seda.
>> SedaQueue$1.run(SedaQueue.java:134)
>> at java.util.concurrent.
>> ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
>> at java. util.concurrent.ThreadPoolExecutor$Worker.run(
>> ThreadPoolExecutor.java:675)
>> at java.lang.Thread.run(Thread.java:595)
>> ERROR - JmsComponent - Error setting exchange status to
>> ERROR
>> javax.jbi .messaging.MessagingException: illegal call to send / sendSync
>> at org. apache.servicemix.jbi
>> .messaging.MessageExchangeImpl.handleSend(
>> MessageExchangeImpl.java:614)
>> at org.apache.servicemix.
>> jbi.messaging.DeliveryChannelImpl.doSend(
>> DeliveryChannelImpl.java:385)
>> at org.apache.servicemix.
>> jbi.messaging.DeliveryChannelImpl.send(DeliveryChannelImpl.java:431)
>> at org. apache.servicemix.common.
>> BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:58)
>> at org. apache.servicemix.jbi.messaging.
>> DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
>> at org. apache.servicemix.jbi .nmr.flow.AbstractFlow.
>> doRouting(AbstractFlow.java:170)
>> at org.apache. servicemix.jbi.nmr.flow.
>> seda.SedaFlow.doRouting( SedaFlow.java:167)
>> at org.apache.servicemix. jbi.nmr.flow.seda.
>> SedaQueue$1.run(SedaQueue.java:134)
>> at java.util.concurrent.
>> ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
>> at java. util.concurrent.ThreadPoolExecutor$Worker.run(
>> ThreadPoolExecutor.java:675)
>> at java.lang.Thread.run(Thread.java:595)
>> -------------CONSOLE OUTPUT - END ---------------------------------
>>
>> Endpoints configuration:
>>
>> ------------CXF-BC---BEGIN-------------------------------------------------
>> <?xml version="1.0" encoding="UTF-8"?>
>> <beans
>> xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
>> xmlns:pedido="http://www.tc.com/pedido">
>>
>> <cxfbc:consumer
>> wsdl="classpath:pedido.wsdl"
>> endpoint="pedidoHTTPConsumer"
>> interfaceName="pedido:pedidoHTTPConsumerInterface"
>> targetService="pedido:PedidoFilaProvider"
>> />
>>
>> <cxfbc:provider
>> wsdl="classpath:pedido.wsdl"
>> endpoint="pedidoSOAP"
>> service="pedido:pedido"
>> interfaceName="pedido:pedidoInterface"
>> locationURI="http://localhost:9000/pedidoService"
>> />
>>
>> </beans>
>> ------------CXF-BC---END-------------------------------------------------
>>
>> ------------JMS---BEGIN-------------------------------------------------
>> <?xml version="1.0" encoding="UTF-8"?>
>> <beans
>> xmlns:jms="http://servicemix.apache.org/jms/1.0"
>> xmlns:pedido="http://www.tc.com/pedido">
>>
>> <jms:endpoint
>> service="pedido:PedidoFilaProvider"
>> endpoint="PedidoFilaProvider"
>> role="provider"
>> destinationStyle="queue"
>> jmsProviderDestinationName="queue/pedidoFila"
>> connectionFactory="#connectionFactory"
>> interfaceName="pedido:PedidoFila"
>> />
>>
>> <jms:endpoint
>> service="pedido:PedidoFilaConsumer"
>> endpoint="PedidoFilaConsumer"
>> targetService="pedido:pedido"
>> role="consumer"
>> destinationStyle="queue"
>> jmsProviderDestinationName="queue/pedidoFila"
>> connectionFactory="#connectionFactory"
>> defaultMep="http://www.w3.org/2004/08/wsdl/in-only"
>> />
>>
>> <bean
>> id="connectionFactory"
>> class="org.apache.activemq.ActiveMQConnectionFactory">
>>
>> <property
>> name="brokerURL"
>> value="tcp://localhost:61616"
>> />
>> </bean>
>>
>> </beans>
>> ------------JMS---END-------------------------------------------------
>>
>> ------------WSDL-BEGIN--------------------------------------------
>> <?xml version="1.0" encoding="UTF-8"?>
>> <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>> xmlns:tns="http://www.tc.com/pedido"
>> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>> xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="pedido"
>> targetNamespace="http://www.tc.com/pedido">
>> <wsdl:types>
>> <xsd:schema targetNamespace="http://www.tc.com/pedido">
>> <xsd:element name="enviarPedido">
>> <xsd:complexType>
>> <xsd:sequence>
>> <xsd:element name="in" type="xsd:string" />
>> </xsd:sequence>
>> </xsd:complexType>
>> </xsd:element>
>> </xsd:schema>
>> </wsdl:types>
>> <wsdl:message name="enviarPedidoRequest">
>> <wsdl:part element="tns:enviarPedido" name="parameters" />
>> </wsdl:message>
>> <wsdl:portType name="pedido">
>> <wsdl:operation name="enviarPedido">
>> <wsdl:input message="tns:enviarPedidoRequest" />
>>
>> </wsdl:operation>
>> </wsdl:portType>
>> <wsdl:binding name="pedidoSOAP" type="tns:pedido">
>> <soap:binding style="document"
>> transport="http://schemas.xmlsoap.org/soap/http" />
>> <wsdl:operation name="enviarPedido">
>> <soap:operation
>> soapAction="http://www.tc.com/pedido/enviarPedido" />
>> <wsdl:input>
>> <soap:body use="literal" />
>> </wsdl:input>
>> </wsdl:operation>
>> </wsdl:binding>
>> <wsdl:service name="pedido">
>> <wsdl:port binding="tns:pedidoSOAP" name="pedidoSOAP">
>> <soap:address location="http://0.0.0.0:9001/pedidoService" />
>> </wsdl:port>
>> </wsdl:service>
>> </wsdl:definitions>
>> ------------WSDL-END--------------------------------------------
>>
>> Any ideas?
>>
>> Thank you,
>>
>> Wilson
>>
>>
>
>
--
View this message in context: http://www.nabble.com/CXF-BC-%2B-JMS-problem-tp14737681s12049p14761734.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: JMS with MQ on ServiceMix
Posted by ma...@uk.bnpparibas.com.
Bruce,
yes u understood correctly..... and yes i should have had a look at
FAQ
one more question since i am here:
if i need to listen to 14 different MQ destinations, i assume i'll have to
deploy 14 service units... right?
thanks and regards
marco
Internet
bruce.snyder@gmail.com
11/01/2008 16:24
Please respond to
users@servicemix.apache.org
To
users
cc
Subject
Re: JMS with MQ on ServiceMix
On Jan 11, 2008 7:45 AM, <ma...@uk.bnpparibas.com> wrote:
> hello all,
> i have following testcase
> i have to listen to 12 different MQs....
> according to docs i have read ... i'll have to deploy 12 service units
> containing an xbean.xml for activating consumers.
> Now, i have to listen to MQ defined on a MQ server, so i won't have a
JNDI
> name
>
> all i got is hosname, channel, port,
>
> can i still use jms component or do i have to deploy my own?
I think I understand what you're asking but I'm not completely sure.
So it sounds like you need to listen to destinations on another
message broker, correct? Well via the ActiveMQ JMS-to-JMS bridge, you
can do this via the servicemix-jms component. Here is a FAQ entry
about doing just that:
http://servicemix.apache.org/how-do-i-integrate-the-servicemix-jms-component-with-webspheremq.html
The example in the FAQ entry is about WebsphereMQ but you can do this
with any message broker for which you have a JMS connection factory.
Bruce
--
perl -e 'print
unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'
Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/
Apache Geronimo - http://geronimo.apache.org/
Blog: http://bruceblog.org/
This communication is confidential, may be privileged and is meant only for the intended recipient. If you are
not the intended recipient, please notify the sender by reply and delete this message from your system. Any
unauthorised dissemination, distribution or copying hereof is prohibited.
BNP Paribas Fund Services UK Limited, BNP Paribas Trust Corporation UK Limited, BNP Paribas UK Limited,
BNP Paribas Commodity Futures Ltd and Investment Fund Services Limited are authorised and regulated by
the Financial Services Authority.
BNP Paribas, BNP Paribas Securities Services and BNP Paribas Private Bank are authorised by the CECEI
and AMF. BNP Paribas London Branch, BNP Paribas Securities Services London Branch and BNP Paribas
Private Bank London Branch are regulated by the Financial Services Authority for the conduct of their UK
business. BNP Paribas Securities Services London Branch is also a member of the London Stock Exchange.
Re: JMS with MQ on ServiceMix
Posted by Bruce Snyder <br...@gmail.com>.
On Jan 11, 2008 7:45 AM, <ma...@uk.bnpparibas.com> wrote:
> hello all,
> i have following testcase
> i have to listen to 12 different MQs....
> according to docs i have read ... i'll have to deploy 12 service units
> containing an xbean.xml for activating consumers.
> Now, i have to listen to MQ defined on a MQ server, so i won't have a JNDI
> name
>
> all i got is hosname, channel, port,
>
> can i still use jms component or do i have to deploy my own?
I think I understand what you're asking but I'm not completely sure.
So it sounds like you need to listen to destinations on another
message broker, correct? Well via the ActiveMQ JMS-to-JMS bridge, you
can do this via the servicemix-jms component. Here is a FAQ entry
about doing just that:
http://servicemix.apache.org/how-do-i-integrate-the-servicemix-jms-component-with-webspheremq.html
The example in the FAQ entry is about WebsphereMQ but you can do this
with any message broker for which you have a JMS connection factory.
Bruce
--
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'
Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/
Apache Geronimo - http://geronimo.apache.org/
Blog: http://bruceblog.org/
Re: JMS with MQ on ServiceMix
Posted by ma...@uk.bnpparibas.com.
Hello,
dont be disappointed :) i have downloaded ServiceMix yesterday
the plan (without considering proactive fault tolerance, as an example of
using email component to notify users of failures etc) is to
1) write a component that uses JDBCTemplate to insert data into a database
2) deploy 14 SUs to listen to 14 different MQs
3) write a (sorry, i still have to learn terminology) 'component' tha
will be invoked by all 'MQ listeners' that process the incoming message,
extract the SQLs and
invoke 1)
that shoul be it
Keep in mind that i m new to ServiceMix. i'll have to try to deploy
something, then once the ball is rolling, it'll be over before i finish to
smoke a cigar :))
As i m here: how do people generally test ServiceMix components that are
going to be deployed?
i'll need
- JUnit test for the component (Easy to write)
- mayb Mock tests for intercomponent communication
- integration test. Meaning, if the flow is of 3 servicemix components
talking to each other, how will i test it? i really want to test before i
deploy..
thanks in advance and regards
marco
Internet
ilangocal@yahoo.com
11/01/2008 15:10
To
users
cc
Marco MISTRONI
Subject
Re: JMS with MQ on ServiceMix
Hi
I could work with you on that. I have been trying to build on a similar
test case.
What is your configuration and setup so far?
regards
ilango
marco.mistroni@uk.bnpparibas.com wrote:
hello all,
i have following testcase
i have to listen to 12 different MQs....
according to docs i have read ... i'll have to deploy 12 service units
containing an xbean.xml for activating consumers.
Now, i have to listen to MQ defined on a MQ server, so i won't have a JNDI
name
all i got is hosname, channel, port,
can i still use jms component or do i have to deploy my own?
thanks in advance and regards
marco
This communication is confidential, may be privileged and is meant only
for the intended recipient. If you are
not the intended recipient, please notify the sender by reply and delete
this message from your system. Any
unauthorised dissemination, distribution or copying hereof is prohibited.
BNP Paribas Fund Services UK Limited, BNP Paribas Trust Corporation UK
Limited, BNP Paribas UK Limited,
BNP Paribas Commodity Futures Ltd and Investment Fund Services Limited are
authorised and regulated by
the Financial Services Authority.
BNP Paribas, BNP Paribas Securities Services and BNP Paribas Private Bank
are authorised by the CECEI
and AMF. BNP Paribas London Branch, BNP Paribas Securities Services London
Branch and BNP Paribas
Private Bank London Branch are regulated by the Financial Services
Authority for the conduct of their UK
business. BNP Paribas Securities Services London Branch is also a member
of the London Stock Exchange.
Never miss a thing. Make Yahoo your homepage.
This communication is confidential, may be privileged and is meant only for the intended recipient. If you are
not the intended recipient, please notify the sender by reply and delete this message from your system. Any
unauthorised dissemination, distribution or copying hereof is prohibited.
BNP Paribas Fund Services UK Limited, BNP Paribas Trust Corporation UK Limited, BNP Paribas UK Limited,
BNP Paribas Commodity Futures Ltd and Investment Fund Services Limited are authorised and regulated by
the Financial Services Authority.
BNP Paribas, BNP Paribas Securities Services and BNP Paribas Private Bank are authorised by the CECEI
and AMF. BNP Paribas London Branch, BNP Paribas Securities Services London Branch and BNP Paribas
Private Bank London Branch are regulated by the Financial Services Authority for the conduct of their UK
business. BNP Paribas Securities Services London Branch is also a member of the London Stock Exchange.
Re: JMS with MQ on ServiceMix
Posted by ilango <il...@yahoo.com>.
Hi
I could work with you on that. I have been trying to build on a similar test case.
What is your configuration and setup so far?
regards
ilango
marco.mistroni@uk.bnpparibas.com wrote:
hello all,
i have following testcase
i have to listen to 12 different MQs....
according to docs i have read ... i'll have to deploy 12 service units
containing an xbean.xml for activating consumers.
Now, i have to listen to MQ defined on a MQ server, so i won't have a JNDI
name
all i got is hosname, channel, port,
can i still use jms component or do i have to deploy my own?
thanks in advance and regards
marco
This communication is confidential, may be privileged and is meant only for the intended recipient. If you are
not the intended recipient, please notify the sender by reply and delete this message from your system. Any
unauthorised dissemination, distribution or copying hereof is prohibited.
BNP Paribas Fund Services UK Limited, BNP Paribas Trust Corporation UK Limited, BNP Paribas UK Limited,
BNP Paribas Commodity Futures Ltd and Investment Fund Services Limited are authorised and regulated by
the Financial Services Authority.
BNP Paribas, BNP Paribas Securities Services and BNP Paribas Private Bank are authorised by the CECEI
and AMF. BNP Paribas London Branch, BNP Paribas Securities Services London Branch and BNP Paribas
Private Bank London Branch are regulated by the Financial Services Authority for the conduct of their UK
business. BNP Paribas Securities Services London Branch is also a member of the London Stock Exchange.
---------------------------------
Never miss a thing. Make Yahoo your homepage.
JMS with MQ on ServiceMix
Posted by ma...@uk.bnpparibas.com.
hello all,
i have following testcase
i have to listen to 12 different MQs....
according to docs i have read ... i'll have to deploy 12 service units
containing an xbean.xml for activating consumers.
Now, i have to listen to MQ defined on a MQ server, so i won't have a JNDI
name
all i got is hosname, channel, port,
can i still use jms component or do i have to deploy my own?
thanks in advance and regards
marco
This communication is confidential, may be privileged and is meant only for the intended recipient. If you are
not the intended recipient, please notify the sender by reply and delete this message from your system. Any
unauthorised dissemination, distribution or copying hereof is prohibited.
BNP Paribas Fund Services UK Limited, BNP Paribas Trust Corporation UK Limited, BNP Paribas UK Limited,
BNP Paribas Commodity Futures Ltd and Investment Fund Services Limited are authorised and regulated by
the Financial Services Authority.
BNP Paribas, BNP Paribas Securities Services and BNP Paribas Private Bank are authorised by the CECEI
and AMF. BNP Paribas London Branch, BNP Paribas Securities Services London Branch and BNP Paribas
Private Bank London Branch are regulated by the Financial Services Authority for the conduct of their UK
business. BNP Paribas Securities Services London Branch is also a member of the London Stock Exchange.
Re: CXF-BC + JMS problem
Posted by Freeman Fang <fr...@iona.com>.
Hi Wilson,
Seems that the operation info of the MessageExchange is missing.
Would you please add
defaultOperation="pedido :enviarPedido "
for your jms consumer endpoint and try again?
Best Regards
Freeman
Wilson Freitas wrote:
> Hi,
>
> I am using servicemix 3.2.1.
>
> I am trying to do this:
>
> External client-----[SOAP]---->CXF-BC Consumer---->JMS Provider---->(
> jms queue)------>JMS Consumer------> CXF-BC
> Provider----[SOAP]---->External service
>
> All MEPs are InOnly. If CXF-BC sends messages directly to CXF-BC
> provider (no JMS) it works fine. When I add the JMS endpoints the
> message is not delivered and I have the following console output
> during message exchange:
>
> -------------CONSOLE OUTPUT - BEGIN ---------------------------------
> ERROR - CxfBcComponent - Error processing exchange InOnly[
> id: ID:10.0.0.71-11763adf8e5-11:10
> status: Active
> role: provider
> service: {http://www.tc.com/ pedido}pedido
> endpoint: pedidoSOAP
> in: <? xml version="1.0" encoding="UTF-8"?><jbi:message
> xmlns:jbi="http://java.sun.com/ xml/ns/jbi/wsdl -11-wrapper"
> xmlns:msg="http://www. tc.com/pedido" name=" enviarPedidoRequest"
> type="msg:enviarPedidoRequest" version="
> 1.0"><jbi:part><ns2:enviarPedido xmlns:ns2="http://www.
> tc.com/pedido"><in>AAAAAAAAAAHHHHH![0]</in></ns2:
> enviarPedido></jbi:part></jbi:message>
> ]
> java. lang.NullPointerException
> at java.util.concurrent.
> ConcurrentHashMap.hash(ConcurrentHashMap.java:157)
> at java.util.concurrent.
> ConcurrentHashMap.get(ConcurrentHashMap.java:730)
> at org. apache.cxf.service.model.BindingInfo.
> getOperation(BindingInfo.java:112)
> at org.apache. servicemix.cxfbc.CxfBcProvider.process(
> CxfBcProvider.java:123)
> at org.apache.servicemix.common.
> AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:538)
> at org. apache.servicemix.common.
> AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:490)
> at org. apache.servicemix.common.
> BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
> at org. apache.servicemix.jbi.messaging.
> DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
> at org. apache.servicemix.jbi .nmr.flow.AbstractFlow.
> doRouting(AbstractFlow.java:170)
> at org.apache. servicemix.jbi.nmr.flow.
> seda.SedaFlow.doRouting( SedaFlow.java:167)
> at org.apache.servicemix. jbi.nmr.flow.seda.
> SedaQueue$1.run(SedaQueue.java:134)
> at java.util.concurrent.
> ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
> at java. util.concurrent.ThreadPoolExecutor$Worker.run(
> ThreadPoolExecutor.java:675)
> at java.lang.Thread.run(Thread.java:595)
> ERROR - JmsComponent - Error processing exchange InOnly[
> id: ID:10.0.0.71-11763adf8e5-11:10
> status: Error
> role: consumer
> service: {http://www.tc.com/pedido} pedido
> endpoint: pedidoSOAP
> in: <?xml version="1.0" encoding=" UTF-8"?><jbi:message
> xmlns:jbi="http://java.sun.com/ xml/ns/jbi/wsdl -11-wrapper"
> xmlns:msg="http://www. tc.com/pedido" name=" enviarPedidoRequest"
> type="msg:enviarPedidoRequest" version="
> 1.0"><jbi:part><ns2:enviarPedido xmlns:ns2="http://www.
> tc.com/pedido"><in>AAAAAAAAAAHHHHH![0]</in></ns2:
> enviarPedido></jbi:part></jbi:message>
> error: java. lang.NullPointerException
> ]
> java.lang. UnsupportedOperationException: A destination must be specified.
> at org.apache.
> activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:448)
> at org. apache.activemq.ActiveMQMessageProducer
> .send(ActiveMQMessageProducer.java:356)
> at org.apache.
> servicemix.jms.multiplexing.MultiplexingConsumerProcessor.process(
> MultiplexingConsumerProcessor.java:120)
> at org.apache.servicemix.common. AsyncBaseLifeCycle.doProcess(
> AsyncBaseLifeCycle.java:538)
> at org.apache.servicemix.common.
> AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:512)
> at org. apache.servicemix.common.
> BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
> at org. apache.servicemix.jbi.messaging.
> DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
> at org. apache.servicemix.jbi .nmr.flow.AbstractFlow.
> doRouting(AbstractFlow.java:170)
> at org.apache. servicemix.jbi.nmr.flow.
> seda.SedaFlow.doRouting( SedaFlow.java:167)
> at org.apache.servicemix. jbi.nmr.flow.seda.
> SedaQueue$1.run(SedaQueue.java:134)
> at java.util.concurrent.
> ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
> at java. util.concurrent.ThreadPoolExecutor$Worker.run(
> ThreadPoolExecutor.java:675)
> at java.lang.Thread.run(Thread.java:595)
> ERROR - JmsComponent - Error setting exchange status to ERROR
> javax.jbi .messaging.MessagingException: illegal call to send / sendSync
> at org. apache.servicemix.jbi
> .messaging.MessageExchangeImpl.handleSend(
> MessageExchangeImpl.java:614)
> at org.apache.servicemix.
> jbi.messaging.DeliveryChannelImpl.doSend(
> DeliveryChannelImpl.java:385)
> at org.apache.servicemix.
> jbi.messaging.DeliveryChannelImpl.send(DeliveryChannelImpl.java:431)
> at org. apache.servicemix.common.
> BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:58)
> at org. apache.servicemix.jbi.messaging.
> DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
> at org. apache.servicemix.jbi .nmr.flow.AbstractFlow.
> doRouting(AbstractFlow.java:170)
> at org.apache. servicemix.jbi.nmr.flow.
> seda.SedaFlow.doRouting( SedaFlow.java:167)
> at org.apache.servicemix. jbi.nmr.flow.seda.
> SedaQueue$1.run(SedaQueue.java:134)
> at java.util.concurrent.
> ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
> at java. util.concurrent.ThreadPoolExecutor$Worker.run(
> ThreadPoolExecutor.java:675)
> at java.lang.Thread.run(Thread.java:595)
> -------------CONSOLE OUTPUT - END ---------------------------------
>
> Endpoints configuration:
>
> ------------CXF-BC---BEGIN-------------------------------------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <beans
> xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
> xmlns:pedido="http://www.tc.com/pedido">
>
> <cxfbc:consumer
> wsdl="classpath:pedido.wsdl"
> endpoint="pedidoHTTPConsumer"
> interfaceName="pedido:pedidoHTTPConsumerInterface"
> targetService="pedido:PedidoFilaProvider"
> />
>
> <cxfbc:provider
> wsdl="classpath:pedido.wsdl"
> endpoint="pedidoSOAP"
> service="pedido:pedido"
> interfaceName="pedido:pedidoInterface"
> locationURI="http://localhost:9000/pedidoService"
> />
>
> </beans>
> ------------CXF-BC---END-------------------------------------------------
>
> ------------JMS---BEGIN-------------------------------------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <beans
> xmlns:jms="http://servicemix.apache.org/jms/1.0"
> xmlns:pedido="http://www.tc.com/pedido">
>
> <jms:endpoint
> service="pedido:PedidoFilaProvider"
> endpoint="PedidoFilaProvider"
> role="provider"
> destinationStyle="queue"
> jmsProviderDestinationName="queue/pedidoFila"
> connectionFactory="#connectionFactory"
> interfaceName="pedido:PedidoFila"
> />
>
> <jms:endpoint
> service="pedido:PedidoFilaConsumer"
> endpoint="PedidoFilaConsumer"
> targetService="pedido:pedido"
> role="consumer"
> destinationStyle="queue"
> jmsProviderDestinationName="queue/pedidoFila"
> connectionFactory="#connectionFactory"
> defaultMep="http://www.w3.org/2004/08/wsdl/in-only"
> />
>
> <bean
> id="connectionFactory"
> class="org.apache.activemq.ActiveMQConnectionFactory">
>
> <property
> name="brokerURL"
> value="tcp://localhost:61616"
> />
> </bean>
>
> </beans>
> ------------JMS---END-------------------------------------------------
>
> ------------WSDL-BEGIN--------------------------------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:tns="http://www.tc.com/pedido"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="pedido"
> targetNamespace="http://www.tc.com/pedido">
> <wsdl:types>
> <xsd:schema targetNamespace="http://www.tc.com/pedido">
> <xsd:element name="enviarPedido">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element name="in" type="xsd:string" />
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> </xsd:schema>
> </wsdl:types>
> <wsdl:message name="enviarPedidoRequest">
> <wsdl:part element="tns:enviarPedido" name="parameters" />
> </wsdl:message>
> <wsdl:portType name="pedido">
> <wsdl:operation name="enviarPedido">
> <wsdl:input message="tns:enviarPedidoRequest" />
>
> </wsdl:operation>
> </wsdl:portType>
> <wsdl:binding name="pedidoSOAP" type="tns:pedido">
> <soap:binding style="document"
> transport="http://schemas.xmlsoap.org/soap/http" />
> <wsdl:operation name="enviarPedido">
> <soap:operation
> soapAction="http://www.tc.com/pedido/enviarPedido" />
> <wsdl:input>
> <soap:body use="literal" />
> </wsdl:input>
> </wsdl:operation>
> </wsdl:binding>
> <wsdl:service name="pedido">
> <wsdl:port binding="tns:pedidoSOAP" name="pedidoSOAP">
> <soap:address location="http://0.0.0.0:9001/pedidoService" />
> </wsdl:port>
> </wsdl:service>
> </wsdl:definitions>
> ------------WSDL-END--------------------------------------------
>
> Any ideas?
>
> Thank you,
>
> Wilson
>
>