【Web Services】建立過程之四(完) (轉)

worldblog發表於2007-12-09
【Web Services】建立過程之四(完) (轉)[@more@]

作為對 services的建立過程的文章,在最後一篇,作者列舉了一個例項:

附例項: 
 
 <? version="1.0" ?>
 <serviceDescription Xmlns:s0="" name="Security" targetNamespace=""
 Xmlns="urn:schemas-Xmlp-org:sdl.2000-01-25">
 <soap Xmlns="urn:schemas-Xmlsoap-org:soap-sdl-2000-01-25">
 <service>
 <addresses>
 <address uri="x/SampleService.asmx" />
 </addresses>
 <requestResponse name="GetSecurityInfo" soapAction="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="/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="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="" attributeFormDefault="qualified"
 elementFormDefault="qualified" Xmlns="">
 <element name="GetSecurityInfo">
 <complexType>
 <all>
 <element name="Code" Xmlns:q1="" 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="" type="q2:string" nullable="true" />
 <element name="CompanyName" Xmlns:q3="" type="q3:string" nullable="true" />
 <element name="Price" Xmlns:q4="" type="q4:double" />
 </all>
 </complexType>
 <element name="SecurityInfo" type="s0:SecurityInfo" />
 </schema>
 </serviceDescription>


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10752043/viewspace-990181/,如需轉載,請註明出處,否則將追究法律責任。

相關文章