简体   繁体   English

ASMX Web服务方法帮助页面上的SOAP消息是什么?

[英]What are the SOAP Messages on the Help Page of an ASMX Web Service Method?

I am currently studying Web Services and after doing a sample practise in a.asmx file, I notice that below the sample method output page, there's many SOAP related messages like the ones below, can anyone tell me what are these messages for?我目前正在研究 Web 服务,在 a.asmx 文件中进行示例练习后,我注意到示例方法 output 页面下面有很多 Z4DE91F0FCB9CD3A20B6B1D64610A0A3D 之类的相关消息,任何人都可以告诉我这些消息是什么? Thanks.谢谢。

SOAP 1.1 The following is a sample SOAP 1.1 request and response. SOAP 1.1 以下是示例 SOAP 1.1 请求和响应。 The placeholders shown need to be replaced with actual values.显示的占位符需要替换为实际值。

POST /SecurityWebService/Service.asmx HTTP/1.1
Host: localhost
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://tempuri.org/GetSecurityInfo"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetSecurityInfo xmlns="http://tempuri.org/">
      <Code>string</Code>
    </GetSecurityInfo>
  </soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetSecurityInfoResponse xmlns="http://tempuri.org/">
      <GetSecurityInfoResult>
        <Code>string</Code>
        <CompanyName>string</CompanyName>
        <Price>double</Price>
      </GetSecurityInfoResult>
    </GetSecurityInfoResponse>
  </soap:Body>
</soap:Envelope>

SOAP 1.2 The following is a sample SOAP 1.2 request and response. SOAP 1.2 以下是 SOAP 1.2 请求和响应示例。 The placeholders shown need to be replaced with actual values.显示的占位符需要替换为实际值。

POST /SecurityWebService/Service.asmx HTTP/1.1
Host: localhost
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <GetSecurityInfo xmlns="http://tempuri.org/">
      <Code>string</Code>
    </GetSecurityInfo>
  </soap12:Body>
</soap12:Envelope>
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <GetSecurityInfoResponse xmlns="http://tempuri.org/">
      <GetSecurityInfoResult>
        <Code>string</Code>
        <CompanyName>string</CompanyName>
        <Price>double</Price>
      </GetSecurityInfoResult>
    </GetSecurityInfoResponse>
  </soap12:Body>
</soap12:Envelope>

These are messages encoded in the SOAP protocol.这些是在SOAP协议中编码的消息。 .NET kinda puts that in a "black box" that for you, so that you don't have to handle SOAP messages creation and parsing yourself. .NET 有点把它放在一个“黑匣子”中,这样你就不必自己处理 SOAP 消息的创建和解析。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM