3

We are developing a application using Service Oriented Architecture (SAO) where we are using Angular JS as frond end. Services will be written in Java. Currently we are discussing Whether we should go for REST Services or SOAP Services. I know both have Pros & Cons but which one is best for our Scenario we are not clear.

Regards, Alex

Alex
  • 1,406
  • 2
  • 18
  • 33

1 Answers1

9

I think that RESTful services are more lightweight and leverage the capabilities of the HTTP protocol. You can have a look at this link for more details about REST and Web APIs: https://templth.wordpress.com/2014/12/15/designing-a-web-api/.

That said, REST services that use JSON format for payload are more convenient to be used within AngularJS since the framework has a built-in support for such format. You can directly use $http or $resource in your Angular application.

SOAP is based on XML and you need more work to use it within an Angular application. In fact, you need to integrate a JavaScript SOAP client since parsing SOAP responses and creating SOAP requests can be tedious. See this link for more detail: AngularJS - SOAP Service Integration With AngularJS Model.

Thierry Templier
  • 198,364
  • 44
  • 396
  • 360