This documentation is for WSO2 Enterprise Service Bus version 4.7.0 . View documentation for the latest release.

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Objective:Demonstrate the Message Relay with Builder mediator.

This sample is similar to sample 655. We have added the builder mediator to build the actual message before logging it.

Code Block
<?xml version="1.0"?>
<definitions xmlns="">
  <proxy name="StockQuoteProxy" startOnLoad="true">
        <log level="full"/>
          <endpoint name="epr">
            <address uri="http://localhost:9000/services/SimpleStockQuoteService"/>
        <log level="full"/>
    <publishWSDL uri="file:repository/samples/resources/proxy/sample_proxy_1.wsdl"/>
  <sequence name="fault">
    <log level="full">
      <property name="MESSAGE" value="Executing default &quot;fault&quot; sequence"/>
      <property name="ERROR_CODE" expression="get-property('ERROR_CODE')"/>
      <property name="ERROR_MESSAGE" expression="get-property('ERROR_MESSAGE')"/>
  <sequence name="main">

Prerequisites:Set up is same as sample 655.

Code Block
ant stockquote -Daddurl=http://localhost:8280/services/StockQuoteProxy

You can see the actual messages going through the proxy by looking at the console because we have two log mediators in this sample. Becuase we have the builder mediator in place, unlike in sample 655 we have the actual message printed.