Day-8 Configuring Exception strategies

There are different types of strategies available in mule to configure exceptions.


If we did not configure the exception strategy to the flow. then the exception will be handled by Mule Default Message exception strategy.

catchExceptionStrategy like similar to handling exception in Java using


}catch(Exception ex){



In flow:

<catch-exception-strategy doc:name=”CatchExceptionStrategy”>
<logger message=”Exception occured” level=”INFO” doc:name=”Logger”/>


It will handle all the exceptions.  if you want to handle each exception in a different manner then need to choose choiceExceptionStrategy.


if you define exception strategy inside flow the scope of strategy is up to the flow. the flow won’t be available in other flows.

To make the flow available to al flows, the strategy need to declare exception on global scope rather flow scope. the refer the strategy in the flow using ReferenceExceptionStrategy.


we can override Mule default exception strategy by declaring the exception strategy at global scope and marking it as default using configuration tag

  <configuration  defaultExceptionStrategy-ref=”myCatch”/> 

Code examples available at at



Day -7 Configuring SOAP web Services

In Mule ESB we can configure SOAP based web services through CXF component available in component palette.  we can develop services and clients for Simple and JAX-WS and proxy.

we can configure code first and contract first style web services.

  1. Exposing a method implementation as web service without JAX-WS
  2. Exposing a method implementation as web service with JAX-WS
  3. Exposing Contract first web service

Steps for Simple Service without JAX-WS.

  • configure HTTP component
  • Code the Service interface and implementation.

package simplesoap;
public interface WishService {
public String sayHello(String name);

package simplesoap;
public class WishServiceImpl implements WishService {
public String sayHello(String name) {
return “Hello” + name + “How are you ??” ;

  • Configure Java componentSOAP-1
  • Configure CXF component.SOAP-2
  • The configuration looks like
  • SOAP-3

2) Configuring service with JAX-WS

TO expose Jax-WS based web services, we need to annotate the service interface with @webservice

Steps are same as above service, only the service interface is annotated with @Webservice annotation

package jaxwssoap;
import javax.jws.WebService;
public interface EmployeeService {
public SalaryDetails getEmpSalDetails(Employee emp);

  1. Exposing Contract first web service, Please refer

Code examples find at at