开发者

Am I using SOAP if I have a web service?

Say I create a simple web serv开发者_JS百科ice that adds two numbers together. I send the service two numbers, I get back an answer. If you like better, I send an account, I get back personal information.

Either way, am I using soap and not knowing it? I thought I was calling my web service with an http url and my service is returning xml or json. Where is soap in this?

Thanks.


It could be SOAP - or it could be REST.

What technologies are you using on the server and the client??

Indicators for SOAP:

  • Did you define your service using a WSDL (Web Service Description Language) ?
  • Does your service have methods that are verb-noun style, e.g. AddNumber or GetInfo ?

Indicators for REST:

  • you don't have a WSDL
  • you don't have service methods - you just use a resource identifier (URI) to get your information and you use the standard HTTP verbs like GET, POST, PUT etc. for "doing things"

As for the "where is SOAP in this" - read the Wikipedia article, check out the What Is SOAP? page, or research other places to get a feel for what SOAP is and does... in a nutshell: SOAP takes your input parameter, translates everything into a (XML) message and send that to the server for processing - and does the same thing with the response (XML) message coming back from the server.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