Search code examples
web-servicesrestsoapsoaesb

RESTful API and SOAP service


I am learning SOAP and I have some questions:

  1. If I have a SOAP service, and if my understanding is correct then the consumer will need to import the WSDL and generate the stubs to consume my service?

  2. If now I have exposed the SOAP service with a RESTful API with the help of a ESB in between. Does that mean the consumer no longer need to import any WSDL to generate the stubs?


Solution

    1. Yes -the idea behind SOAP specification (wsdl) is so that clients can use it to create a proxy for calling the service and not have to figure out the details for themselves. It is very hard to connect to a SOAP service without using a wsdl
    2. In this case the ESB does the calls to the actual service and the REST interface is a new interface client should use to communicate with the service.