【Web Services】创建过程之四(完) (转)

【Web Services】创建过程之四(完) (转)[@more@]

作为对web services的创建过程的文章,在最后一篇,作者列举了一个实例:

附实例: 
 
 <?XML version="1.0" ?>
 <serviceDescription Xmlns:s0="http://tempuri.org/" name="Securitywebservice" targetNamespace="http://tempuri.org/"
 Xmlns="urn:schemas-XmlSOAp-org:sdl.2000-01-25">
 <soap Xmlns="urn:schemas-Xmlsoap-org:soap-sdl-2000-01-25">
 <service>
 <addresses>
 <address uri="http://localhost/work/ASPx/SampleService.asmx" />
 </addresses>
 <requestResponse name="GetSecurityInfo" soapAction="http://tempuri.org/GetSecurityInfo">
 <request ref="s0:GetSecurityInfo" />
 <response ref="s0:GetSecurityInfoResult" />
 <info>This method call will get the company name and the price for a given security code.</info>
 </requestResponse>
 </service>
 </soap>
 <httppost Xmlns="urn:schemas-Xmlsoap-org:post-sdl-2000-01-25">
 <service>
 <requestResponse name="GetSecurityInfo" href="http://localhost/work/aspx/SampleService.asmx/GetSecurityInfo">
 <request>
 <form>
 <input name="Code" />
 </form>
 </request>
 <response>
 <mimeXml ref="s0:SecurityInfo" />
 </response>
 <info>This method call will get the company name and the price for a given security code.</info>
 </requestResponse>
 </service>
 </httppost>
 <httpget Xmlns="urn:schemas-Xmlsoap-org:get-sdl-2000-01-25">
 <service>
 <requestResponse name="GetSecurityInfo" href="http://localhost/work/aspx/SampleService.asmx/GetSecurityInfo">
 <request>
 <param name="Code" />
 </request>
 <response>
 <mimeXml ref="s0:SecurityInfo" />
 </response>
 <info>This method call will get the company name and the price for a given security code.</info>
 </requestResponse>
 </service>
 </httpget>
 <schema targetNamespace="http://tempuri.org/" attributeFormDefault="qualified"
 elementFormDefault="qualified" Xmlns="http://www.w3.org/1999/XmlSchema">
 <element name="GetSecurityInfo">
 <complexType>
 <all>
 <element name="Code" Xmlns:q1="http://www.w3.org/1999/XmlSchema" type="q1:string" nullable="true" />
 </all>
 </complexType>
 </element>
 <element name="GetSecurityInfoResult">
 <complexType>
 <all>
 <element name="result" type="s0:SecurityInfo" />
 </all>
 </complexType>
 </element>
 <complexType name="SecurityInfo">
 <all>
 <element name="Code" Xmlns:q2="http://www.w3.org/1999/XmlSchema" type="q2:string" nullable="true" />
 <element name="CompanyName" Xmlns:q3="http://www.w3.org/1999/XmlSchema" type="q3:string" nullable="true" />
 <element name="Price" Xmlns:q4="http://www.w3.org/1999/XmlSchema" type="q4:double" />
 </all>
 </complexType>
 <element name="SecurityInfo" type="s0:SecurityInfo" />
 </schema>
 </serviceDescription>


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10752043/viewspace-990181/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/10752043/viewspace-990181/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值