Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

As the Callout Mediator performs a blocking call, it cannot use the default non-blocking http/s transports based on Java NIO. Therefore, it defaults to using the samples/axis2Client/client_repo/conf/axis2.xml as the Axis2 configuration and samples/axis2Client/client_repo as the client repository unless these are specified separately

...

Table of Contents
maxLevel3
minLevel3

...

styleborder:1
locationtop
typeflat
separatorpipe

...

Syntax

Code Block
XML
XML

<callout serviceURL="string" [action="string"]>
      <configuration [axis2xml="string"] [repository="string"]/>?
      <source xpath="expression" | key="string"/>
      <target xpath="expression" | key="string"/>
</callout>

...

The following properties of the Callout Mediator are available:

General Options of the Callout Mediator
Anchor
General Options
General Options

...

Info
titleNote

You can configure the Mediator using XML. Click on "switch to source view" in the "Mediator" window.

Example

Code Block
XML
XML

<callout serviceURL="http://localhost:9000/services/SimpleStockQuoteService"
         action="urn:getQuote">
    <source xmlns:s11="http://schemas.xmlsoap.org/soap/envelope/"
            xmlns:s12="http://www.w3.org/2003/05/soap-envelope"
            xpath="s11:Body/child::*[fn:position()=1] | s12:Body/child::*[fn:position()=1]"/>
    <target xmlns:s11="http://schemas.xmlsoap.org/soap/envelope/"
            xmlns:s12="http://www.w3.org/2003/05/soap-envelope"
            xpath="s11:Body/child::*[fn:position()=1] | s12:Body/child::*[fn:position()=1]"/>
</callout>

In this example, the Callout Mediator does the direct service invocation to the StockQuoteService using the client request, get the response and set it as the first child of the SOAP message body. Then using the Send Mediator, the message is sent back to the client.

See also Sample 430: Simple Callout Mediator for Synchronized Web Service Invocation.

Excerpt
hiddentrue

Description of the Callout Mediator in WSO2 ESB.