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

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s