做一个简单的记录。spring security2.0目前不支持spring2.5 为cxf添加两个Interceptor 以basic auth的方式进行认证,这个Interceptor是获取用户名和密码,构造Authentication对象添加到SecurityContextHolder中, public class SecurityInInterceptor extends AbstractPhaseInterceptor<Message>{ private static Log logger = LogFactory.getLog(SecurityInIntercepto ...
  • 17:03
  • 浏览 (149)
  • 评论 (1)
2.1. Introduction 在application context中,你的开始使用security 命名空间,必须在application context文件中添加schema声明。 <beans xmlns="http://www.springframework.org/schema/beans" xmlns:security="http://www.springframework.org/schema/security" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLoca ...
  • 14:37
  • 浏览 (127)
  • 评论 (0)
HTTP is the most common Web Services protocol. However, web services are currently built on multiple transports each with different communications Quality of Service (QoS) and message semantics. The platforms that support these transports, the most common being HTTP(s) and JMS, also provide differ ...
SAAJ是一个可是用户利用java来创建,读或修改SOAP消息的API,SAAJ包含了对SOAP的 Envelop元素,Body元素,Fault元素以及XML命名空间,元素,属性,文本注释和MIME 附件建模的类和接口。SAAJ是一个空的类,有点类似JDBC。又供应商实现。我一般在CXF的 Interceptor中使用的比较多 SAAJ是一个抽象工厂模式,而抽象工厂模式的根就是MessageFactory。它负责创建本身的实例, 而该实例能用于创建SOAPMessage。SOAPMessage包含SOAPPart。SOAPPart表示文档以及零个或多个 AttachmentPart。 SO ...
Implementing WS-Security with Java and WSS4J  
  • 20:33
  • 浏览 (42)
  • 评论 (0)
一个比较使用的javascript tip。记录一下,方便以后查找。 <html> <head> <title>tip</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> </head> <body> <script> if(!document.attachEvent) { document.attachEvent = function(){document.addEventListener(ar ...
记得以前学习Rails时,对domain增删改更新的操作有相应的回调事件,印象特别深刻。希望能在java的ORM产品中也有这一 特性。而现在Java Peresistence规范容许我们在Entity设置回调方法。当事件发生时,entity实例会收到相应的通知,你也可以 单独注册一个监听器来拦截这些事件。 1:@PrePersist和@PostPersist 在任何时刻,只要向数据库中准备插入数据时,@PrePersist事件就会触发, 当插入操作执行完以后@PostPersist事件就会触发 2:@PreUpdate和@PostUpdate @PreUpdate在entity ...
  • 20:28
  • 浏览 (73)
  • 评论 (0)
定义符合主键的方法: 第一种方法:使用@IdClass 下面是定义一个主键类: public class CustomerPK implements Serializable { private String name; private Long ssn; public CustomerPK() { } ... @Override public int hashCode() { ... return result; } @Override public boolean equals(Object obj) { ... ...
  • 22:09
  • 浏览 (90)
  • 评论 (0)
链接:http://www.infoq.com/cn/news/2008/05/tilkov-rest-doubts REST也许适用于CRUD,但并不适用于“真实的”业务逻辑 没有正式的契约与描述语言 谁真会把他们应用中如此多的实现细节暴露出来? REST只能配合HTTP使用,它不是传输协议无关的 没有实际的、明确且一致的指南教你如何设计REST式应用 REST不支持事务 REST是不可靠的 不支持发布/订阅 无异步交互 缺少工具
  • 12:49
  • 浏览 (67)
  • 评论 (0)
资料:http://www.websiteoptimization.com/speed/tweak/compress/ Http支持在传输层压缩数据,这样减少数据的传输体积,在jax-ws中,client想server发送一个请求。进行数据压缩处理,方式如下; Map<String, List<String> httpHeaders = new HashMap<String, List<String>>(); httpHeaders.put("Content-Encoding", Collections.singletonList("gzip" ...
  • 21:24
  • 浏览 (85)
  • 评论 (0)
melin
搜索本博客
我的相册
13f2dda2-5992-3c69-b939-8a66565cda5e-thumb
jw-02-handler6.jpg
共 2 张
存档
最新评论