Difference between SOAP and HTTP protocol?

前端 未结 3 529
悲哀的现实
悲哀的现实 2021-01-31 02:46

What is the difference between the SOAP and HTTP protocol. When we say \"SOAP over HTTP\", what does that mean.?

3条回答
  •  借酒劲吻你
    2021-01-31 03:03

    You can serve any content over HTTP such as HTML, images, sound, video, etc. SOAP is an XML-based encoding of messages that are typically sent over HTTP, but could be sent over SMTP or even FTP, although I've never seen such a system used in a production environment.

    Just like HTTP sits on top of TCP/IP, SOAP sits on top of HTTP. Layers on top of layers...

    If you look at a SOAP request, you can see both layers, with the HTTP headers at the top, followed by the SOAP message. From the w3schools SOAP tutorial:

    ---------  HTTP portion of the message ------ 
    POST /InStock HTTP/1.1
    Host: www.example.org
    Content-Type: application/soap+xml; charset=utf-8
    Content-Length: nnn
    
    ---------  SOAP portion of the message ------ 
    
    
    
    
      
        IBM
      
    
    
    
    

    More reading for you:

    • http://en.wikipedia.org/wiki/HTTP
    • http://en.wikipedia.org/wiki/SOAP

提交回复
热议问题