// create a new switch mediator
switchMediator = new SwitchMediator();
// set xpath condition to select symbol
AXIOMXPath xpath = new AXIOMXPath("//wsx:symbol");
xpath.addNamespace("wsx", "http://www.webserviceX.NET/");
switchMediator.setSource(xpath);
// set ibm mediator to be called for IBM, msft for MSFT and default for others..
switchMediator.addCase(new SwitchCaseMediator(Pattern.compile("IBM"), false,
Arrays.asList(new Mediator[] {ibmMediator})));