Skip to main content

JAX-WS 2.1 EA2 and WS-Addressing

Posted by arungupta on October 23, 2006 at 12:22 PM PDT

JAX-WS 2.1 EA2, with new features and better quality, is out. Read Vivek's
message about the announcement
and the list of features.

I'd like to highlight Users
Guide
that has been updated with an explanation for all the newly added
features. I added a new section on WS-Addressing
support
in the RI. Rama
published a blog on Support
for WS-Addressing in JAX-WS 2.1 RI EA1
4 weeks ago. Based upon internal and
external feedback, we've simplified the way WS-Addressing support is enabled
starting from Java. This blog highlights those changes and provides a quick
overview of the new WS-Addressing features.

1. Enabling WS-Addressing

The code to enable WS-Addressing in EA1 (given below):

@javax.jws.WebService

@BindingType(features={@Feature(AddressingFeature.ID)})

public class MyWebService { ... }

is now replaced with the following code in EA2:

@javax.jws.WebService

@javax.xml.ws.soap.Addressing

public class MyWebService { ... }

Similarly, specifying parameters to WS-Addressing feature is simplified. The
code to enable WS-Addressing with required parameter true
value in EA1 (given below):

@javax.jws.WebService

@BindingType(features={

                      
@Feature(value=AddressingFeature.ID,

                               
parameters={

                                           
@FeatureParameter(name=AddressingFeature.IS_REQUIRED, value="true")

                                          
}

                               
)

                     
}

             )

public class MyWebService { ... }

is now replaced with the following code in EA2:

@javax.jws.WebService

@javax.xml.ws.soap.Addressing(enabled=true, required=true)

public class MyWebService { ... }

2. Explicit enabling/disabling

WS-Addressing can be explicitly enabled
or disabled
on the client irrespective of what the service endpoint WSDL advertises. The use
case is when the client does WS-Addressing processing in the Dispatch client or
via handlers. Another use case is when the client need to perform non-anonymous
ReplyTo/FaultTo processing.

3. Support for wsaw:Anonymous  

W3C WS-Addressing WSDL Binding defines wsaw:Anonymous
element to define assertions regarding a requirement or a constraint in the use
of anonymous URI in EPRs sent to the endpoint. The syntax
and semantics
defined by the spec are now supported from both the client-
and server-side.

 

This JAX-WS 2.1 EA2 is tested with GlassFish v2 b22. A more recent build is already integrated in WSIT and will soon be integrated in
GlassFish. 

Technorati: JAX-WS
WSIT
GlassFish

Related Topics >>