Callout Mediator

The mediator performs a blocking external service invocation during mediation. The serviceURL and the optional action specifies the parameters for this external call. The source element specifies the payload for the request message using an XPath expression; or a registry key that will be used. The target element specifies a node, at which the resulting payload will be attached into the current message, or the name of a key/property using which the response would be attached to the current message context as a property.

As the callout mediator performs a blocking call, it cannot use the default non-blocking http/s transports based on Java NIO, and thus 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

Adding a callout mediator

As shown in Figure 1 go to Advanced and click Callout.

Figure 1: Adding a callout mediator

Configuring Callout options

Figure 2 shows all the Callout specific options that can be tweaked.


Figure 2: Callout mediator specific options

Callout mediator specific options,
  • ServiceURL - URL of the service.
  • Action - SOAP action.
  • Axis2 Repository - Full path to Axis2 Repository Location. This is the place where services and modules are located.
  • Axis2 XML - Full path to Axis2 XML file location.
  • Source - Payload for the request message. This can be specified as an XPath expression or the name of a message context property which contains the source payload.
  • Target - Specifies a node, at which the resulting payload will be attached into the current message, or the name of a property using which the response will be attached to the current message context as a property.