Hi,
You cant send a jms message to an http endpoint directly.
What you would do is to send a jms message to a jms destination (topic
or queue), consume that from a jms consumer, which will send a
normalized message to the service it is proxying for. which in this case
you would want to be an http provider. The http provider will then
create an http request (soap or otherwise) containing the normalized
message and send it over to the location uri, which is being listened to
by the http consumer.
"I design the flow route like this
jms consumer --httpprovider---httpconsumer
it can't work.do you have some experiences for this ,I really need help ."
What do you mean it can't work?
ykj wrote:
the first try:
I design the flow route like this
jms provider -----jms consumer --httpprovider---httpconsumer
until now with jms provider ---- jms consumer process and httpprovider
---- httpconsumer process they works,
but jms provider -----jms consumer
--httpprovider---httpconsumer process does'nt works.
there are xbean.xml and jbi.xml for four su.can you help me?
1.jms-in
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:jms="http://servicemix.apache.org/jms/1.0"
xmlns:b="http://servicemix.apache.org/samples/MTA">
<jms:endpoint service="b:jms_in"
endpoint="jms_in"
targetEndpoint="jms_out"
role="consumer"
destinationStyle="queue"
targetService="b:jms_out"
jmsProviderDestinationName="MTA_Request_in"
connectionFactory="#connectionFactory"
defaultMep="http://www.w3.org/2004/08/wsdl/in-out"/>
<bean id="connectionFactory"
class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL" value="tcp://localhost:61616" />
</bean>
</beans>
2.jms-out
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:jms="http://servicemix.apache.org/jms/1.0"
xmlns:b="http://servicemix.apache.org/samples/MTA">
<jms:endpoint service="b:jms_out"
endpoint="jms_out"
role="provider"
targetEndpoint="Request_in"
destinationStyle="queue"
jmsProviderDestinationName="MTA_Request_out"
connectionFactory="#connectionFactory"
defaultMep="http://www.w3.org/2004/08/wsdl/in-out"/>
<bean id="connectionFactory"
class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL" value="tcp://localhost:61616" />
</bean>
</beans>
3.httpprovider
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:http="http://servicemix.apache.org/http/1.0"
xmlns:b="http://servicemix.apache.org/samples/MTA">
<http:endpoint service="b:Request_in"
endpoint="Request_in"
targetService="b:Request_out"
role="consumer"
locationURI="http://0.0.0.0:8191/bridge/"
defaultMep="http://www.w3.org/2004/08/wsdl/in-only" />
</beans>
4.httpconsumer
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:http="http://servicemix.apache.org/http/1.0"
xmlns:b="http://servicemix.apache.org/samples/MTA">
<http:endpoint service="b:Request_out"
endpoint="Request_out"
role="provider"
locationURI="http://0.0.0.0:8192/PersonService/"/>
</beans>
when I send the message to queue MTA_Request_in,I can't receive any
message in http://0.0.0.0:8192/PersonService/. I run the wsdl-first ,so
http://0.0.0.0:8192/PersonService/ this service works.
the second try:
I design the flow route like this
jms consumer --httpprovider---httpconsumer
it can't work.do you have some experiences for this ,I really need help .
thanks in advance