`
jps2004cz
  • 浏览: 23478 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

以中国股票网的wsdl为例简单的解释wsdl

阅读更多
今天说说wsdl也就是web 服务描述语言,简单的说就是xml
以中国股票网提供的webservice为例,说明一下,这个服务是有流量或访问限制的一天访问次数不能太多。(为什么要这样啊,不过毕竟免费的,给提供就不错啦)
主要是学习wsdl和soap,soap说的不多,不过改天再来个soap的,要不今天看到太多了,一大堆E文晕死,希望对大家有帮助
下面是它自己的一些简介和说明;完了我在说说wsdl
讲解地址:http://www.webxml.com.cn/WebServices/ChinaStockWebService.asmx
地址:http://www.webxml.com.cn/WebServices/ChinaStockWebService.asmx?WSDL
先放xml

红色的俺的一些注解说明,大概看看就是了,要搞股票系统应该多看看里面的opreation和type我用过一个opreation还不错实时获取股票信息
  <?xml version="1.0" encoding="utf-8" ?>  xml头定义版本和字符集- <wsdl:definitions          xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://WebXml.com.cn/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://WebXml.com.cn/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">    wsdl定义它所需要的一些协议,命名空间,服务名什么的 
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"><a href="http://www.webxml.com.cn/" target="_blank">WebXml.com.cn</a> <strong>中国股票行情数据 WEB 服务(支持深圳和上海股市的全部基金、债券和股票)</strong>,数据即时更新。输出GIF分时走势图、日/周/月 K 线图、及时行情数据(股票名称、行情时间、最新价、昨收盘、今开盘、涨跌额、最低、最高、涨跌幅、成交量、成交额、竞买价、竞卖价、委比、买一 - 买五、卖一 - 卖五)。此中国股票行情数据 WEB 服务仅作为用户获取信息之目的,并不构成投资建议。<a href="http://www.webxml.com.cn/" target="_blank">WebXml.com.cn</a> 和/或其各供应商不为本页面提供信息的错误、残缺、延迟或因依靠此信息所采取的任何行动负责。<strong>市场有风险,投资需谨慎</strong>。<br />此中国股票行情数据Web Services请不要用于任何商业目的,若有需要请<a href="http://www.webxml.com.cn/zh_cn/contact_us.aspx" target="_blank">联系我们</a>,欢迎技术交流。 QQ:8698053<br /><strong>使用本站 WEB 服务请注明或链接本站:http://www.webxml.com.cn/ 感谢大家的支持</strong>!<br /><br /><span style="color:#D20000;"><strong>股票输入注意事项</strong>:因上海股票和深圳股票在代号上有重叠,所以在输入上海股票请在代号前加 SH,深圳加 SZ(不区分大小写),例:上证指数 sh000001,深发展A sz000001。如不输入股票代号默认上证指数 sh000001</span><br /><br />&nbsp;</wsdl:documentation>  这些是对文档的一些说明

- <wsdl:types> 类型定义或说明
- <s:schema elementFormDefault="qualified" targetNamespace="http://WebXml.com.cn/">   下面是一些参数说明包括请求响应大家都看得懂不罗嗦啦
- <s:element name="getStockImageByCode">
- <s:complexType>
- <s:sequence>
  <s:element minOccurs="0" maxOccurs="1" name="theStockCode" type="s:string" />
  </s:sequence>
  </s:complexType>
  </s:element>
- <s:element name="getStockImageByCodeResponse">
  <s:complexType />
  </s:element>
- <s:element name="getStockImageByteByCode">
- <s:complexType>
- <s:sequence>
  <s:element minOccurs="0" maxOccurs="1" name="theStockCode" type="s:string" />
  </s:sequence>
  </s:complexType>
  </s:element>
- <s:element name="getStockImageByteByCodeResponse">
- <s:complexType>
- <s:sequence>
  <s:element minOccurs="0" maxOccurs="1" name="getStockImageByteByCodeResult" type="s:base64Binary" />
  </s:sequence>
  </s:complexType>
  </s:element>
- <s:element name="getStockImage_kByCode">
- <s:complexType>
- <s:sequence>
  <s:element minOccurs="0" maxOccurs="1" name="theStockCode" type="s:string" />
  <s:element minOccurs="0" maxOccurs="1" name="theType" type="s:string" />
  </s:sequence>
  </s:complexType>
  </s:element>
- <s:element name="getStockImage_kByCodeResponse">
  <s:complexType />
  </s:element>
- <s:element name="getStockImage_kByteByCode">
- <s:complexType>
- <s:sequence>
  <s:element minOccurs="0" maxOccurs="1" name="theStockCode" type="s:string" />
  <s:element minOccurs="0" maxOccurs="1" name="theType" type="s:string" />
  </s:sequence>
  </s:complexType>
  </s:element>
- <s:element name="getStockImage_kByteByCodeResponse">
- <s:complexType>
- <s:sequence>
  <s:element minOccurs="0" maxOccurs="1" name="getStockImage_kByteByCodeResult" type="s:base64Binary" />
  </s:sequence>
  </s:complexType>
  </s:element>
- <s:element name="getStockInfoByCode">
- <s:complexType>
- <s:sequence>
  <s:element minOccurs="0" maxOccurs="1" name="theStockCode" type="s:string" />
  </s:sequence>
  </s:complexType>
  </s:element>
- <s:element name="getStockInfoByCodeResponse">
- <s:complexType>
- <s:sequence>
  <s:element minOccurs="0" maxOccurs="1" name="getStockInfoByCodeResult" type="tns:ArrayOfString" />
  </s:sequence>
  </s:complexType>
  </s:element>
- <s:complexType name="ArrayOfString">
- <s:sequence>
  <s:element minOccurs="0" maxOccurs="unbounded" name="string" nillable="true" type="s:string" />
  </s:sequence>
  </s:complexType>
  <s:element name="base64Binary" nillable="true" type="s:base64Binary" />
  <s:element name="ArrayOfString" nillable="true" type="tns:ArrayOfString" />
  </s:schema>
  </wsdl:types>
下面是消息定义,因为wsdl采用消息机制,请求和响应这会都成消息啦。当然这些会被封装成soap传输 下面的什么什么in是请求消息,out是响应消息(这是站在服务器端看,客户端反过来就是)。
- <wsdl:message name="getStockImageByCodeSoapIn">
  <wsdl:part name="parameters" element="tns:getStockImageByCode" />
  </wsdl:message>
- <wsdl:message name="getStockImageByCodeSoapOut">
  <wsdl:part name="parameters" element="tns:getStockImageByCodeResponse" />
  </wsdl:message>
- <wsdl:message name="getStockImageByteByCodeSoapIn">
  <wsdl:part name="parameters" element="tns:getStockImageByteByCode" />
  </wsdl:message>
- <wsdl:message name="getStockImageByteByCodeSoapOut">
  <wsdl:part name="parameters" element="tns:getStockImageByteByCodeResponse" />
  </wsdl:message>
- <wsdl:message name="getStockImage_kByCodeSoapIn">
  <wsdl:part name="parameters" element="tns:getStockImage_kByCode" />
  </wsdl:message>
- <wsdl:message name="getStockImage_kByCodeSoapOut">
  <wsdl:part name="parameters" element="tns:getStockImage_kByCodeResponse" />
  </wsdl:message>
- <wsdl:message name="getStockImage_kByteByCodeSoapIn">
  <wsdl:part name="parameters" element="tns:getStockImage_kByteByCode" />
  </wsdl:message>
- <wsdl:message name="getStockImage_kByteByCodeSoapOut">
  <wsdl:part name="parameters" element="tns:getStockImage_kByteByCodeResponse" />
  </wsdl:message>
- <wsdl:message name="getStockInfoByCodeSoapIn">
  <wsdl:part name="parameters" element="tns:getStockInfoByCode" />
  </wsdl:message>
- <wsdl:message name="getStockInfoByCodeSoapOut">
  <wsdl:part name="parameters" element="tns:getStockInfoByCodeResponse" />
  </wsdl:message>
- <wsdl:message name="getStockImageByCodeHttpGetIn">
  <wsdl:part name="theStockCode" type="s:string" />
  </wsdl:message>
  <wsdl:message name="getStockImageByCodeHttpGetOut" />
- <wsdl:message name="getStockImageByteByCodeHttpGetIn">
  <wsdl:part name="theStockCode" type="s:string" />
  </wsdl:message>
- <wsdl:message name="getStockImageByteByCodeHttpGetOut">
  <wsdl:part name="Body" element="tns:base64Binary" />
  </wsdl:message>
- <wsdl:message name="getStockImage_kByCodeHttpGetIn">
  <wsdl:part name="theStockCode" type="s:string" />
  <wsdl:part name="theType" type="s:string" />
  </wsdl:message>
  <wsdl:message name="getStockImage_kByCodeHttpGetOut" />
- <wsdl:message name="getStockImage_kByteByCodeHttpGetIn">
  <wsdl:part name="theStockCode" type="s:string" />
  <wsdl:part name="theType" type="s:string" />
  </wsdl:message>
- <wsdl:message name="getStockImage_kByteByCodeHttpGetOut">
  <wsdl:part name="Body" element="tns:base64Binary" />
  </wsdl:message>
- <wsdl:message name="getStockInfoByCodeHttpGetIn">
  <wsdl:part name="theStockCode" type="s:string" />
  </wsdl:message>
- <wsdl:message name="getStockInfoByCodeHttpGetOut">
  <wsdl:part name="Body" element="tns:ArrayOfString" />
  </wsdl:message>
- <wsdl:message name="getStockImageByCodeHttpPostIn">
  <wsdl:part name="theStockCode" type="s:string" />
  </wsdl:message>
  <wsdl:message name="getStockImageByCodeHttpPostOut" />
- <wsdl:message name="getStockImageByteByCodeHttpPostIn">
  <wsdl:part name="theStockCode" type="s:string" />
  </wsdl:message>
- <wsdl:message name="getStockImageByteByCodeHttpPostOut">
  <wsdl:part name="Body" element="tns:base64Binary" />
  </wsdl:message>
- <wsdl:message name="getStockImage_kByCodeHttpPostIn">
  <wsdl:part name="theStockCode" type="s:string" />
  <wsdl:part name="theType" type="s:string" />
  </wsdl:message>
  <wsdl:message name="getStockImage_kByCodeHttpPostOut" />
- <wsdl:message name="getStockImage_kByteByCodeHttpPostIn">
  <wsdl:part name="theStockCode" type="s:string" />
  <wsdl:part name="theType" type="s:string" />
  </wsdl:message>
- <wsdl:message name="getStockImage_kByteByCodeHttpPostOut">
  <wsdl:part name="Body" element="tns:base64Binary" />
  </wsdl:message>
- <wsdl:message name="getStockInfoByCodeHttpPostIn">
  <wsdl:part name="theStockCode" type="s:string" />
  </wsdl:message>
- <wsdl:message name="getStockInfoByCodeHttpPostOut">
  <wsdl:part name="Body" element="tns:ArrayOfString" />
  </wsdl:message>
下面对我们来说才是有用的啊看好了
porttype子元素也就是operation对应到具体实现就是我们类中的方法,当然理解为对外接口更好点,最起码听起来专业点。这里引用了命名空间看起来很累不过组织结构良好,input和output对应上面的message中定义的。中间还夹杂了一大堆说明,方法说明嘛不过看到人累啊

- <wsdl:portType name="ChinaStockWebServiceSoap">
- <wsdl:operation name="getStockImageByCode">
  <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"><br /><h3>直接获得中国股票GIF分时走势图(545*300pixel/72dpi)</h3><p>输入参数:theStockCode = 股票代号,如:sh000001; 返回数据:股票GIF分时走势图。</p><br /></wsdl:documentation>
  <wsdl:input message="tns:getStockImageByCodeSoapIn" />
  <wsdl:output message="tns:getStockImageByCodeSoapOut" />
  </wsdl:operation>
- <wsdl:operation name="getStockImageByteByCode">
  <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"><br /><h3>获得中国股票GIF分时走势图字节数组</h3><p>输入参数:theStockCode = 股票代号,如:sh000001; 返回数据:股票GIF分时走势图字节数组。<br /><strong>字节流到图片可以参考以下方法</strong>(.NET vb):<br />HttpContext.Current.Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache) '不缓存<br />HttpContext.Current.Response.ClearContent()<br />HttpContext.Current.Response.ContentType = "image/Gif"<br />HttpContext.Current.Response.BinaryWrite(Ary) 'Ary 图片字节数组<br />HttpContext.Current.Response.End()</p><br /></wsdl:documentation>
  <wsdl:input message="tns:getStockImageByteByCodeSoapIn" />
  <wsdl:output message="tns:getStockImageByteByCodeSoapOut" />
  </wsdl:operation>
- <wsdl:operation name="getStockImage_kByCode">
  <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"><br /><h3>直接获得中国股票GIF日/周/月 K 线图(545*300pixel/72dpi)</h3><p>输入参数:theStockCode = 股票代号,如:sh000001;theType = K 线图类型(D:日[默认]、W:周、M:月),返回数据:股票GIF日 K 线图。</p><br /></wsdl:documentation>
  <wsdl:input message="tns:getStockImage_kByCodeSoapIn" />
  <wsdl:output message="tns:getStockImage_kByCodeSoapOut" />
  </wsdl:operation>
- <wsdl:operation name="getStockImage_kByteByCode">
  <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"><br /><h3>获得中国股票GIF日/周/月 K 线图字节数组</h3><p>输入参数:theStockCode = 股票代号,如:sh000001;theType = K 线图类型(D:日[默认]、W:周、M:月),返回数据:股票GIF日 K 线图字节数组。</p><br /></wsdl:documentation>
  <wsdl:input message="tns:getStockImage_kByteByCodeSoapIn" />
  <wsdl:output message="tns:getStockImage_kByteByCodeSoapOut" />
  </wsdl:operation>
- <wsdl:operation name="getStockInfoByCode">
  <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"><br /><h3>获得中国股票及时行情 String()</h3><p>输入参数:theStockCode = 股票代号,如:sh000001; 返回数据:一个一维字符串数组 String(24),结构为:String(0)股票代号、String(1)股票名称、String(2)行情时间、String(3)最新价(元)、String(4)昨收盘(元)、String(5)今开盘(元)、String(6)涨跌额(元)、String(7)最低(元)、String(8)最高(元)、String(9)涨跌幅(%)、String(10)成交量(手)、String(11)成交额(万元)、String(12)竞买价(元)、String(13)竞卖价(元)、String(14)委比(%)、String(15)-String(19)买一 - 买五(元)/手、String(20)-String(24)卖一 - 卖五(元)/手。</p><br /></wsdl:documentation>
  <wsdl:input message="tns:getStockInfoByCodeSoapIn" />
  <wsdl:output message="tns:getStockInfoByCodeSoapOut" />
  </wsdl:operation>
  </wsdl:portType>
- <wsdl:portType name="ChinaStockWebServiceHttpGet">
- <wsdl:operation name="getStockImageByCode">
  <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"><br /><h3>直接获得中国股票GIF分时走势图(545*300pixel/72dpi)</h3><p>输入参数:theStockCode = 股票代号,如:sh000001; 返回数据:股票GIF分时走势图。</p><br /></wsdl:documentation>
  <wsdl:input message="tns:getStockImageByCodeHttpGetIn" />
  <wsdl:output message="tns:getStockImageByCodeHttpGetOut" />
  </wsdl:operation>
- <wsdl:operation name="getStockImageByteByCode">
  <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"><br /><h3>获得中国股票GIF分时走势图字节数组</h3><p>输入参数:theStockCode = 股票代号,如:sh000001; 返回数据:股票GIF分时走势图字节数组。<br /><strong>字节流到图片可以参考以下方法</strong>(.NET vb):<br />HttpContext.Current.Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache) '不缓存<br />HttpContext.Current.Response.ClearContent()<br />HttpContext.Current.Response.ContentType = "image/Gif"<br />HttpContext.Current.Response.BinaryWrite(Ary) 'Ary 图片字节数组<br />HttpContext.Current.Response.End()</p><br /></wsdl:documentation>
  <wsdl:input message="tns:getStockImageByteByCodeHttpGetIn" />
  <wsdl:output message="tns:getStockImageByteByCodeHttpGetOut" />
  </wsdl:operation>
- <wsdl:operation name="getStockImage_kByCode">
  <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"><br /><h3>直接获得中国股票GIF日/周/月 K 线图(545*300pixel/72dpi)</h3><p>输入参数:theStockCode = 股票代号,如:sh000001;theType = K 线图类型(D:日[默认]、W:周、M:月),返回数据:股票GIF日 K 线图。</p><br /></wsdl:documentation>
  <wsdl:input message="tns:getStockImage_kByCodeHttpGetIn" />
  <wsdl:output message="tns:getStockImage_kByCodeHttpGetOut" />
  </wsdl:operation>
- <wsdl:operation name="getStockImage_kByteByCode">
  <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"><br /><h3>获得中国股票GIF日/周/月 K 线图字节数组</h3><p>输入参数:theStockCode = 股票代号,如:sh000001;theType = K 线图类型(D:日[默认]、W:周、M:月),返回数据:股票GIF日 K 线图字节数组。</p><br /></wsdl:documentation>
  <wsdl:input message="tns:getStockImage_kByteByCodeHttpGetIn" />
  <wsdl:output message="tns:getStockImage_kByteByCodeHttpGetOut" />
  </wsdl:operation>
- <wsdl:operation name="getStockInfoByCode">
  <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"><br /><h3>获得中国股票及时行情 String()</h3><p>输入参数:theStockCode = 股票代号,如:sh000001; 返回数据:一个一维字符串数组 String(24),结构为:String(0)股票代号、String(1)股票名称、String(2)行情时间、String(3)最新价(元)、String(4)昨收盘(元)、String(5)今开盘(元)、String(6)涨跌额(元)、String(7)最低(元)、String(8)最高(元)、String(9)涨跌幅(%)、String(10)成交量(手)、String(11)成交额(万元)、String(12)竞买价(元)、String(13)竞卖价(元)、String(14)委比(%)、String(15)-String(19)买一 - 买五(元)/手、String(20)-String(24)卖一 - 卖五(元)/手。</p><br /></wsdl:documentation>
  <wsdl:input message="tns:getStockInfoByCodeHttpGetIn" />
  <wsdl:output message="tns:getStockInfoByCodeHttpGetOut" />
  </wsdl:operation>
  </wsdl:portType>
- <wsdl:portType name="ChinaStockWebServiceHttpPost">
- <wsdl:operation name="getStockImageByCode">
  <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"><br /><h3>直接获得中国股票GIF分时走势图(545*300pixel/72dpi)</h3><p>输入参数:theStockCode = 股票代号,如:sh000001; 返回数据:股票GIF分时走势图。</p><br /></wsdl:documentation>
  <wsdl:input message="tns:getStockImageByCodeHttpPostIn" />
  <wsdl:output message="tns:getStockImageByCodeHttpPostOut" />
  </wsdl:operation>
- <wsdl:operation name="getStockImageByteByCode">
  <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"><br /><h3>获得中国股票GIF分时走势图字节数组</h3><p>输入参数:theStockCode = 股票代号,如:sh000001; 返回数据:股票GIF分时走势图字节数组。<br /><strong>字节流到图片可以参考以下方法</strong>(.NET vb):<br />HttpContext.Current.Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache) '不缓存<br />HttpContext.Current.Response.ClearContent()<br />HttpContext.Current.Response.ContentType = "image/Gif"<br />HttpContext.Current.Response.BinaryWrite(Ary) 'Ary 图片字节数组<br />HttpContext.Current.Response.End()</p><br /></wsdl:documentation>
  <wsdl:input message="tns:getStockImageByteByCodeHttpPostIn" />
  <wsdl:output message="tns:getStockImageByteByCodeHttpPostOut" />
  </wsdl:operation>
- <wsdl:operation name="getStockImage_kByCode">
  <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"><br /><h3>直接获得中国股票GIF日/周/月 K 线图(545*300pixel/72dpi)</h3><p>输入参数:theStockCode = 股票代号,如:sh000001;theType = K 线图类型(D:日[默认]、W:周、M:月),返回数据:股票GIF日 K 线图。</p><br /></wsdl:documentation>
  <wsdl:input message="tns:getStockImage_kByCodeHttpPostIn" />
  <wsdl:output message="tns:getStockImage_kByCodeHttpPostOut" />
  </wsdl:operation>
- <wsdl:operation name="getStockImage_kByteByCode">
  <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"><br /><h3>获得中国股票GIF日/周/月 K 线图字节数组</h3><p>输入参数:theStockCode = 股票代号,如:sh000001;theType = K 线图类型(D:日[默认]、W:周、M:月),返回数据:股票GIF日 K 线图字节数组。</p><br /></wsdl:documentation>
  <wsdl:input message="tns:getStockImage_kByteByCodeHttpPostIn" />
  <wsdl:output message="tns:getStockImage_kByteByCodeHttpPostOut" />
  </wsdl:operation>
- <wsdl:operation name="getStockInfoByCode">
  <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"><br /><h3>获得中国股票及时行情 String()</h3><p>输入参数:theStockCode = 股票代号,如:sh000001; 返回数据:一个一维字符串数组 String(24),结构为:String(0)股票代号、String(1)股票名称、String(2)行情时间、String(3)最新价(元)、String(4)昨收盘(元)、String(5)今开盘(元)、String(6)涨跌额(元)、String(7)最低(元)、String(8)最高(元)、String(9)涨跌幅(%)、String(10)成交量(手)、String(11)成交额(万元)、String(12)竞买价(元)、String(13)竞卖价(元)、String(14)委比(%)、String(15)-String(19)买一 - 买五(元)/手、String(20)-String(24)卖一 - 卖五(元)/手。</p><br /></wsdl:documentation>
  <wsdl:input message="tns:getStockInfoByCodeHttpPostIn" />
  <wsdl:output message="tns:getStockInfoByCodeHttpPostOut" />
  </wsdl:operation>
  </wsdl:portType>

马上就完了,坚持一会
下面是数据绑定(soap绑定),soapAction相当于我们的mvc中的c做流程控制的,要不服务器上它找谁去啊。style是定义文档样式 soapbody use指定使用那种类型传递soap文中说文本型  soap12是xml的标签这里也说明采用soap1.2协议版本


- <wsdl:binding name="ChinaStockWebServiceSoap" type="tns:ChinaStockWebServiceSoap">
  <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="getStockImageByCode">
  <soap:operation soapAction="http://WebXml.com.cn/getStockImageByCode" style="document" />
- <wsdl:input>
  <soap:body use="literal" />
  </wsdl:input>
- <wsdl:output>
  <soap:body use="literal" />
  </wsdl:output>
  </wsdl:operation>
- <wsdl:operation name="getStockImageByteByCode">
  <soap:operation soapAction="http://WebXml.com.cn/getStockImageByteByCode" style="document" />
- <wsdl:input>
  <soap:body use="literal" />
  </wsdl:input>
- <wsdl:output>
  <soap:body use="literal" />
  </wsdl:output>
  </wsdl:operation>
- <wsdl:operation name="getStockImage_kByCode">
  <soap:operation soapAction="http://WebXml.com.cn/getStockImage_kByCode" style="document" />
- <wsdl:input>
  <soap:body use="literal" />
  </wsdl:input>
- <wsdl:output>
  <soap:body use="literal" />
  </wsdl:output>
  </wsdl:operation>
- <wsdl:operation name="getStockImage_kByteByCode">
  <soap:operation soapAction="http://WebXml.com.cn/getStockImage_kByteByCode" style="document" />
- <wsdl:input>
  <soap:body use="literal" />
  </wsdl:input>
- <wsdl:output>
  <soap:body use="literal" />
  </wsdl:output>
  </wsdl:operation>
- <wsdl:operation name="getStockInfoByCode">
  <soap:operation soapAction="http://WebXml.com.cn/getStockInfoByCode" style="document" />
- <wsdl:input>
  <soap:body use="literal" />
  </wsdl:input>
- <wsdl:output>
  <soap:body use="literal" />
  </wsdl:output>
  </wsdl:operation>
  </wsdl:binding>
- <wsdl:binding name="ChinaStockWebServiceSoap12" type="tns:ChinaStockWebServiceSoap">
  <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="getStockImageByCode">
  <soap12:operation soapAction="http://WebXml.com.cn/getStockImageByCode" style="document" />
- <wsdl:input>
  <soap12:body use="literal" />
  </wsdl:input>
- <wsdl:output>
  <soap12:body use="literal" />
  </wsdl:output>
  </wsdl:operation>
- <wsdl:operation name="getStockImageByteByCode">
  <soap12:operation soapAction="http://WebXml.com.cn/getStockImageByteByCode" style="document" />
- <wsdl:input>
  <soap12:body use="literal" />
  </wsdl:input>
- <wsdl:output>
  <soap12:body use="literal" />
  </wsdl:output>
  </wsdl:operation>
- <wsdl:operation name="getStockImage_kByCode">
  <soap12:operation soapAction="http://WebXml.com.cn/getStockImage_kByCode" style="document" />
- <wsdl:input>
  <soap12:body use="literal" />
  </wsdl:input>
- <wsdl:output>
  <soap12:body use="literal" />
  </wsdl:output>
  </wsdl:operation>
- <wsdl:operation name="getStockImage_kByteByCode">
  <soap12:operation soapAction="http://WebXml.com.cn/getStockImage_kByteByCode" style="document" />
- <wsdl:input>
  <soap12:body use="literal" />
  </wsdl:input>
- <wsdl:output>
  <soap12:body use="literal" />
  </wsdl:output>
  </wsdl:operation>
- <wsdl:operation name="getStockInfoByCode">
  <soap12:operation soapAction="http://WebXml.com.cn/getStockInfoByCode" style="document" />
- <wsdl:input>
  <soap12:body use="literal" />
  </wsdl:input>
- <wsdl:output>
  <soap12:body use="literal" />
  </wsdl:output>
  </wsdl:operation>
  </wsdl:binding>
- <wsdl:binding name="ChinaStockWebServiceHttpGet" type="tns:ChinaStockWebServiceHttpGet">
  <http:binding verb="GET" />
- <wsdl:operation name="getStockImageByCode">
  <http:operation location="/getStockImageByCode" />
- <wsdl:input>
  <http:urlEncoded />
  </wsdl:input>
  <wsdl:output />
  </wsdl:operation>
- <wsdl:operation name="getStockImageByteByCode">
  <http:operation location="/getStockImageByteByCode" />
- <wsdl:input>
  <http:urlEncoded />
  </wsdl:input>
- <wsdl:output>
  <mime:mimeXml part="Body" />
  </wsdl:output>
  </wsdl:operation>
- <wsdl:operation name="getStockImage_kByCode">
  <http:operation location="/getStockImage_kByCode" />
- <wsdl:input>
  <http:urlEncoded />
  </wsdl:input>
  <wsdl:output />
  </wsdl:operation>
- <wsdl:operation name="getStockImage_kByteByCode">
  <http:operation location="/getStockImage_kByteByCode" />
- <wsdl:input>
  <http:urlEncoded />
  </wsdl:input>
- <wsdl:output>
  <mime:mimeXml part="Body" />
  </wsdl:output>
  </wsdl:operation>
- <wsdl:operation name="getStockInfoByCode">
  <http:operation location="/getStockInfoByCode" />
- <wsdl:input>
  <http:urlEncoded />
  </wsdl:input>
- <wsdl:output>
  <mime:mimeXml part="Body" />
  </wsdl:output>
  </wsdl:operation>
  </wsdl:binding>
- <wsdl:binding name="ChinaStockWebServiceHttpPost" type="tns:ChinaStockWebServiceHttpPost">
  <http:binding verb="POST" />
- <wsdl:operation name="getStockImageByCode">
  <http:operation location="/getStockImageByCode" />
- <wsdl:input>
  <mime:content type="application/x-www-form-urlencoded" />
  </wsdl:input>
  <wsdl:output />
  </wsdl:operation>
- <wsdl:operation name="getStockImageByteByCode">
  <http:operation location="/getStockImageByteByCode" />
- <wsdl:input>
  <mime:content type="application/x-www-form-urlencoded" />
  </wsdl:input>
- <wsdl:output>
  <mime:mimeXml part="Body" />
  </wsdl:output>
  </wsdl:operation>
- <wsdl:operation name="getStockImage_kByCode">
  <http:operation location="/getStockImage_kByCode" />
- <wsdl:input>
  <mime:content type="application/x-www-form-urlencoded" />
  </wsdl:input>
  <wsdl:output />
  </wsdl:operation>
- <wsdl:operation name="getStockImage_kByteByCode">
  <http:operation location="/getStockImage_kByteByCode" />
- <wsdl:input>
  <mime:content type="application/x-www-form-urlencoded" />
  </wsdl:input>
- <wsdl:output>
  <mime:mimeXml part="Body" />
  </wsdl:output>
  </wsdl:operation>
- <wsdl:operation name="getStockInfoByCode">
  <http:operation location="/getStockInfoByCode" />
- <wsdl:input>
  <mime:content type="application/x-www-form-urlencoded" />
  </wsdl:input>
- <wsdl:output>
  <mime:mimeXml part="Body" />
  </wsdl:output>
  </wsdl:operation>
  </wsdl:binding>

最后一节是webservice的名称和一些数据地址绑定uri好像更确切些

- <wsdl:service name="ChinaStockWebService">
  <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"><a href="http://www.webxml.com.cn/" target="_blank">WebXml.com.cn</a> <strong>中国股票行情数据 WEB 服务(支持深圳和上海股市的全部基金、债券和股票)</strong>,数据即时更新。输出GIF分时走势图、日/周/月 K 线图、及时行情数据(股票名称、行情时间、最新价、昨收盘、今开盘、涨跌额、最低、最高、涨跌幅、成交量、成交额、竞买价、竞卖价、委比、买一 - 买五、卖一 - 卖五)。此中国股票行情数据 WEB 服务仅作为用户获取信息之目的,并不构成投资建议。<a href="http://www.webxml.com.cn/" target="_blank">WebXml.com.cn</a> 和/或其各供应商不为本页面提供信息的错误、残缺、延迟或因依靠此信息所采取的任何行动负责。<strong>市场有风险,投资需谨慎</strong>。<br />此中国股票行情数据Web Services请不要用于任何商业目的,若有需要请<a href="http://www.webxml.com.cn/zh_cn/contact_us.aspx" target="_blank">联系我们</a>,欢迎技术交流。 QQ:8698053<br /><strong>使用本站 WEB 服务请注明或链接本站:http://www.webxml.com.cn/ 感谢大家的支持</strong>!<br /><br /><span style="color:#D20000;"><strong>股票输入注意事项</strong>:因上海股票和深圳股票在代号上有重叠,所以在输入上海股票请在代号前加 SH,深圳加 SZ(不区分大小写),例:上证指数 sh000001,深发展A sz000001。如不输入股票代号默认上证指数 sh000001</span><br /><br />&nbsp;</wsdl:documentation>
- <wsdl:port name="ChinaStockWebServiceSoap" binding="tns:ChinaStockWebServiceSoap">
  <soap:address location="http://www.webxml.com.cn/WebServices/ChinaStockWebService.asmx" />
  </wsdl:port>
- <wsdl:port name="ChinaStockWebServiceSoap12" binding="tns:ChinaStockWebServiceSoap12">
  <soap12:address location="http://www.webxml.com.cn/WebServices/ChinaStockWebService.asmx" />
  </wsdl:port>
- <wsdl:port name="ChinaStockWebServiceHttpGet" binding="tns:ChinaStockWebServiceHttpGet">
  <http:address location="http://www.webxml.com.cn/WebServices/ChinaStockWebService.asmx" />
  </wsdl:port>
- <wsdl:port name="ChinaStockWebServiceHttpPost" binding="tns:ChinaStockWebServiceHttpPost">
  <http:address location="http://www.webxml.com.cn/WebServices/ChinaStockWebService.asmx" />
  </wsdl:port>
  </wsdl:service>
  </wsdl:definitions>
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics