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

Sample 654: Smooks Mediator

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:Demonstrate the smooks mediatot EDI message processing.

Here is the sample with smooks mediator.

<definitions xmlns="http://ws.apache.org/ns/synapse">
    <localEntry key="transform-xslt-key"
                src="file:samples/service-bus/resources/smooks/transform.xslt"/>
    <localEntry key="smooks-key" src="file:samples/service-bus/resources/smooks/smooks-config.xml"/>
    <proxy name="StockQuoteProxy" transports="vfs">
        <parameter name="transport.vfs.ContentType">text/plain</parameter>
        <!--CHANGE-->
        <parameter name="transport.vfs.ContentType">text/plain</parameter>
       <parameter name="transport.vfs.FileURI">file:///home/user/dev/test/smooks/in</parameter>
       <parameter name="transport.vfs.FileNamePattern">.*\.txt</parameter>
        <parameter name="transport.PollInterval">5</parameter>
        <!--CHANGE-->
        <parameter name="transport.vfs.MoveAfterProcess">file:///home/user/dev/test/smooks/original</parameter>
        <!--CHANGE-->
        <parameter name="transport.vfs.MoveAfterFailure">file:///home/user/dev/test/smooks/original</parameter>
        <parameter name="transport.vfs.ActionAfterProcess">MOVE</parameter>
        <parameter name="transport.vfs.ActionAfterFailure">MOVE</parameter>
        <parameter name="Operation">urn:placeOrder</parameter>
        <target>
            <inSequence>
                <smooks config-key="smooks-key"/>
                <xslt key="transform-xslt-key"/>
                <iterate expression="//m0:placeOrder/m0:order" preservePayload="true"
                         attachPath="//m0:placeOrder" xmlns:m0="http://services.samples">
                    <target>
                        <sequence>
                            <header name="Action" value="urn:placeOrder"/>
                            <property action="set" name="OUT_ONLY" value="true"/>
                            <send>
                                <endpoint>
                                    <address format="soap11"
                                            uri="http://localhost:9000/services/SimpleStockQuoteService"/>
                                </endpoint>
                            </send>
                        </sequence>
                    </target>
                </iterate>
            </inSequence>
            <outSequence/>
        </target>
        <publishWSDL uri="file:samples/service-bus/resources/smooks/PlaceStockOrder.wsdl"/>
    </proxy>
</definitions>
  1. Deploy the SimpleStockQuoteService in sample Axis2 server and start it on port 9000. Then add the plain text builder to the messageBuilders section of the axis2.xml found in the <EI_HOME>/conf directory. Here is the sample configuration.

    <messageBuilder contentType="text/plain" class="org.apache.axis2.format.PlainTextBuilder"/>
  2. User has to edit the synapse_sample_654.xml found in the <EI_HOME>/samples/service-bus directory. These are the configuration parameters that needs to be edited.
    • transport.vfs.FileURI
    • transport.vfs.MoveAfterProcess
    • transport.vfs.ActionAfterFailure
  3. Create the above configuration and deploy it in the WSO2 EI profile, see Working with WSO2 Integration Studio.
  4. Drop the edi.txt file found in the <EI_HOME>/samples/service-bus/resources/smooks directory to the transport.vfs.FileURI parameter specified directory.
com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links2' is unknown.