com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links' is unknown.

Sample 268: Proxy Services with the Local Transport

Note that WSO2 EI is shipped with the following changes to what is mentioned in this documentation:

  • <PRODUCT_HOME>/repository/samples/ directory that includes all Integration profile samples is changed to <EI_HOME>/samples/service-bus/.
  • <PRODUCT_HOME>/repository/samples/resources/ directory that includes all artifacts related to the Integration profile samples is changed to <EI_HOME>/samples/service-bus/resources/.

Objective: Proxy services with the /wiki/spaces/EI6xx/pages/49613810.

<definitions xmlns="http://ws.apache.org/ns/synapse">
    <proxy xmlns="http://ws.apache.org/ns/synapse" name="LocalTransportProxy"
           transports="https http" startOnLoad="true" trace="disable">
        <target>
            <endpoint name="ep1">
                <address uri="local://services/SecondProxy"/>
            </endpoint>
            <inSequence>
                <log level="full"/>
                <log level="custom">
                    <property name="LocalTransportProxy" value="In sequence of LocalTransportProxy invoked!"/>
                </log>
            </inSequence>
            <outSequence>
                <log level="custom">
                    <property name="LocalTransportProxy" value="Out sequence of LocalTransportProxy invoked!"/>
                </log>
                <send/>
            </outSequence>
        </target>
        <publishWSDL uri="file:samples/service-bus/resources/proxy/sample_proxy_1.wsdl"/>
    </proxy>
    <proxy xmlns="http://ws.apache.org/ns/synapse" name="SecondProxy"
           transports="https http" startOnLoad="true" trace="disable">
        <target>
            <endpoint name="ep2">
                <address uri="local://services/StockQuoteProxy"/>
            </endpoint>
            <inSequence>
                <log level="full"/>
                <log level="custom">
                    <property name="SecondProxy" value="In sequence of Second proxy invoked!"/>
                </log>
            </inSequence>
            <outSequence>
                <log level="custom">
                    <property name="SecondProxy" value="Out sequence of Second proxy invoked!"/>
                </log>
                <send/>
            </outSequence>
        </target>
        <publishWSDL uri="file:samples/service-bus/resources/proxy/sample_proxy_1.wsdl"/>
    </proxy>
    <proxy xmlns="http://ws.apache.org/ns/synapse" name="StockQuoteProxy"
           startOnLoad="true">
        <target>
            <endpoint name="ep3">
                <address uri="http://localhost:9000/services/SimpleStockQuoteService"/>
            </endpoint>
            <outSequence>
                <log level="custom">
                    <property name="StockQuoteProxy"
                              value="Out sequence of StockQuote proxy invoked!"/>
                </log>
                <log level="full"/>
                <send/>
            </outSequence>
        </target>
        <publishWSDL uri="file:samples/service-bus/resources/proxy/sample_proxy_1.wsdl"/>
    </proxy>
</definitions>

This sample contains three proxy services. The stockquote client invokes the LocalTransportProxy. Then the message will be sent to the SecondProxy and then it will be sent to the StockQuoteProxy. The StockQuoteProxy will invoke the backend service and return the response to the client. In this sample, the communication between proxy services are done through the Local transport. Since Local transport calls are in-JVM calls, it will reduce the time taken for the communication between proxy services.

1. Enable /wiki/spaces/EI6xx/pages/49613810 for the ESB.

2. Create the above configuration and deploy it in the WSO2 EI profile, see Working with WSO2 Integration Studio.

3. Start the Axis2 server and deploy the SimpleStockQuoteService if not already done

4. Execute the stock quote client by requesting for a stock quote on the proxy service as follows:

ant stockquote -Daddurl=http://localhost:8280/services/LocalTransportProxy
com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links2' is unknown.