Web Services Enhancements 3.0 Quick Start(一)

Web Services Enhancement的目的
      1、基于基本的Web Services
      2、满足企业级应用的需求Secure、reliable and transacted Web services
      3、保留Web Services得以成功的优点 Interoperability Ability to be implemented Add no more complexity than needed
这篇主要介绍WSE通过安全证书(Policy File)构建安全Web Service
     一、先定义安全证书(Policy File) 
     二、使用专有的Web service安全证书特性
具体步骤
     1、在vs2005中开一个Web Service项目
     2、运行WSE Settings 3.0 Tool
     3、通过WSE Settings 3.0 Tool打开Web Service项目的web.config
     4、选中Enable this project for web Service Enhancements
10-25-1.gif
        5、选择Policy并Add,填写你证书的名字,我现在是使用ServicePolicy名称然后下一步
        6、然后的的向导界面就要重点讲述下在第一个选择项是标注你选择的服务还是客户,在第二个选择项中有四个选项
10-25-2.gif

选项说明
Anonymous匿名访问
Username需要包含用户名和密码的Usernametoken的安全令牌
Certificate需要发送含有X509SecurityToken的安全令牌的X.509证书
Windows需要发送含有KerberosToken的windows身份认证
    7、选择SOAP头的类型
10-25-3.gif

选项说明
NoneSOAP消息应当在传输层(SSL协议)提供保护,WSE在传输层(SSL协议)不提供保护。
Sign-OnlySOAP消息必须签名
Sign and Encrypt SOAP消息必须签名和SOAP消息体加密
Sign, Encrypt, Encrypt Signature SOAP消息必须签名、消息体签名加密
8、完成
就能根据您的配置生成以下配置文件
None.gif < policies >
None.gif  
< extensions >
None.gif    
< extension name = " kerberosSecurity "
None.gif               type
= " Microsoft.Web.Services3.Design.KerberosAssertion, Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 "   />
None.gif    
< extension name = " kerberos "
None.gif               type
= " Microsoft.Web.Services3.Design.KerberosTokenProvider, Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 "   />
None.gif    
< extension name = " requireActionHeader "
None.gif               type
= " Microsoft.Web.Services3.Design.RequireActionHeaderAssertion, Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 "   />
None.gif  
</ extensions >
None.gif  
< policy name = " ServicePolicy " >
None.gif    
< kerberosSecurity establishSecurityContext = " false "  signatureConfirmation = " false "  protectionOrder = " SignBeforeEncrypting "  deriveKeys = " false " >
None.gif      
< protection >
None.gif        
< request signatureOptions = " IncludeAddressing, IncludeTimestamp, IncludeSoapBody "  
None.gif                 encryptBody
= " true "   />
None.gif        
< response signatureOptions = " IncludeAddressing, IncludeTimestamp, IncludeSoapBody "  
None.gif                 encryptBody
= " true "   />
None.gif        
< fault signatureOptions = " IncludeAddressing, IncludeTimestamp, IncludeSoapBody "  
None.gif                 encryptBody
= " false "   />
None.gif      
</ protection >
None.gif    
</ kerberosSecurity >
None.gif    
< requireActionHeader  />
None.gif  
</ policy >
None.gif
</ policies >
9、应用在Web Service
None.gif using  System;
None.gif
using  System.Web;
None.gif
using  System.Web.Services;
None.gif
using  System.Web.Services.Protocols;
None.gif
using  Microsoft.Web.Services3;
None.gif
using  Microsoft.Web.Services3.Design;
None.gif
None.gif[WebService(Namespace 
=   " http://www.contoso.com/ " )]
None.gif[WebServiceBinding(ConformsTo 
=  WsiProfiles.BasicProfile1_1)]
None.gif[Policy(
" ServicePolicy " )] 
None.gif
public   class  Service : System.Web.Services.WebService
ExpandedBlockStart.gifContractedBlock.gif
dot.gif {
ExpandedSubBlockStart.gifContractedSubBlock.gif    
public Service () dot.gif{
InBlock.gif
ExpandedSubBlockEnd.gif    }

InBlock.gif
InBlock.gif    [WebMethod]
ExpandedSubBlockStart.gifContractedSubBlock.gif    
public string SayHello() dot.gif{
InBlock.gif        
return "Hello World";
ExpandedSubBlockEnd.gif    }

InBlock.gif    
ExpandedBlockEnd.gif}
小结
现在主要是建立服务器端的Policy File,以及使用,下次就介绍关于客户端建立Policy File以及使用

转载于:https://www.cnblogs.com/jiekeng/archive/2006/10/25/539962.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: Spring Boot 3.0 is a major release that introduces a number of new features and improvements over previous versions. Some of the key features and enhancements include: 1. Java 16 Support: Spring Boot 3.0 now supports Java 16 and its new features, allowing developers to take advantage of the latest advancements in the Java platform. 2. Improved Actuator Endpoints: The Actuator endpoints have been improved to provide more detailed information about the application and its environment, making it easier to monitor and troubleshoot applications. 3. New Testing Features: Spring Boot 3.0 introduces several new testing features, including a new TestRestTemplate, support for testing with H2 databases, and improved support for testing with testcontainers. 4. Faster Startup Time: Spring Boot 3.0 has been optimized to start up faster, reducing the time it takes to get an application up and running. 5. Improved Security: Spring Boot 3.0 includes a number of security improvements, such as improved support for OAuth 2.0 and JWT, and improved support for securing RESTful APIs. 6. Better Support for Cloud-Native Deployments: Spring Boot 3.0 provides better support for cloud-native deployments, including improved support for Kubernetes and improved support for service discovery with Eureka. 7. Improved Performance: Spring Boot 3.0 has been optimized for better performance, with improvements in the handling of large numbers of requests and improved memory usage. These are some of the key new features and enhancements in Spring Boot 3.0. If you are looking to upgrade from an earlier version of Spring Boot or are just starting a new project, it is definitely worth considering this latest release. ### 回答2: 目前为止,还没有发布Spring Boot 3.0版本,因此无法提供确切的新特性。不过,可以根据过去版本的趋势和社区的需求,推测一些可能的新特性。 1. 支持最新的Java版本:随着Java的不断更新,Spring Boot 3.0可能会支持最新的Java版本,以提供更高的性能和安全性。 2. 更强大的自动化配置功能:Spring Boot以其自动化配置功能闻名,3.0版本可能会增加更多的自动化配置选项,减少开发人员的配置工作,加快项目的启动速度。 3. 更好的响应式和异步编程支持:近年来,响应式和异步编程成为了开发者关注的热门话题,Spring Boot 3.0可能会进一步改进响应式和异步编程的支持,以满足这方面的需求。 4. 更强大的监控和管理功能:随着分布式系统的兴起,对于监控和管理系统的需求也越来越高。Spring Boot 3.0可以提供更强大的监控和管理功能,以便于开发人员更好地了解和维护系统的状态。 5. 更多的集成和插件支持:Spring Boot生态系统非常丰富,与各种开发框架和工具的集成和插件支持是其受欢迎的原因之一。预计Spring Boot 3.0会进一步增加对各种框架和工具的集成和插件支持,以便于开发人员更好地利用现有的资源。 以上只是对于可能的新特性的猜测,具体的特性还需要根据Spring Boot官方发布的版本来确认。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值