KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
If I need a web service to pass back and forth a complex object, is there a reason I should prefer SOAP over REST? Here is an example of the possible SOAP message: <soap:Envelope> <soap:Header> <Credentials> <User>Joe</User> <Password>abc123</Password> </Credentials> </soap:Header> <soap:Body> <MyComplexBusinessObject> <Search> <First>Joe</First> <Last>Smith</Last> </Search> ... ... </MyComplexBusinessObject> </soap:Body> </soap:Envelope> Using REST, I would be asking the client to POST the following xml and authenticate using Basic Authentication: <MyComplexBusinessObject> <Search> <First>Joe</First> <Last>Smith</Last> </Search> ... ... </MyComplexBusinessObject> The SOAP message is slightly more complicated, but not by much. They are still both XML, but SOAP comes with a WSDL and most programming environments will generate proxy classes for you. However, most people I talk to say I should use REST instead because it's easier to use. But I don't see how SOAP is any harder to use. Am I missing something?
Tags (comma-separated)
Save Edits
Cancel