Response encoding example of four SOAP protocols

Source: Internet
Author: User

We will not repeat some basic concepts of the SOAP protocol here. We have also provided some examples of the content encapsulated by SOAP. Here we will introduce some examples of the SOAP Protocol response encoding.

SOAP Protocol response code example 1

 
 
  1. HTTP/1.1 200 OK  
  2. Content-Type: text/xml; charset="utf-8" 
  3. Content-Length: nnnn  
  4. <SOAP-ENV:Envelope 
  5. xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
  6. SOAP-ENV:encodingstyle="http://schemas.xmlsoap.org/soap/encoding/"/> 
  7. <SOAP-ENV:Header> 
  8. <t:Transaction xmlns:t="some-URI" xsi:type="xsd:int" mustUnderstand="1"> 5 </t:Transaction> 
  9. </SOAP-ENV:Header> 
  10. <SOAP-ENV:Body> 
  11. <m:GetLastTradePriceResponse xmlns:m="Some-URI"> 
  12. <Price>34.5</Price> 
  13. </m:GetLastTradePriceResponse> 
  14. </SOAP-ENV:Body> 
  15. </SOAP-ENV:Envelope> 

SOAP Protocol response encoding Example 2

 
 
  1. HTTP/1.1 200 OK  
  2. Content-Type: text/xml; charset="utf-8" 
  3. Content-Length: nnnn  
  4. <SOAP-ENV:Envelope 
  5. xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
  6. SOAP-ENV:encodingstyle="http://schemas.xmlsoap.org/soap/encoding/"/> 
  7. <SOAP-ENV:Body> 
  8. <m:GetLastTradePriceResponse 
  9. xmlns:m="Some-URI"> 
  10. <PriceAndVolume> 
  11. <LastTradePrice> 34.5 </LastTradePrice> 
  12. <DayVolume> 10000 </DayVolume> 
  13. </PriceAndVolume> 
  14. </m:GetLastTradePriceResponse> 
  15. </SOAP-ENV:Body> 
  16. </SOAP-ENV:Envelope> 

SOAP Protocol response encoding Example 3

 
 
  1. HTTP/1.1 500 Internal Server Error  
  2. Content-Type: text/xml; charset="utf-8" 
  3. Content-Length: nnnn  
  4. <SOAP-ENV:Envelope 
  5. xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> 
  6. <SOAP-ENV:Body> 
  7. <SOAP-ENV:Fault> 
  8. <faultcode>SOAP-ENV:MustUnderstand</faultcode> 
  9. <faultstring>SOAP Must Understand Error</faultstring> 
  10. </SOAP-ENV:Fault> 
  11. </SOAP-ENV:Body> 
  12. </SOAP-ENV:Envelope> 

SOAP Protocol response code example 4

 
 
  1. HTTP/1.1 500 Internal Server Error  
  2. Content-Type: text/xml; charset="utf-8" 
  3. Content-Length: nnnn  
  4. <SOAP-ENV:Envelope 
  5. xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> 
  6. <SOAP-ENV:Body> 
  7. <SOAP-ENV:Fault> 
  8. <faultcode>SOAP-ENV:Server</faultcode> 
  9. <faultstring>Server Error</faultstring> 
  10. <detail> 
  11. <e:myfaultdetails xmlns:e="Some-URI"> 
  12. <message> 
  13. My application didn't work  
  14. </message> 
  15. <errorcode> 1001 </errorcode> 
  16. </e:myfaultdetails> 
  17. </detail> 
  18. </SOAP-ENV:Fault> 
  19. </SOAP-ENV:Body> 
  20. </SOAP-ENV:Envelope> 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.