Skip navigation
1 2 3 Previous Next


34 posts

JAX-WS 2.1 API Released Blog

Posted by kohlert May 8, 2007
The JAX-WS 2.1 APIs are finalized and have been released at the JSR 224 page on

You can read my previous blog about the contents of JAX-WS 2.1.

JAX-WS is part of the Glassfish community.  
Sun has recently enhanced its Java Technology and Web Services web site. The new site has been totally revamped with "tabbed" navigation, making it easier to learn about Sun's Web Services offerings.

The new site's Overview tab is the perfect landing place to see what is the latest and greatest in Sun's Web Services offerings. From the new site you can learn about WSIT, JAX-WS, JAXB, JAXP, JAX-RPC, SAAJ, and XWSS on the Technologiestab. The Referencetab provides links to all the underlying web services technologies and their related specifications. The Communitytab shows various links so that you can become involved in Sun's web services community and even get involved in the development effort if you so choose. The Support tab gives links to where you can file bugs for and get help with the various technologies. Finally, the Downloadstab is a convenient place to be able to download the various web services technologies.  
JAX-WS 2.1 was written dependent on the Web Services 1.0 - WSDL Binding candidate recommendation fully expecting this CR to become are recommendation. However, after JAX-WS 2.1 was approved by the EC, the Web Service Addressing Working Group decided to replace the WSDL Binding CR with a new Web Services Addressing 1.0 - Metadata working draft. We felt that it would be prudent to respin the JAX-WS 2.1 specification to remove all dependencies on the WSDL Binding specification. In doing so, none of the JAX-WS APIs will be removed or modified with the exception of the described behavior. Therefore, the revised JAX-WS 2.1 APIs will be binary compatible with the original version. However, since there is no longer a standard way to represent the use of WS-Addressing in a WSDL, using Addressing in a portable manner will be somewhat more burdensome with the revised APIs. The revised JAX-WS specification will not reference the new Metadata specification at this time as it is not yet a recommendation. However, a future version of JAX-WS will reference the final Metadata specification and using addressing will be easier to use once this is done. JAX-WS 2.1 implementations are free to insert non-standard extensibility elements into the WSDL to reflect the use of Addressing.

The new specification can be reviewed here.  
I was hoping to announce the availability of the Maintenance Release of JAX-WS 2.1 specification before the RI was released, but the RI has once again proven that it is "Too Fast and Too Furious" as it was released last Friday before we could get the JSR 224 page updated. To see how fast the RI is, check out Vivek Pandey's Blog: JAXWS 2.1 FCS - Fast and Furious.
If you would like to read the JAX-WS 2.1 specification or JavaDocs, they can be found at: JAX-WS 2.1 Maintenance Release.  
The JAX-WS 2.1 Maintenance Review has started and will complete on November 27, 2006.

The JAX-WS 2.1 MR focuses on integrating WS-Addressinginto the JAX-WS specification. By integrating WS-Addressing into JAX-WS, the web service developer can now utilizeEndpointReferences to identify a particular endpoint. An EndpointReference is an opaque object to the web service developer that can be used in conjunction with new APIs on the JAX-WS service interface to get a proxy orDispatch object for the endpoint referred to by theEndpointReference. The EndpointReferencemay also contain wsa:referenceParameters that the web service endpoint can use to implement stateful web services.

Another important addition in JAX-WS 2.1 is a solution for the type substitution problem. In JAX-WS 2.0, type substitution did not work mainly because JAX-WS and JAXB were not aware of all the types that an application might use. For example, you may have a WSDL that defines additional types via type substitution that are not referenced directly by a particular service. These additional types could not be marshalled properly by JAX-WS because it was not possible for JAX-WS to know about these additional types. Likewise, when starting from Java, a service endpoint interface may use a base class as a method parameter but at runtime expect to be able to marshall subclasses. Again, JAX-WS did not have any way of knowing about these subclasses and hence could not marshall them. JAXB 2.1 (which has also been submitted for review) introduces the @XmlSeeAlso annotation that can be used to tell JAX-WS and JAXB about additional types that they should be aware of.

