2009/1/7 Asankha C. Perera <[email protected]>

> Hi Antonio
>
>> I have looked at JMS examples provided with Synapse, but cannot force to
>> work my own model, because message appear to disappear somewhere.
>> What I need to see working example of such scenario:
>> - HTTP proxy which send JMS message over Synapse (e.g. request queue)
>> - next this message is consumed by some simple service (i try with simple
>> bean which should uppercase text and send back as echo)
>> - this simple service responds with new message which is thrown into
>> another
>> queue (e.g. response queue)
>> - HTTP proxy should consume from response queue and send back response via
>> HTTP (*)
>>
>>
> Since this is a synchronous request/response, you need to indicate over
> which response queue to wait for the message - if this is not found, a
> temporary queue is created with a configurable timeout.
>
> You can use the property mediator as follows, and set "JMS_REPLY_TO"
> property to the Queue JNDI name before you invoke the <send> mediator.
>
> <property name="JMS_REPLY_TO" value="REPLY_Q_JNDI_NAME" scope="axis2"/>


Hello
I tried to follow but without any success, probably I have got some
conceptual mistake in my configuration - if you could look at it:
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://ws.apache.org/ns/synapse"; xmlns:soap="
http://www.w3.org/2003/05/soap-envelope";>

    <log level="full"/>

    <endpoint name="requestQueue">
           <address
uri="jms:/RequestQueue?transport.jms.DestinationType=queue&amp;java.naming.provider.url=tcp://localhost:61616&amp;java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&amp;transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&amp;transport.jms.ContentTypeProperty=Content-Type"/>
       </endpoint>

       <endpoint name="HTTPProxy">
           <address
uri="jms:/HTTPProxy?transport.jms.DestinationType=queue&amp;java.naming.provider.url=tcp://localhost:61616&amp;java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&amp;transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&amp;transport.jms.ContentTypeProperty=Content-Type"/>
       </endpoint>

    <proxy name="RequestQueue" transports="jms">
        <target>
            <endpoint key="requestQueue" />
            <inSequence>
                <log level="custom">
                    <property name="text" value="***************
RequestQueue inSequence ****************" />
                   </log>
                   <property action="set" name="RESPONSE" value="true"
scope="axis2" />
                <property action="set" name="JMS_REPLY_TO" value="HTTPProxy"
scope="axis2"/>
                <header name="To" action="remove" />
                <send>
                    <endpoint key="HTTPProxy" />
                </send>
            </inSequence>
            <outSequence>
                <log level="custom">
                    <property name="text" value="***************
RequestQueue outSequence ****************" />
                   </log>
                <drop />
            </outSequence>
        </target>
    </proxy>

    <proxy name="HTTPProxy" transports="all">
        <target>
            <endpoint key="HTTPProxy" />

            <inSequence>
                <log level="custom">
                        <property name="text" value="***************
HTTPProxy inSequence ****************" />
                   </log>
                <send>
                        <endpoint key="requestQueue" />
                </send>
            </inSequence>

            <outSequence>
                <log level="custom">
                        <property name="text" value="***************
HTTPProxy outSequence ****************" />
                   </log>
                <send />
            </outSequence>
        </target>
    </proxy>
</definitions>

It's not working in same place as I wrote above, and get into endless loop.
What's wrong with this config, can you explain a little?

Reply via email to