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

推荐订阅源

H
Help Net Security
博客园 - Franky
GbyAI
GbyAI
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
爱范儿
爱范儿
IT之家
IT之家
酷 壳 – CoolShell
酷 壳 – CoolShell
aimingoo的专栏
aimingoo的专栏
博客园_首页
MongoDB | Blog
MongoDB | Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Recent Announcements
Recent Announcements
Scott Helme
Scott Helme
有赞技术团队
有赞技术团队
M
MIT News - Artificial intelligence
C
CERT Recently Published Vulnerability Notes
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Jina AI
Jina AI
F
Fortinet All Blogs
N
Netflix TechBlog - Medium
L
LangChain Blog
L
LINUX DO - 最新话题
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
H
Hacker News: Front Page
MyScale Blog
MyScale Blog
P
Palo Alto Networks Blog
G
Google Developers Blog
Google DeepMind News
Google DeepMind News
AI
AI
T
Troy Hunt's Blog
Microsoft Azure Blog
Microsoft Azure Blog
阮一峰的网络日志
阮一峰的网络日志
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Vercel News
Vercel News
Microsoft Security Blog
Microsoft Security Blog
罗磊的独立博客
S
Secure Thoughts
大猫的无限游戏
大猫的无限游戏
博客园 - 叶小钗
人人都是产品经理
人人都是产品经理
Blog — PlanetScale
Blog — PlanetScale
博客园 - 司徒正美
Apple Machine Learning Research
Apple Machine Learning Research
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 三生石上(FineUI控件)
S
Security @ Cisco Blogs
Cloudbric
Cloudbric
E
Exploit-DB.com RSS Feed
Attack and Defense Labs
Attack and Defense Labs

博客园 - 丁丁

Running Knoppix 6.7.1 in a Sandisk Ultra flash drive to do GAE programming via PyCharm Fast fill huge number of same value to below cells in Excel How to install Windows 7 on the 6 years IBM X60 notebook Python 2.5 SSL package version 1.15 for GAE A GAE based blog, Micolog 7.412 with Django 1.2 enable Price compare: Sina App Engine vs Google App Engine IE9 is a little faster than Firefox6 in Speed Reading performance test but so less SDLC (Systems Development Life Cycle) Brief Terminology & Workflow 成功凤凰刷机刷出诺基亚E5系统版本042.014纯净简体中文版 How to using Windows Live Writer on umbraco - 丁丁 用PowerShell强制添加IE本身无法添加的RSS Feeds Getting Help on WMI Methods - 丁丁 [PowerShell]One line to pack individual PDF file into their BaseName.RAR - 丁丁 My first time meet ORA-600 error, quite memorable moment. Camstar InSite 3 server transaction log file profiler, source code included Setting up the Matlab Database Toolbox to connecting to Oracle DB 在Ubuntu 8.04 x86_64上安装Oracle 10g XE和Oracle Application Express(apex) 3.1.1 究竟何时买房才最合适?写于2008年3月 代码小片断,自动对文本分行的C#函数
合并不同WebService之间的相同对象类型
丁丁 · 2008-04-30 · via 博客园 - 丁丁

在.NET中使用WebService极其简单,只要添加Web引用即可,然后IDE就会帮你搞定所有一切,但这样做有个缺点,VS.2005的IDE生成的对应每个Web Service的WebServiceProxy类都有自己独立的命名空间,这导致了即使相同的.NET类型,发布在不同的WebService之后,生成的WebServiceProxy类型都在各自的独立命名空间中,结果就是在客户端中使用这些.NET类很麻烦。

其实在.NET中共享不同Web Service只见相同的对象类型是完全可以的,使用命令行方式调用wsdl.exe就可以:

"C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\wsdl.exe" /nologo /language:cs /sharetypes /out:MES_WebService.cs /namespace:TRG_MES.MES_WebService http://localhost/MES_Srv/WIP_Workflow.asmx?WSDL http://localhost/MES_Srv/WIP_Transaction.asmx?WSDL http://localhost/MES_Srv/SYS_SiteInfo.asmx?WSDL http://localhost/MES_Srv/RAS_Equipment.asmx?WSDL

如果要将这条命令集成到IDE的自动生成中,可以在菜单->项目->属性->生成事件中,预生成事件命令行中填入:

$(ProjectDir)generateProxy.bat /out:$(ProjectDir)MES_WebService.cs

generateProxy.bat中内容如下:

"C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\wsdl.exe" /nologo /language:cs /sharetypes %1 /namespace:TRG_MES.MES_WebService http://localhost/MES_Srv/WIP_Workflow.asmx?WSDL http://localhost/MES_Srv/WIP_Transaction.asmx?WSDL http://localhost/MES_Srv/SYS_SiteInfo.asmx?WSDL http://localhost/MES_Srv/RAS_Equipment.asmx?WSDL