两个SOAP封装例子

网络 网络管理
这里我们针对SOAP封装的内容,列举了两个代码例子。那么通过下面的两则例子,希望大家能够得到一些有价值的参考。

对于SOAP协议的内容,我们在前面的文章中已经讲解过了它的基础内容。这里我们主要针对SOAP封装进行一下案例的分析。那么下边我们主要举出了两个SOAP封装的例子,给大家提供一个参考。

SOAP封装:请求编码举例

SOAP封装例1

POST /StockQuote HTTP/1.1  
Host: www.stockquoteserver.com  
Content-Type: text/xml; charset="utf-8" 
Content-Length: nnnn  
SOAPAction: "Some-URI"  
<SOAP-ENV:Envelope 
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
SOAP-ENV:encodingstyle="http://schemas.xmlsoap.org/soap/encoding/"/> 
<SOAP-ENV:Header> 
<t:Transaction 
xmlns:t="some-URI" 
SOAP-ENV:mustUnderstand="1"> 
5  
</t:Transaction> 
</SOAP-ENV:Header> 
<SOAP-ENV:Body> 
<m:GetLastTradePrice xmlns:m="Some-URI"> 
<symbol>DEF</symbol> 
</m:GetLastTradePrice> 
</SOAP-ENV:Body> 
</SOAP-ENV:Envelope> 
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.

SOAP封装例2

POST /StockQuote HTTP/1.1  
Host: www.stockquoteserver.com  
Content-Type: text/xml; charset="utf-8" 
Content-Length: nnnn  
SOAPAction: "Some-URI"  
<SOAP-ENV:Envelope 
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
SOAP-ENV:encodingstyle="http://schemas.xmlsoap.org/soap/encoding/"/> 
<SOAP-ENV:Body> 
<m:GetLastTradePriceDetailed 
xmlns:m="Some-URI"> 
<Symbol>DEF</Symbol> 
<Company>DEF Corp</Company> 
<Price>34.1</Price> 
</m:GetLastTradePriceDetailed> 
</SOAP-ENV:Body> 
</SOAP-ENV:Envelope> 
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.

 

责任编辑:佟健 来源: hi.baidu.com
相关推荐

2010-09-10 15:33:26

SOAP协议应答编码

2009-08-12 16:37:22

C#变量类型转换

2021-02-07 21:59:39

Java回调机制

2022-06-17 09:46:51

Chrome 102Chrome浏览器

2020-11-13 07:16:09

线程互斥锁死循环

2009-07-16 10:39:00

SwingUtilit

2021-08-03 08:13:47

数据

2009-07-15 18:29:22

Jython应用

2017-01-15 01:45:37

简历简历模板数据

2010-09-17 09:51:37

SIP路由

2010-07-02 12:26:51

LEACH协议

2019-06-25 10:46:04

Flutter开发APP

2010-07-25 14:31:54

Telnet程序

2012-01-18 11:02:37

Tomcat

2016-03-31 11:28:21

imageView图片轮播

2013-05-30 22:47:40

阿里巴巴阿里云昆塔盒子总动员

2011-07-05 16:13:18

2015-02-05 09:54:13

程序员

2013-07-05 10:52:07

程序员结对编程
点赞
收藏

51CTO技术栈公众号