JAX-WS 2.1 introduces the notion of "features". A feature is associated with a particular functionality or behavior. Some features may only have meaning when used with certain bindings while other features may be generally useful. JAX-WS 2.1 introduces three standard features, AddressingFeature,MTOMFeature and RespectBindingFeature as well as the base WebServiceFeature class. TheAddressingFeature is used to control whether WS-Addressing is enabled or not. The MTOMFeaturecontrols the use of MTOM and the RespectBindingFeatureis used to improve portability by forcing JAX-WS implementations to respect wsd:binding extensions. A JAX-WS 2.1 implementation may define its own features but they will be non-portable across all JAX-WS 2.1 implementations.

For more information on these "features" and the other changes proposed in JAX-WS 2.1, please see the Change Log and updated specification at:

JAX-WS is part of the Glassfish Community

JAX-WS and JMS Blog

Posted by kohlert Oct 17, 2006
A JMS transport project for JAX-WS 2.1 has been added as a subproject of JAX-WS. This project contains a JMS plugin that can be used with JAX-WS 2.1. The project is open source and includes a runnable sample. Check it out!

If you are interested in developing a transport plugin for JAX-WS, please send an email to

JAX-WS is part of the Glassfish community.  
Currently, JAX-WS does not support type substitution in cases where Java types are used at runtime that are not directly or indirectly referenced by the SEI. The reason for this is because you must specify all of the types that will be used at runtime at the time the JAXBContext is created. Since JAX-WS can only introspect the SEI there is no way to determine what other classes the developer may use at runtime. Take the following SEI for example.

