2
Working some time with webservice
for mobile application realized that SOAP
uses XML
and REST
uses JSON
. Using SOAP
means I have to use only XML
?
2
Working some time with webservice
for mobile application realized that SOAP
uses XML
and REST
uses JSON
. Using SOAP
means I have to use only XML
?
6
Some questions:
Using SOAP means I have to use XML only?
Yes, SOAP by definition uses XML as communication format, there is no way to change this.
So there is no way to use JSON with SOAP?
Yes in theory there is, as the message format is XML, you can add your representation string of a JSON within a CDATA tag. Although it is not a very conventional technique yet in theory it is possible.
It is advisable to use JSON in the XML message of SOAP?
Not in theory, my thesis is if you need to use JSON at many times to circumvent XML constraints/limitations then why not eliminate SOAP as well. JSON is originally used for ajax calls which probably makes SOAP a very rigid tool for people’s needs. It’s up to you to decide whether the fact that you have a recurring need to use JSON as a communication format doesn’t make REST the best option for developing your webservices.
Browser other questions tagged xml web-service rest soap restful
You are not signed in. Login or sign up in order to post.