Monthly Archives: May 2011

wsimport 产生莫名奇妙的@XmlElementRefs

如果wsimport帮你生成的class中没有firstName, lastName, middleName等正常的成员变量名,而是生成下面这样的东西: @XmlElementRefs({ @XmlElementRef(name = "middle-name", type = JAXBElement.class), @XmlElementRef(name = "last-name", type = JAXBElement.class), @XmlElementRef(name = "first-name", type = JAXBElement.class), }) protected List<JAXBElement<? extends Serializable>> content; 那原因就是:  你的WSDL中使用了重复的Element Name "It appears to be due to the same element name of PublicationReferenceType in different namespaces"

Facebook’s architecture(转)

From various readings and conversations I had, my understanding of Facebook’s current architecture is: * Web front-end written in PHP. Facebook’s HipHop [1] then converts it to C++ and compiles it using g++, thus providing a high performance templating and Web logic execution layer * Business logic is exposed as services using Thrift [2]. Some […]


执行“wsimport -version” 即可 结果类似于这个样子:“JAX-WS RI 2.1.6 in JDK 6” 你可能想知道RI是什么意思。看下文: The Reference Implementation of JAX-WS is developed as an open source project and is part of project GlassFish, an open source Java EE application server. It is called JAX-WS RI.

Java API for XML Web Services (jax-ws)的正式定义

官方网站没有定义,还得找wikipedia帮忙 From Wikipedia, the free encyclopedia The Java API for XML Web Services (JAX-WS) is a Java programming language API for creating web services. It is part of the Java EE platform from Sun Microsystems. Like the other Java EE APIs, JAX-WS uses annotations, introduced in Java SE 5, to simplify the development and […]

如果两个SOAP Web Service共享对象,要注意naming space问题

假设你有两个基于SOAP的web service, 一个叫  FooService, 另一个叫BarService 且这两个Service都使用 HelloBean作为web method的参数或方法值 而且你还希望你的客户只使用一套stub,也就是说客户端只有一个HelloBean.class 那么你就要让这两个web service使用同样的命名空间。否则,在下列这种情况下你会遇到异常: HelloBean bean = fooService.getHelloBean(); barService.saveHelloBean(bean); //JAXB会报命名空间异常,因为fooService产生的bean跟saveHelloBean()所需的bean在命名空间上不一样。    


转自 Why should I integrate Apache with Tomcat? (or not) There are many reasons to integrate Tomcat with Apache. And there are reasons why it should not be done too. Needless to say, everyone will disagree with the opinions here. With the performance of Tomcat 5 and 6, performance reasons become harder to justify. […]

Facebook 的API

初略地研究了一下Facebook的API 基本上,你可以    1. 用JS从客户端调这个API, 也可以用php, java从服务器端调用API    2. API可以返回json结构的数据,也可以直接返回html. 两种格式都可以为Mash-up服务    3. 可以用“iframe包含”方式来mash-up facebook的一个页面,也可以嵌入facebook的自定义标签来调用API 官方给的例子:    1.客户端直接使用 iframe <body> <iframe src=""><iframe> </body>    2. 在客户端用facebook提供的XML标签库(XFBML) ,使你的页面代码更简洁 <body> <script src=""></script> <fb:like></fb:like> </body>    3. 客户端获得JSON数据 <body> <div id="fb-root"></div> <script src=""> </script> <script> FB.init({ appId:’119449798131809′, cookie:true, status:true, xfbml:true }); FB.api(‘/me’, function(user) { if(user != null) { […]

MIME邮件格式的定义在 RFC5322中 3.4. Address Specification    Addresses occur in several message header fields to indicate senders    and recipients of messages.  An address may either be an individual    mailbox, or a group of mailboxes.    address         =   mailbox / group    mailbox         =   name-addr / addr-spec    name-addr       =   [display-name] angle-addr    angle-addr      =   [CFWS] […]