WebService-面向服务编程SOA

WebService-远程通信

运行效果:

1:添加服务器引用http://www.webxml.com.cn/WebServices/WeatherWebService.asmx

添加表格

<?xml version="1.0" encoding="utf-8"?>
<!--
有关如何配置 ASP.NET 应用程序的详细信息,请访问
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
</system.web>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="WebService1Soap" />
<binding name="WeatherWebServiceSoap" />
</basicHttpBinding>
<customBinding>
<binding name="WeatherWebServiceSoap12">
<textMessageEncoding messageVersion="Soap12" />
<httpTransport />
</binding>
</customBinding>
</bindings>
<client>
<endpoint address="http://localhost:50382/WebService1.asmx" binding="basicHttpBinding"
bindingConfiguration="WebService1Soap" contract="ServiceReference1.WebService1Soap"
name="WebService1Soap" />
<endpoint address="http://www.webxml.com.cn/WebServices/WeatherWebService.asmx"
binding="basicHttpBinding" bindingConfiguration="WeatherWebServiceSoap"
contract="ServiceReference3.WeatherWebServiceSoap" name="WeatherWebServiceSoap" /> </client>
</system.serviceModel>
</configuration>

webConfig文件

using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls; namespace BBFJ.WebFormApp
{
public partial class Index : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
//ServiceReference1.WebService1SoapClient client = new ServiceReference1.WebService1SoapClient();
//int sum = client.Add(3,6);
//Response.Write(sum);
//Response.Write(client.LoadUserInfoList()); ServiceReference3.WeatherWebServiceSoapClient client = new ServiceReference3.WeatherWebServiceSoapClient(); DataSet ds = client.getSupportDataSet();
this.GridView1.DataSource = ds.Tables[0];
this.GridView1.DataBind();
}
}
}

Index

WebService简介-02的更多相关文章

  1. Webservice简介

    一.序言 大家或多或少都听过WebService(Web服务),有一段时间很多计算机期刊.书籍和网站都大肆的提及和宣传WebService技术,其中不乏很多吹嘘和做广告的成分.但是不得不承认的是Web ...

  2. webservice简介以及简单使用

    本文主要是简单的介绍webservice是什么.webservice的由来.webservice的作用,以及后面会介绍webservice的使用. webservice是什么? 目前,Web serv ...

  3. webservice简介及客户端搭建

    在环境变量中,CLASSPATH添加D:\apache-cxf-2.4.2\lib 新建CXF_HOME   D:\apache-cxf-2.4.2 在PATH中添加   D:\apache-cxf- ...

  4. 分布式系列六: WebService简介

    WebSerice盛行的时代已经过去, 这里只是简单介绍下其基本概念, 并用JDK自带的API实现一个简单的服务. WebSerice的概念 WebService是一种跨平台和跨语言的远程调用(RPC ...

  5. WebService系列一:WebService简介

    原文链接:http://www.cnblogs.com/xdp-gacl/p/4259109.html 一.WebService是什么 WebService是一种跨编程语言和跨操作系统平台的远程调用技 ...

  6. Restful WebService简介

    RESTful Web Services已经渐渐開始流行, 主要是用于解决异构系统之间的通信问题.非常多站点和应用提供的API,都是基于RESTful风格的Web Services,比較就有Googl ...

  7. C#-WebService基础02

    WebService WSDL是web service的交换格式 跨平台数据交互 什么是web服务 SOA 面向服务的体系结构  service-Oriented Architecture Servi ...

  8. 04 Spring:01.Spring框架简介&&02.程序间耦合&&03.Spring的 IOC 和 DI&&08.面向切面编程 AOP&&10.Spring中事务控制

    spring共四天 第一天:spring框架的概述以及spring中基于XML的IOC配置 第二天:spring中基于注解的IOC和ioc的案例 第三天:spring中的aop和基于XML以及注解的A ...

  9. Android使用ksoap2调用C#中的webservice实现图像上传

    目录: 一. android使用ksoap2调用webservice 二. 异步调用 三. Android使用ksoap2调用C#中的webservice实现图像上传参考方法 四. 图像传输中Base ...

随机推荐

  1. Codeforces 950 D. A Leapfrog in the Array

    http://codeforces.com/contest/950/problem/D 前n/2个格子的奇数下标的数没有参与移动 候n/2个格子的奇数下标的数一定是一路移向偶数下标移 所以还原数的初始 ...

  2. Neural Networks and Deep Learning 课程笔记(第三周)浅层神经网络(Shallow neural networks)

    3.1 神经网络概述(Neural Network Overview ) (神经网络中,我们要反复计算a和z,最终得到最后的loss function) 3.2 神经网络的表示(Neural Netw ...

  3. Prezento – 轻量、简单的 jQuery 幻灯片插件

    Prezento 是一个超级简单的 jQuery 幻灯片插件.可以让你网页以新颖的交互方式呈现.另外,Prezento 支持响应式设计,配置项也很灵活,可以根据你需要的效果配置. 您可能感兴趣的相关文 ...

  4. Mac改键软件Karabiner使用教程

    Mac改键软件Karabiner使用教程 目前Mac上比较好用的改键软件是Karabiner,不过对于最新的Sierra系统,Karabiner失效了.这里介绍的实际上是Karabiner-Eleme ...

  5. Hadoop mapreduce执行过程涉及api

    资源的申请,分配过程略过,从开始执行开始. mapper阶段: 首先调用默认的PathFilter进行文件过滤,确定哪些输入文件是需要的哪些是不需要的,然后调用inputFormat的getSplit ...

  6. android BroadcastReceiver组件简单的使用

    1.清单文件 <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android=& ...

  7. CF949D Curfew

    传送门 跟这个大佬学的->戳我 假设只有一个宿管,那么从前往后做的过程中,如果能到达某个寝室范围内的人数不够\(b\),那么不如把这个寝室空出来,这样更有利于后面的抉择;反之,就把这个寝室搞正好 ...

  8. maven私服内容补充

    1.添加阿里云中央仓库 注意Download Remote Indexes选项为True 1.登陆nexus私服(默认账号密码:admin/admin123) 2.点击右侧Repositories 3 ...

  9. Python 对图片进行人脸识别

    import cv2 def detect(path): img = cv2.imread(path) cascade = cv2.CascadeClassifier("/vagrant/d ...

  10. WinEdt 和 Sumatra 双向关联设置

    (1)配置PDF Viewer,在菜单栏选Options -> Execution Modes ->PDF Viewer ->点击右侧的"Browse"按钮,在弹 ...