Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events
SOLVED

Estimation of Web Services: Soap and Rest Protocols

Avatar

Level 10

Hi all,

What are the typical effort estimations for development and unit testing of a low, medium and high complex Web Services with Soap protocol? What are the same for REST protocol?

Given the same Web service, Which protocol needs more effort and why so?

Appreciate your responses.

Thanks,

Rama.

1 Accepted Solution

Avatar

Correct answer by
Administrator

Hi Rama

Your question is very much business concentric. Before giving my take on this i would like to share few things with you:-

There are many differences between SOAP and REST web services. The important differences between SOAP and REST are given below:

  1. SOAP is a protocol. REST is an architectural style.
  2. SOAP stands for Simple Object Access Protocol. REST stands for Representational State Transfer.
  3. SOAP can't use REST because it is a protocol. REST can use SOAP web services because it is a concept and can use any protocol like HTTP, SOAP.
  4. SOAP uses services interfaces to expose the business logic. REST uses URI to expose business logic.
  5. SOAP defines standards to be strictly followed. REST does not define too much standards like SOAP.
  6. SOAP requires more bandwidth and resource than REST. REST requires less bandwidth and resource than SOAP.
  7. SOAP defines its own security. RESTful web services inherits security measures from the underlying transport.
  8. SOAP permits XML data format only. REST permits different data format such as Plain text, HTML, XML, JSON etc

Very interesting article :- http://stackoverflow.com/a/30833793/6433590 //Do read it.

Soap Vs Rest
SOAP is definitely the heavyweight choice for Web service access. It provides the following advantages when compared to REST:

Language, platform, and transport independent (REST requires use of HTTP)
Works well in distributed enterprise environments (REST assumes direct point-to-point communication)
Standardized
Provides significant pre-build extensibility in the form of the WS* standards
Built-in error handling
Automation when used with certain language products

REST is easier to use for the most part and is more flexible. It has the following advantages when compared to SOAP:

No expensive tools require to interact with the Web service
Smaller learning curve
Efficient (SOAP uses XML for all messages, REST can use smaller message formats)
Fast (no extensive processing required)
Closer to other Web technologies in design philosophy

According to your requirement you may choose either.

 

If your question is which would require more implementation efforts, then both would require same efforts, they both have learning curve in it.

 

~kautuk 



Kautuk Sahni

View solution in original post

6 Replies

Avatar

Level 9

Rama,

Estimation is something which totally depends on what kind of functionality we are building. Nobody can guess without knowing full details. So,  it should be taken care by the developer. 

With regards to your question whether you should use SOAP or rest. This also depends on your web service support and business approval. If business wants to go with SOAP and your webservice does not support REST then you have your answer.

Avatar

Level 10

Hi Jitendra,

I agree that without knowing the details, one can not estimate any work. But, could we assume the complexity as medium and take a stab at it?

But, my second question was not how/what to choose between REST and SOAP.

It is rather, given the same web service functionality, assuming that we could use SOAP or REST, which one takes more effort and why.

(Also, it may not be practical to say that a specific functionality is exposed as both REST and SOAP, but for our discussion, let us assume this case exists.)

Thanks,

Rama.

Avatar

Correct answer by
Administrator

Hi Rama

Your question is very much business concentric. Before giving my take on this i would like to share few things with you:-

There are many differences between SOAP and REST web services. The important differences between SOAP and REST are given below:

  1. SOAP is a protocol. REST is an architectural style.
  2. SOAP stands for Simple Object Access Protocol. REST stands for Representational State Transfer.
  3. SOAP can't use REST because it is a protocol. REST can use SOAP web services because it is a concept and can use any protocol like HTTP, SOAP.
  4. SOAP uses services interfaces to expose the business logic. REST uses URI to expose business logic.
  5. SOAP defines standards to be strictly followed. REST does not define too much standards like SOAP.
  6. SOAP requires more bandwidth and resource than REST. REST requires less bandwidth and resource than SOAP.
  7. SOAP defines its own security. RESTful web services inherits security measures from the underlying transport.
  8. SOAP permits XML data format only. REST permits different data format such as Plain text, HTML, XML, JSON etc

Very interesting article :- http://stackoverflow.com/a/30833793/6433590 //Do read it.

Soap Vs Rest
SOAP is definitely the heavyweight choice for Web service access. It provides the following advantages when compared to REST:

Language, platform, and transport independent (REST requires use of HTTP)
Works well in distributed enterprise environments (REST assumes direct point-to-point communication)
Standardized
Provides significant pre-build extensibility in the form of the WS* standards
Built-in error handling
Automation when used with certain language products

REST is easier to use for the most part and is more flexible. It has the following advantages when compared to SOAP:

No expensive tools require to interact with the Web service
Smaller learning curve
Efficient (SOAP uses XML for all messages, REST can use smaller message formats)
Fast (no extensive processing required)
Closer to other Web technologies in design philosophy

According to your requirement you may choose either.

 

If your question is which would require more implementation efforts, then both would require same efforts, they both have learning curve in it.

 

~kautuk 



Kautuk Sahni

Avatar

Level 10

Also - it all depends on the end point you want to consume for your business requirements. For example - if the end point serving up data is SOAP, you want to build an AEM service that consumes the SOAP stack. Likewise, the same is true for a RESTFul service. We have AEM Community articles that show you how to build Restful and SOAP web services for AEM.

Rest - https://helpx.adobe.com/experience-manager/using/restful-services.html

Soap - https://helpx.adobe.com/experience-manager/using/creating-cxf-bundles-consume-web.html

Hope this helps....

Avatar

Administrator

Hi Rama

Did you find information sheared useful ?

~kautuk 



Kautuk Sahni

Avatar

Level 10

Hi Kautuk,

Yes. This answers my query very much.

The general talk is the SOAP is a little more complex and would take more efforts to implement than REST.

But, I now understand that both are same in complexity and duration.

Appreciate your responses.

Thanks,

Rama.