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) ...
随机推荐
- 使用nginx反向代理解决前端跨域问题
1. 首先去Nginx官网下载一个最新版本的Nginx,下载地址:http://nginx.org/en/download.html.我这里下载的版本是:nginx/Windows-1.12.0.下载 ...
- Hadoop学习笔记——WordCount
1.在IDEA下新建工程,选择from Mevan GroupId:WordCount ArtifactId:com.hadoop.1st Project name:WordCount 2.pom.x ...
- 有关maven不能加载ojdbc14.jar解决方法
首先下载ojdbc14-10.2.0.4.0.jar这个包,然后在cmd下输入以下 mvn install:install-file -DgroupId=com.oracle -DartifactId ...
- 常用Linq示例代码
class Program { static void Main(string[] args) { //1. Aggregate int[] testArr = new int[] { 1, 2, ...
- WebGL 进入三维世界
1.观察目标点和上方向 为了确定观察者的状态,你需要获取两项信息:视点,即观察者的位置:观察目标点(look-at point),即被观察目标所在的点,它可以用来确定视线.此外,因为我们需要把观察到的 ...
- Sublime的Package Control安装方法
Package Control插件本身是一个为了方便管理插件的插件 最简单的方式是通过Sublime Text 3的console命令界面进行安装 Sublime text3 import urlli ...
- Java并发编程、内存模型与Volatile
http://www.importnew.com/24082.html volatile关键字 http://www.importnew.com/16142.html ConcurrentHash ...
- java TreeNode接口
今天写安卓程序见到一个方法getChildAt();不懂其用边去百度搜索了一下,看到了它的api,细致看看原来是在接口里面如今我把这个api贴给大家共享假设是操作xml我认为用这个非常方便 javax ...
- Linux+Redis实战教程_day03_4、通用redis命令【重点】
4.通用redis命令[重点] Redis五种数据类型,String,hash,list,set,有序set l keys pattern:获取所有与pattern匹配的key,返回所有与该key匹配 ...
- Dubbo -- 系统学习 笔记 -- 配置参考手册
Dubbo -- 系统学习 笔记 -- 目录 配置参考手册 <dubbo:service/> <dubbo:reference/> <dubbo:protocol/> ...