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) ...
随机推荐
- 启动zookeeper时出现的问题
zkEnv.cmd @echo off REM Licensed to the Apache Software Foundation (ASF) under one or more REM contr ...
- 在selenium中使用css选择器进行元素定位
Sizzle Css3还提供一些直接选取form表单元素的伪类 :input: Finds all input elements (includes textareas, selects, and b ...
- 如何在IntelliJ IDEA中快速配置Tomcat
近来使用idea编写java代码的人越来越多,最关键的就是idea强大的代码提示功能,能极高的提升程序员的开发效率,但是毕竟各有所长,idea中tomcat的配置就没有eclipse那么轻松,这里简单 ...
- Can't clobber writable file **************
最近搭建了新的quick check server, workspace也是新的.但是get latest (unshelve)的时候,出现以下错误: can't clobber writable f ...
- notepad++ 文本替换功能,解决excel批量修改数据库的数据操作
^ \(' 开始\t ',' 制表符$ '\) 行末 复制出来之后,使用文本替换功能,转换为SQL,添加到临时表中.然后多表关联修改. SELECT COUNT(*) FROM orderno; # ...
- centos7 安装 最新版本的docker
yum update # vim /etc/yum.repos.d/docker.repo //添加以下内容 [dockerrepo] name=Docker Repository baseurl=h ...
- python mysql 封装
封装 观察前面的文件发现,除了sql语句及参数不同,其它语句都是一样的 创建MysqlHelper.py文件,定义类 #encoding=utf8 import MySQLdb class Mysql ...
- [原]IOS 后台发送邮件
skpsmtpmessage 是ios第三方后台发送邮件库 https://github.com/jetseven/skpsmtpmessage.git -(void)statrUpLoad:(id) ...
- Android播放器推荐:可以播放本地音乐、视频、在线播放音乐、视频、网络收音机等
下载链接:http://www.eoeandroid.com/forum.php?mod=attachment&aid=MTAxNTczfGMyNjNkMzFlfDEzNzY1MzkwNTR8 ...
- SpringBoot------Eclipce配置Spring Boot
步骤一: 步骤二: 点击左下角Eclipse图标下的“Popular”菜单,选择Spring安装(已安装的插件在Installed中显示),一直按步骤确定就好了,如果中途下载超时什么的,就看看自己的网 ...