Versions Compared

Key

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

...

provided that the JBI message contains an attachment named "binary".

Accessing the JBI exchange

Some times, while processing the incoming request, you need to access the underlying JBI exchange.
It can be done using the following code snippet:

Code Block
langjava

public String echo(String msg, DataHandler binary) {
  ...
  MessageExchange exchange = org.apache.servicemix.jsr181.JBIContext.getMessageExchange();
  ...
}