惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

W
WeLiveSecurity
T
Tenable Blog
Project Zero
Project Zero
C
Cybersecurity and Infrastructure Security Agency CISA
T
The Exploit Database - CXSecurity.com
P
Palo Alto Networks Blog
S
Schneier on Security
Scott Helme
Scott Helme
S
Securelist
Know Your Adversary
Know Your Adversary
Vercel News
Vercel News
IT之家
IT之家
V
V2EX
F
Fortinet All Blogs
Simon Willison's Weblog
Simon Willison's Weblog
K
Kaspersky official blog
博客园_首页
T
Tailwind CSS Blog
The GitHub Blog
The GitHub Blog
Spread Privacy
Spread Privacy
Microsoft Security Blog
Microsoft Security Blog
Cisco Talos Blog
Cisco Talos Blog
The Register - Security
The Register - Security
有赞技术团队
有赞技术团队
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Cyberwarzone
Cyberwarzone
Google DeepMind News
Google DeepMind News
The Hacker News
The Hacker News
L
LINUX DO - 热门话题
Hugging Face - Blog
Hugging Face - Blog
博客园 - 三生石上(FineUI控件)
A
Arctic Wolf
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
C
CXSECURITY Database RSS Feed - CXSecurity.com
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
Threat Research - Cisco Blogs
P
Proofpoint News Feed
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
P
Privacy & Cybersecurity Law Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
CERT Recently Published Vulnerability Notes
S
SegmentFault 最新的问题
AWS News Blog
AWS News Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
罗磊的独立博客
Apple Machine Learning Research
Apple Machine Learning Research
P
Proofpoint News Feed
The Cloudflare Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
Vulnerabilities – Threatpost

博客园 - yiyisawa

岁月如梭 wcf client与webservice通信备注 将wcf 以webservice的方式调用 WPF界面 -----类似于visual studio中浮动窗体风格的界面(以下地址提供源码下载) BackgroundWorker学习一 vs 工具技巧手册 silverlight发布注意事项 silverlight beta2初步研究结论 Visual Studio 2005 Team Foundation Server (TFS)单服务器安装记 从今天起 乱弹 盲山有感 路边见闻 月夜奔跑 无题 童年拾忆 梦想高歌 一个用Regex的完成sql语句中字段替换的demo 《勇敢抉择》摘录一
wcf client与webservice通信(-)只修改配置文件而改变服务端
yiyisawa · 2008-12-16 · via 博客园 - yiyisawa

问题: 假设有一个大型系统新版本使用wcf 作为服务端,生成wcf client 调用可以调用正常。 那如果当wcf 服务端出现问题或其他的原因我想再用回以前老版本的webservice或是jms server ,但客户端调用还是通过wcf client 调用。只通过更改配置来实现。

 一、web service项目,添加一个普通service class .代码如下:

Code

webservice配置文件无需更改。运行。记录服务地址。

二、打开路径C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin:找到svcutil.exe文件。开始菜单-->run --> input cmd --->cd C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin -->回车;

输入svcutil http://localhost:8080/service/service.asmx,将会在C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin生成一个webservice的代理类。注意:此代理类是wcf client形式的。(在后面只需将这个代理类小作改动,便可用于wcf sevice.)

生成的代理类:

Code

三、添加Console Application,将上面生成的代理类加入项目中,并在Main方法中调用。

Code

添加配置文件:App.config.此配置文件在二步生成代理类的时候会有Out.config同时产生。config里面的内容拷过来即可。

Code

 将webservice运行起来,(也可host到iis 里去。)debug console application.即可看到结果。

回家吃饭了。

细节和要注意的地方在第二节中写出来。

项目下载地址:https://files.cnblogs.com/yiyisawa/wcfclienttowebservice.rar