Web Service Client使用Microsoft WSE 2.0
我安装了WSE 2.0 SP3,Setup Type选择Runtime。如果想要让Visual Studio 2005以上版本集成WSE需稍费周折,默认集成Visual Studio 2005。
1、引用Microsoft.Web.Services2.dll。
2、修改Visual Studio自动生成的Web Service Client,继承Microsoft.Web.Services2.WebServicesClientProtocol(如果Update Web Reference需要再次手动编辑)。
3、假设对方的Web Service需要提供WS-Securtiy简单的Username Token认证,但我们不需要对Response进行校验,需要实现自定义的UsernameTokenManager(不同的PasswordOption重写对应的VerifyPassword)。下面以PasswordOption.SendHashed为例:
public class CustomUsernameTokenManager : UsernameTokenManager
{
protected override void VerifyHashedPassword(UsernameToken token, String authenticatedPassword)
{ }
}
4、配置securityTokenManager:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="microsoft.web.services2"
type="Microsoft.Web.Services2.Configuration.WebServicesConfiguration, Microsoft.Web.Services2, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</configSections> <microsoft.web.services2>
<security>
<securityTokenManager xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
qname="wsse:UsernameToken"
type="Demo.CustomUsernameTokenManager, Demo"/>
</security>
</microsoft.web.services2>
</configuration>
Web Service Client使用Microsoft WSE 2.0的更多相关文章
- web service client端调用服务器接口
打开项目的web service client 其中wsdl URL http://www.51testing.com/html/55/67755-848510.html 去这里面查找一些公开的 ...
- .Net调用Java端带有WS-Security支持的Web Service各方案实战【转】
原文:http://www.xuebuyuan.com/641669.html 到现在为止,我们AEP平台已经发布很长一段时间了,也有很多ISV接入并上线了,就语言而言,目前主要有三类:Java..N ...
- 【转载】Using the Web Service Callbacks in the .NET Application
来源 This article describes a .NET Application model driven by the Web Services using the Virtual Web ...
- MyEclipse JAX-WS Web Service
在Myeclipse8.5下开发Web service程序,目前系统支持的开发框架有3个,JAX-WS,REST(JAX-RS),XFire.其中系统建议不要使用XFire 的框架,可能是要被淘汰了( ...
- MyEclipse XFire Web Service
我们在做系统集成时,经常会需要调用webservice接口,本文将讲解在myeclipse中建立一个webservice项目,编写接口和实现类, 并且发布webservice,最后在myeclipse ...
- Using UTL_DBWS to Make a Database 11g Callout to a Document Style Web Service
In this Document _afrLoop=100180147230187&id=841183.1&displayIndex=2&_afrWindowMode=0& ...
- MyEclipse构建Web Service(Xfire框架)
以下是本人原创,如若转载和使用请注明转载地址.本博客信息切勿用于商业,可以个人使用,若喜欢我的博客,请关注我,谢谢!博客地址 任务要求: 使用Xfire实现一个简单的CalculatorWebServ ...
- 【Java学习笔记】如何写一个简单的Web Service
本Guide利用Eclipse以及Ant建立一个简单的Web Service,以演示Web Service的基本开发过程: 1.系统条件: Eclipse Java EE IDE for Web De ...
- Java 调用Web service 加入认证头(soapenv:Header)
前言 有时候调用web service 会出现 Message does not conform to configured policy [ AuthenticationTokenPolicy(S) ...
随机推荐
- middle源码
CREATE TABLE `middle` ( `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, `innserSessionid` VARCHAR(250 ...
- JUnit 3一个例子就懂
JUnit is a simple framework to write repeatable tests. It is an instance of the xUnit architecture f ...
- greenplum日常维护手册
1. 数据库启动:gpstart 常用可选参数: -a : 直接启动,不提示终端用户输入确认 -m:只启动master 实例,主要在故障处理时使用 2. 数据库停止:gpsto ...
- vue select二级城市联动及第二级默认选中第一个option值
当二级联动比如选择国家的时候,希望选中一个国家的时候后面城市默认选中第一个城市,则给国家的select加一个@change事件就可以了 <div class="inputLine&qu ...
- PDF文件可以转换成txt文档吗
PDF是一种便携式的文件格式,传送和阅读都非常方便,是Adobe公司开发的跨平台文件格式,它无论在哪种打印机上都可以保证精确的颜色和准确的打印效果.可是有点遗憾的是PDF格式一般不能在手机上打开,或者 ...
- 多页Excel转换成PDF时如何保存为单独文件
通过ABBYY PDF Transformer+图文识别软件,使用PDF-XChange打印机将多页Excel工作簿转换成PDF文档(相关文章请参考ABBYY PDF Transformer+从MS ...
- 解决PHP中文乱码问题
1.指定链接字符串编码: $mysql_server_name="localhost"; //数据库服务器名称 $mysql_username="root"; ...
- 史上最强大的python selenium webdriver的包装
1.之前已经发过两次使用单浏览器了,但是这个最完美,此篇并没有使用任何单例模式的设计模式,用了实例属性结果缓存到类属性. 2.最简单的控制单浏览器是只实例化一次类,然后一直使用这个对象,但每个地方运行 ...
- okHttp3自用封装
okHttp都已经出到3.2.0了,现在才开始要用到它,感觉自己好low~~ 根据平时自己的习惯,还是自己做一下封装,让代码撸起来更加顺畅一点! okhttp-3.2.0和okio-1.7.0就不多说 ...
- C#调用Delphi的dll之详解
C#调用Delphi接口方法,有两种解决办法: 一.将Delphi程序编译成一个COM组件,然后在C#里引用COM组件. 二.非托管调用Dephi的DLL文件. 这里我们主要讲解一下第二种方法,讲第二 ...