tags:

views:

669

answers:

2

Follow up question to this post

Fow now I have a slight idea about difference of SOAP and RESTful.

My question is when to use SOAP and when to use RESTful, which one is "better" looking at performance/speed or request handling?

I'm implementing for the first time RESTful in java and I wanna know more about it, I've dealt with SOAP before.

EDIT

Should I offer some bounty to get an answer to this question

+2  A: 

REST is almost always going to be faster. The main advantage of SOAP is that it provides a mechanism for services to describe themselves to clients, and to advertise their existence.

REST is much more lightweight and can be implemented using almost any tool, leading to lower bandwidth and shorter learning curve. However, the clients have to know what to send and what to expect.

In general, When you're publishing an API to the outside world that is either complex or likely to change, SOAP will be more useful. Other than that, REST is usually the better option.

dj_segfault
A: 

Why not switch to JSON?