怎样创建.NET Web Service(4)

2016-01-29 19:33 2 1 收藏

怎样创建.NET Web Service(4),怎样创建.NET Web Service(4)

【 tulaoshi.com - ASP 】

       附实例A
  
  <?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>
  
  

 

来源:https://www.tulaoshi.com/n/20160129/1509676.html

延伸阅读
.NET之ASP Web Application快速入门(4) Application 或 Session作用范围内的对象 在Global.asax文件中,我们可以通过object标记定义静态对象,这些对象可以是.NET框架类,也可以是经典的COM组件。其作用范围可以是appinstance、session或者application中的任一种。如果一个对象的作用范围是Appinstance,就表示这个对象明确属于HttpAppli...
标签: Web开发
c# JSON返回格式的WEB SERVICEhttp://www.jb51.net/article/16768.htm 我这里是利用axis创建类包的,首先下载axis的压缩包,然后解压,把axis放到webapp下面。如果可以运行,就OK了。   c#创建的webservice自带的wsdl的,直接可以加上?wsdl访问,然后利用axis生成类: java -classpath ".;commons-logging.jar;axis.jar;co...
标签: 电脑入门
环境:win7、win2008 搜索cmd, 右键"run as admimistarator",打开cmd后运行命令: sc create NCPRetrieverService binPath= "D:ProductionApplicationNCPNotificationRetriever NotificationRetriever.exe"
XML Web Service 数据交换 客户端调用服务器端的 Web 服务并传递包含数据的 DataSet (ds): Private Sub Synchronize() Dim username As String = "JohnS" Dim blnSuccess As Boolean ' 使用 XML Web Service 进行同步 Cursor.Current = Cursors.WaitCursor Dim wsFeedback As New wsFeedback.feedback blnSuccess = wsFeedback.In...
说道Web Service的程序开发,八个月前我加班调试公司和中国电信的商务领航系统的接口的时候,用的就是Web Service,Web Service有很多优点,使用Web Service可以在不同编程语言间实现数据交换,而我那时对Web Service也不熟,就由同事帮我生成了一大堆Web Service的框架代码,我则只单独开发业务代码。 这次的另外一个项目也要用Web Service...

经验教程

965

收藏

23
微博分享 QQ分享 QQ空间 手机页面 收藏网站 回到头部