Friday March 09, 2007
JavaOne 2007 complete session schedule is now available. As I mentioned earlier, this is going to be lots of fun. If you are interested in hearing about Sun's Web services strategy, here is a compilation of all the related sessions:
| Session# | Title |
| TS 4865 | Takes two to Tango: Java Web Services and .NET Interoperability |
| TS 4948 | Unleashing the Power of JAX-WS RI: Spring, Stateful Web Services, SMTP, and More |
| TS 6411 | JSR 311: The Java API for RESTful Web Services |
| TS 8840 | Services Interoperability with Java Technology and .NET: Technologies and Tools for Web 2.0 |
| BOF 6412 | Describing RESTful Applications: WADLing with Java |
There is more Web services content that has not been publicly announced yet. I'll update the blog when it is. While we are working to provide you a rich content during this year's presentations, here is an archive of the Web services sessions from JavaOne 2006.
| Session # | Title |
| TS 1194 | Java API for XML Web Services (JAX-WS) 2.0 |
| TS 1222 | RESTful Web Services With JAX-WS |
| TS 1603 | Reliable and Transacted Web Services between Java™ Technology-Based Project Tango and Microsoft Indigo |
| TS 3473 | Web Services Security, WS-Trust, WS-Policy, and WS-SecureConversation Using Java™ Web Services Developer Pack |
| TS 4661 | Composable Web Services Using Interoperable Technologies from Sun's "Project Tango" |
| TS 5540 | Making Java™ Technology-Based/.NET Web Services Interoperability Real |
| TS 9263 | Recommendations for Web Services Development |
And if you are interested in attending JavaOne 2007 and save $200, then register today.
Technorati: Javaone Tango WSIT Glassfish WebServices JAX-WS JAXWS presos
Posted by Arun Gupta in webservices | Comments[3]
|
|
|
|
|
Wednesday February 28, 2007
Screencast #WS4: How to install WSIT plug-in on NetBeans IDE 5.5.1 using Update Center ?
NetBeans 5.5.1 IDE Beta was released earlier this week. Along with it, the WSIT plug-in modules were released as part of Update Center. So now if you want to install WSIT plug-in in NetBeans, you no longer have to manually download the modules and then install them. This screencast shows you how to install the WSIT plug-in on NetBeans IDE 5.5.1 using Update Center.
Enjoy it here.
Technorati: Web services NetBeans GlassFish WSIT JAX-WS screencast
Posted by Arun Gupta in webservices | Comments[7]
|
|
|
|
|
Saturday February 24, 2007
Ask The Experts next Week for JAX WS
If you are new to Web services and would like to know how to write a simple Web service; or if you are a veteran and would like to know performance tuning tips on JAX-WS. Please scratch your head and ask your mind for any questions on anything JAX-WS (2.0 or 2.1) because next week is an open invitation to ask Vivek, Kohsuke and Jitu, representation of Sun's JAX-WS engineering team. JAX-WS team is waiting for your questions and will enjoy answering them.
Although the campaign is scheduled for Feb 26 - Mar 2 but I realize you can already submit questions here.
JAX-WS 2.1 bits are available as part of GlassFish v2.
Technorati: JAX-WS Web services GlassFish
Posted by Arun Gupta in webservices | Comments[0]
|
|
|
|
|
Thursday February 22, 2007
Screencast #WS3: Reliable and Interoperable Web service using WSIT plug-in, NetBeans and GlassFish
In the third part of the screen cast series (#ws1, #ws2), I show how a reliable and interoperable Web service can be developed and invoked using NetBeans IDE and WSIT plug-in. This screencast also shows how WSIT plugin can be manually installed in NetBeans.
Enjoy it here.
Here is a preview of screen casts that are plannned in the next few weeks.
Feel free to post suggestions on what would you like to see in terms of Web services development using NetBeans.
UPDATE: See why/when a module may be installed globally versus locally here.
Technorati: Web services NetBeans GlassFish WSIT JAX-WS screencast
Posted by Arun Gupta in webservices | Comments[32]
|
|
|
|
|
Monday February 12, 2007
Screencast #WS2: Invoking a Web service using NetBeans IDE
In the second part of the screen cast series (part 1), I show the various ways by which NetBeans IDE can invoke a Web service endpoint. The first part showed only the default way to invoke the endpoint, but this screen cast shows two additional ways.
Enjoy it here.
Feel free to post suggestions on what would you like to see in terms of Web services development using NetBeans.
Technorati: Web services NetBeans GlassFish WSIT JAX-WS screencast
Posted by Arun Gupta in webservices | Comments[41]
|
|
|
|
|
Friday February 09, 2007
JAX-WS SEI/WSDL Processing Extension Hooks
One of the key advantages of JAX-WS Reference Implementation ([1], [2], [3], [4], [5]) is it's extensible nature. Several extensibility hooks, defined as abstract classes, are enabled through out the JAX-WS RI that allow to extend the core JAX-WS functionality for WSDL/Service Endpoint Interface processing. This document explains these hooks and their intended purpose.
An implementation of extensibility hook is discovered using the Service
Provider mechanism. If the service provider file required by the extension
hook is present in the classpath in META-INF/services directory,
then JAX-WS tool time or runtime (whatever is appropriate) picks up the
implementation advertised by the service provider and invokes the relevant
methods. The implementation of these methods is provided with the information
required to perform the intended functionality.
The different extensibility points, to impact the WSDL/Service Endpoint Interface generation and consumption, enabled by JAX-WS RI are explained next.
This extension hook, defined by com.sun.tools.ws.api.wsdl.TWSDLExtensionHandler
service provider, allows participation in the tool time WSDL parsing for the extensibility
elements in a WSDL. This enables an extension handler to be registered with
the JAX-WS WSDL importing tool, wsimport, for a namespace different
from that of WSDL 1.1. This allows such handlers to retrieve information from
WSDL elements, and use that later to, for example, generating annotations. The
appropriate method in the registered extension handler is invoked if an
extensibility element in that namespace is encountered during tool time WSDL
parsing.
For example, JAX-WS RI registers a tool time WSDL parsing extension handler, com.sun.tools.ws.wsdl.parser.W3CAddressingExtensionHandler,
for
the http://www.w3.org/2005/08/addressing/wsdl
(W3C WS-Addressing namespace and bound to wsaw prefix) namespace. The handleInputExtension
method is invoked if wsdl:portType/wsdl:operation/wsdl:input
contains wsaw:Action attribute. Similarly other methods from TWSDLExtensionHandler,
where WS-Addressing elements can occur and need to be handled, are overridden as
well.
Any data accessed from the extension element in WSDL may be stored in a data
structure internal to JAX-WS RI. Alternatively if an extension handler, living
outside JAX-WS RI, is registered then it is recommended that an extension element, of type com.sun.tools.ws.api.wsdl.TWSDLExtension,
be created and added as an extension to com.sun.tools.ws.api.wsdl.TWSDLExtensible
(for example com.sun.tools.ws.api.wsdl.TWSDLOperation)
to store any information required later.
The tool time WSDL parsing creates a complete DOM tree of the WSDL and thus indexing by the namespace URI works efficiently.
Table 1 gives the service provider file name and the corresponding JAX-WS implementation class name.
This extension hook, defined by com.sun.tools.ws.api.TJavaGeneratorExtension
service provider, allows additional annotations to be generated on a Java
method during the WSDL-to-Java mapping. It may use the information stored in an
internal data structure or com.sun.tools.ws.api.wsdl.TWSDLExtension
element stored during the tool time WSDL parsing stage.
For example, JAX-WS RI uses com.sun.tools.ws.processor.generator.W3CAddressingJavaGeneratorExtension
to generate @javax.xml.ws.Action
annotation on a generated Java method, using information stored in an internal
structure.
Table 1 gives the service provider file name and the corresponding JAX-WS implementation class name.
This extension hook, defined by com.sun.xml.ws.api.wsdl.parser.WSDLParserExtension
service provider, allows participation in runtime WSDL parsing for the
extensibility elements in the WSDL. This allows the registered handlers to
retrieve information from WSDL elements, and use that later to, for example,
generate wsa:Action in the SOAP message. At runtime, all registered
handlers are invoked for an extension element. The handler then makes a decision
about whether it is interested in processing the current element, by peeking at
the QName of the element, or ignore it. This is different from tool-time parsing
where a complete DOM tree of the WSDL allows namespace indexing and thus calls
the correct extension handler.
For example, JAX-WS RI registers a runtime WSDL parsing extension handler, com.sun.xml.ws.wsdl.parser.W3CAddressingWSDLParserExtension,
for processing WS-Addressing extension elements in the WSDL. As mentioned
earlier, any data accessed from the extension element in WSDL may be stored in a
data structure internal to JAX-WS RI. Alternatively if an extension handler,
living outside JAX-WS RI, is registered then it is recommended that an extension element, of type
com.sun.tools.ws.api.wsdl.WSDLExtension,
be created and added as an extension to com.sun.xml.ws.api.model.wsdl.WSDLOperation
to store any information required later.
To illustrate further, if there is an extension element in the WSDL in wsdl:portType/wsdl:operation/wsdl:input,
then portTypeOperationInput
method is invoked for all the registered extension handlers. If wsdl:input
contains wsaw:Action attribute then it's value is stored in an
internal data structure and later used for generating
wsa:Action on the SOAP message. Otherwise default
Action is generated, as defined by WS-Addressing
1.0 - WSDL Binding, by querying other data from the WSDL.
Another example is where WSIT defines com.sun.xml.ws.policy.jaxws.PolicyWSDLParserExtension
to process all WS-Policy related extension elements in the WSDL.
Table 1 gives the service provider file name and the corresponding WSIT implementation class name.
This extension hook, defined by com.sun.xml.ws.api.wsdl.writer.WSDLGeneratorExtension
service provider, allows participation in runtime generation of extensibility elements
in the WSDL. This allows the registered handlers to
generate their own extensibility elements on various WSDL elements. Each method
is invoked with a com.sun.xml.txw2.TypedXmlWriter
parameter with an underlying WSDL element. This allows to add an attribute, declare a new
namespace URI or append a new child element to the underlying WSDL element. Each
method is passed the information required to generate the extensibility element.
For example, JAX-WS RI registers a runtime WSDL generation handler, com.sun.xml.ws.wsdl.writer.W3CAddressingWSDLGeneratorExtension
for generating WS-Addressing extension elements in the WSDL. The addOperationInputExtension
method is invoked when wsdl:portType/wsdl:operation/wsdl:input is
generated. The JAX-WS RI handler obtains the value of @javax.xml.ws.Action
annotation from the java.lang.reflect.Method and generates the
appropriate wsaw:Action attribute.
Another example is where WSIT defines com.sun.xml.ws.policy.jaxws.PolicyWSDLGeneratorExtension
to generate all WS-Policy related extension elements in the WSDL.
Table 1 gives the service provider file name and the corresponding WSIT implementation class name.
| Service Provider File Name | Sample Implementation | |
| Tool time WSDL Parsing | com.sun.tools.ws.api.wsdl.TWSDLExtensionHandler | com.sun.tools.ws.wsdl.parser.W3CAddressingExtensionHandler |
| Tool time Java Generation | com.sun.tools.ws.api.TJavaGeneratorExtension | com.sun.tools.ws.processor.generator.W3CAddressingJavaGeneratorExtension |
| Runtime WSDL Parsing | com.sun.xml.ws.api.wsdl.parser.WSDLParserExtension | com.sun.xml.ws.policy.jaxws.PolicyWSDLParserExtension |
| Runtime WSDL Generation | com.sun.xml.ws.api.wsdl.writer.WSDLGeneratorExtension | com.sun.xml.ws.policy.jaxws.PolicyWSDLGeneratorExtension |
Table 1: Service Provider file name and Sample Implementations
In summary, the JAX-WS Reference Implementation provides a feature-rich platform for middleware developers that allows them to extend the capabilities of core functionality. The stand-alone JAX-WS implementation can be downloaded from here. It is also integrated in GlassFish v2 which can be downloaded from here.
Technorati: JAX-WS Web services GlassFish WSIT Extensiblity
Posted by Arun Gupta in webservices | Comments[0]
|
|
|
|
|
Wednesday February 07, 2007
Screencast #WS1: Web services development using NetBeans IDE and GlassFish
Today, I'm starting a series of screen casts that will show how NetBeans IDE provide first class interoperable Web services development experience using WSIT in GlassFish v2. The first episode in this series shows how a simple Web service can be developed, deployed and invoked using JAX-WS in GlassFish.
Enjoy it here.
Feel free to post suggestions on what would you like to see in terms of Web services development using NetBeans IDE.
Thanks to Terena for helping me host the media!
Technorati: Web services NetBeans GlassFish WSIT JAX-WS screencast
Posted by Arun Gupta in webservices | Comments[24]
|
|
|
|
|
Friday February 02, 2007
Deployment Descriptor-free Web services in GlassFish
One of the big benefits of JAX-WS 2.0 is that deployment descriptors are optional. By optional, it means no deployment descriptors are required if you can live with the reasonable defaults defined by the JAX-WS specification. So if you develop a trivial Web service, starting from POJO (Plain Old Java Object), as:
@javax.jws.WebService(targetNamespace="http://example.org")
public class Hello {
public String sayHello(String name) {
return "Hello " + name;
}
}
compile it and drop the class in $AS_HOME/domains/domain/autodeploy
directory, where AS_HOME is the directory location for GlassFish,
then you have deployed a Web service at http://localhost:8080/Hello/HelloService?wsdl.
With GlassFish v2
M4, the WSDL looks like (default values are highlighted in bold):
<?xml version="1.0" ?>
<definitions
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://example.org"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://schemas.xmlsoap.org/wsdl/"
targetNamespace="http://example.org"
name="HelloService">
<types>
<xsd:schema>
<xsd:import namespace="foobar"
schemaLocation="http://localhost:8080/Hello/HelloService?xsd=1">
</xsd:import>
</xsd:schema>
</types>
<message name="sayHello">
<part name="parameters" element="tns:sayHello">
</part>
</message>
<message name="sayHelloResponse">
<part name="parameters" element="tns:sayHelloResponse">
</part>
</message>
<portType name="Hello">
<operation name="sayHello">
<input message="tns:sayHello">
</input>
<output message="tns:sayHelloResponse">
</output>
</operation>
</portType>
<binding name="HelloPortBinding" type="tns:Hello">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document">
</soap:binding>
<operation name="sayHello">
<soap:operation soapAction="">
</soap:operation>
<input>
<soap:body use="literal">
</soap:body>
</input>
<output>
<soap:body use="literal">
</soap:body>
</output>
</operation>
</binding>
<service name="HelloService">
<port name="HelloPort" binding="tns:HelloPortBinding">
<soap:address location="http://localhost:8080/Hello/HelloService">
</soap:address>
</port>
</service>
</definitions>
The wsdl:service/@name, wsdl:port/@name, wsdl:portType/@name
and other similar elements use a default value, defined by the JAX-WS
specification, derived from the class name and method name. All these values can
be easily configured using @WebService
and @WebMethod.
This class is in default package and that's why @WebService/targetNamespace
attribute is required. Otherwise targetNamespace is derived from
the package name and in which case the Web service implementation looks like:
package hello;
public class Hello
public String sayHello(String name) {
return "Hello " + name;
}
}
There is a similar sample in GlassFish samples as well. A much broader collection of JAX-WS samples is available here.
This Deployment Descriptor-free concept also work if you really like to
bundle up your classes together in a WAR. Basically just package your classes in
WEB-INF/classes directory and that's it. No web.xml, sun-web.xml
or any proprietary descriptors are required.
As shown above, converting your POJO to a Web service is really simple, does not require any deployment descriptors, improves readability of code and is backed by the production-quality JAX-WS runtime in GlassFish.
And if you are using NetBeans, then you don't need to worry about any of these details.
Technorati: Web service GlassFish JAX-WS JAXWS Samples Ease of Use
Posted by Arun Gupta in webservices | Comments[9]
|
|
|
|
|
Wednesday January 24, 2007
Read about a customer experience on using JAX-WS RI on JBoss on the server side and JAX-WS runtime with Java SE 6 on the client side.
An important point to note in the article is the 1000% performance gains
between EA and and more recent versions of JAX-WS. Not all of this gain may be
due to JAX-WS 
Technorati: JAXWS JAX-WS JBoss Web services
Posted by Arun Gupta in webservices | Comments[0]
|
|
|
|
|
Sunday December 31, 2006
Last day of 2006 and a lot got accomplished, either directly or indirectly, during the year:
On a personal front ...
| 2005 | 2006 | |
| blogs.sun.com/arungupta | 24 | 95 (including this) |
| weblogs.java.net/blog/arungupta | 46 | 61 (including this) |
| Total | 70 | 156 |
The number of entries I posted doubled over the past year, the strength of GlassFish, WSIT, JAX-WS and NetBeans community increased tremendously, helped one another for nothing, and building open source software is that's what this "social experiment" is all about. This is what is "founding and framing the digital democracy".
This is by no means an exhaustive list of accomplishments either by Sun Microsystems or any other group within Sun. This is only an attempt to capture how and where I spent my time last year. There are still miles to go and a lot to be done. Today is the last day of 2006 and I'm ready for 2007.
Welcome 2007 and a very happy new year!!!
Technorati: HappyNewYear 2006 2007 WSIT GlassFish Marathon Ajax JAX-WS NetBeans
Posted by Arun Gupta in General | Comments[1]
|
|
|
|
|
Thursday December 14, 2006
Web services native support in Java6
A new thread started on TheServerSide prompted by Dims post on "Why bundling JAX-WS in Java6 was a bad idea!". Let me explain why I don't agree.
I still remember JavaOne 2005 technical keynote getting applauds from everybody when bundling Web services in Java6 was announced. An approximate 5000 developer audience thrilled that Web services will be available natively in Java6.
JAX-WS 2.0 is a JCP standard (JSR 224) that enables Web services support in a standard way. Here are some of the salient features:
Mainly because of timing constraints, JAX-WS 2.0 (and not 2.1) was included in Java6. However the currently bundled JAX-WS implementation is very powerful and allows you to develop/invoke SOAP-based and REST-based services. If you want to enable different WS-* specifications (such as WS-Security, WS-Reliable Messaging and WS-Secure Conversation) then you can download WSIT builds and configure them on Java6 (another blog on that later) and there by WSIT-ifying your Java6.
Web services and Scripting are the two most talked about features in Java6 as is evident by a short list of links below (there are many more):
In all, I strongly believe, more as a technology user, that adding basic Web services support to Java6 is the first step. There is always a balance between providing an out-of-the-box experience or asking them to download additional stuff and go through configuration. I believe in simplicity and that's what we have tried to achieve by adding Web services support in Java6. You'll see more sophisticated additions in the versions to come.
Technorati: Java6 JDK JAX-WS Web Services
Posted by Arun Gupta in webservices | Comments[2]
|
|
|
|
|
Thursday December 07, 2006
JAX-WS 2.1 (JSR 224) Maintenance Release has been approved by the JCP. Thanks to all the Expert Group members for providing feedback and making yet another landmark in Java Web services standards roadmap.
The change log, specification and RI EA3 are available for you to explore. Read Vivek's blog for details on the new features available in EA3. Here is the list of features in EA2 and EA1. The latest RI Users Guide describes in detail the features along with code samples. Nightly builds are available here.
The EA3 build is already integrated in the latest GlassFish v2 b26 build.
Technorati: JAX-WS GlassFishPosted by Arun Gupta in webservices | Comments[0]
|
|
|
|
|
Friday October 27, 2006
I've been asked this question multiple times and so finally decided to convert an internal presentation that into an external document.
Why WS-Addressing ? describes the different use cases served by WS-Addressing and explains the two commonly used versions.
JAX-WS 2.1 RI EA2 was recently released and supports W3C and Member Submission WS-Addressing. A more recent version of this RI is integrated in WSIT which is then integrated in GlassFish 2 days ago. Read about WS-Addressing support in JAX-WS 2.1 RI here.
Technorati: WSAddressing JAX-WS WSIT WSITPosted by Arun Gupta in webservices | Comments[0]
|
|
|
|
|
Monday October 23, 2006
JAX-WS 2.1 EA2 and WS-Addressing
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 WSAddressing WSIT GlassFishPosted by Arun Gupta in webservices | Comments[1]
|
|
|
|
|
Thursday October 19, 2006
JAX-WS 2.1, WS-Addressing, WSIT and GlassFish
JAX-WS 2.1 RI replaced JAX-WS 2.0.1 and JAX-WSA 1.0 EA2 in WSIT approximately 2 weeks ago. This is where I've been spending most of my time during the past few weeks. With this change, WSIT is now using WS-Addressing functionality natively provided in JAX-WS 2.1 RI is used instead of relying upon a pluggable JAX-WSA 1.0 EA2. This approach has several benefits as outlined earlier. A complete description of JAX-WS roadmap will help you understand the difference between the different version numbers.
Starting with GlassFish b22, this version of WSIT is also integrated in GlassFish. So, if you download GlassFish you get WSIT, JAX-WS 2.1 and all other great stuff. This is the very first integration of JAX-WS 2.1 RI in GlassFish and most of the functionality is working. I encourage you to download GlassFish b22 and give us feedback on how we can make it better for you.
Technorati: Web Services GlassFish WSIT WS-Addressing JAX-WSA
Posted by Arun Gupta in webservices | Comments[0]
|
|
|
|
|
Today's Page Hits: 3474
Total # blog entries: 1008
| « December 2009 | ||||||
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|
5 | ||||||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 | ||
| Today | ||||||