public interface MyEndpoint {
   public Shape echo(Shape);

abtract class Shape {}
but the following classes are also used by the application: 
class Square extends Shape;
class Circle extends Shape;
In the current JAX-WS implementation only the Shapeclass can be used.

We have the same problem when starting from WSDL and schema; only the schema types referenced by the wsdl:Port will be visible to the JAX-WS runtime. In short, we need to solve two related problems: 
  1. How can we allow the Java application developer to specify additional classes that should be used by a JAX-WS application?
  2. When importing a WSDL, how can we tell the JAX-WS and JAXB runtime that there are additional Java types available that are not referenced by the generated SEI?
JAX-WS 2.1 proposes the following solution: JAXB 2.1 has already defined the following @XmlSeeAlso annotation. 
package javax.xml.bind.annotations;

public @interface XmlSeeAlso {
 Class[] value();
This annotation will be allowed on any JAXB-bound type, and when JAXB binds that type, classes listed in @XmlSeeAlsowill be also bound. So this can be used like this: 
abstract class Foo {}

class Bar extends Foo {}
class Zot extends Foo {}
and "JAXBContext.newInstance(Foo.class)" will include all three classes. (Without @XmlSeeAlso annotation onFoo, JAXBContext.newInstance(Foo.class)will include only Foo.) JAX-WS 2.1 will allow developers to place this annotation on a SEI. JAX-WS will then read this annotation at runtime making sure to pass all of the classes referenced by this annotation to the JAXBContext.

When importing a WSDL that contains types that are not directly referenced by the endpoint definition, JAX-WS 2.1 will generate@XmlSeeAlso annotation on the SEI. This@XmlSeeAlso annotation will reference all of theObjectFactories generated by JAXB. For example 
@XmlSeeAlso({package1.ObjectFactory.class, package2.ObjectFactory.class})
public interface MyEndpoint {

Technorati: JSR JCP JAX JAXWS Web Services Glassfish  

JAX-WS versions Blog

Posted by kohlert Aug 30, 2006
With the announcement of JAX-WS 2.1 MR, it is apparent that versioning JAX-WS web service is important. As the 2.1 MR will add additional functionality and will potentialy introduce new annotations, it will become imperative that JAX-WS tools allow the web service developer to specify the target version of JAX-WS. The JAX-WS RI for example, will add targetVersion options to wsimport to control what code will be generated. The default value will be JAX-WS 2.1, but if the web service developer wants to target 2.0, he will be able to specify -targetVersion 2.0 to the wsimport command. By specifying the -targetVerion 2.0 option, then the generated code will run on a JAX-WS 2.0 implementations. Without specifying this option, 2.1 annotations might be generated making it impossible to run the application on a 2.0 implementation.

The question I would like to ask the community, is there a desire for a standard way to specify the targetVersion? For example, a customization could be defined for targetVersion. This would allow web service developers to specify this options in a standard way that would work across JAX-WS implementations.

Technorati: JSR JCP JAX JAXWS Web Services  

JAX-WS 2.1 MR Blog

Posted by kohlert Aug 30, 2006
Work has begun on the JAX-WS 2.1 Maintenance Release. I will be the JAX-WS 2.1 MR spec lead and Arun Gupta will co-lead. The main purpose of this MR is to add WS-Addressing capabilities to JAX-WS as Arun mentioned in his blog. Some other problems will also be addressed such as the type substitution problem that some JAX-WS developers have encountered.

You should be seeing an some development of the 2.1 version of the RI in the near future.

Technorati: JSR JCP JAX WSA JAXWS WSAddressing Web Services  
Many of you may have seen the following announcment from Sun yesteray about WSIT (project Tango): Sun and Microsoft Showcase Interoperability Between the Java Platform and .Net Framework at the 2006 JavaOne Conference: Financial News - Yahoo! Finance.

You may be wondering how does this relate to JAX-WS. I am pleased to announce that JAX-WS is the core component to WSIT. In fact, WSIT is really a set of extensions to JAX-WS. To support the WS-* technologies that are part of WSIT better and to improve performance, the JAX-WS RI has been rearchitected. At this time I can tell you that the the first nightly build of the rearchicted RI is now available for download. This is a an EA version and there are still some JAX-WS 2.0 functionality that we have not ported to the new architecture. You can download this nightly from the RI download page. This nightly build does not include the WSIT (WS-*) technologies at this time but that download should be available in the weeks to come.

If you want to learn more about WSIT, please visit the WSIT project on JAX-WS and WSIT is part of the Glassfish community.

TAGS: JAX-WS, Glassfish, WSIT, Web Services
We are pleased to announce that the JAX-WS 2.0 Final Realease of the reference implementation is finally available on

It has been a long haul to get to this point and the JAX-WS teams would like to thank everyone that kicked the tires and gave us valuable feedback to make JAX-WS a success.

We look forward to making the next release even better. The JAX-WS project is part of theGlassfish Project on

TAGS: JAX-WS,Glassfish, Web Services
JSR 224 (JAX-WS) was approved yesterday! You can view the result on the JCP site. The Java Community Process(SM) Program - JSRs: Java Specification Requests - results

JAX-WS is part of the Glassfish Project

Great Article on JAX-WS Blog

Posted by kohlert Apr 13, 2006
John Yates wrote an great article on JAX-WS. He does a very good job of describing the architecture of JAX-WS and how to use JAX-WS. He shows how a Web Service and be published with JAX-WS and then creating a client for that Web Service. You can even download his code to try for yourself.

Check out his article at DevX.  
The JAX-RPC sources for Glassfish are now on The JAX-RPC sources used to be hosted in the jax-rpc-sources project on but the jax-rpc-sources repostitory was never used actively and the sources were rarely updated.

As of today, all JAX-RPC development will use the cvs repository under the JAX-RPC project on The direct link to the sources is here.  
JAX-WS 2.0 has been open source on for nearly a year. The JAX-WS teams is looking for Content Developers and Contributors to make JAX-WS a better technology.

Content Developers can contribute content for the JAX-WS web site on This content can be in the form of whitepapers, tech tips, FAQs or anything else one can think of to make using JAX-WS easier to understand.

Contributors can commit code patches for bugs.

Developers have CVS write access to the source repositories.

For more information on how to become part of the JAX-WS team, please read the Glassfish Roles & Governance policy and then send an email to