*
* @param uri endpoint uri to send the exchange to
* @return an expression object which will return the OUT body
*/
public static Expression toExpression(final String uri) {
return new ExpressionAdapter() {
public Object evaluate(Exchange exchange) {
Endpoint endpoint = exchange.getContext().getEndpoint(uri);
if (endpoint == null) {
throw new NoSuchEndpointException(uri);
}