Wednesday Jul 09, 2008

GlassFish Family in Readers Choice Awards 2008 Finalists

2008 Readers Choice Awards from SYS-CON SOA World Magazine are announced. There are quite a few projects from GlassFish and sister communities. The nominations are:

GlassFish Best App Server
Hudson Best Automation Tool
Metro Best Framework
NetBeans Best IDE
Java CAPS Best Integration Tool
Project OpenESB Best Open Source SOA Tool
Metro: XML and Web Services SecuritySun Access Manager/OpenSSO Best Security Solution
Sun Java CAPS Best SOA Platform
Sun Java CAPS Best SOA Tool
Java API for XML Processing (JAXP) Best Web Services Utility
Java API for XML Processing (JAXP) Best XML Parser

Even though voting startd on Jun 23 and finishes, after a looong voting period, on Nov 15 the voting process is still not intuitive. Trying different browsers on different machines didn't help either. Anyway, I sent an email using their "Contact Us" link and hopefully will hear from them soon :)

In the meanwhile, each of the nominated products above can brag with the logo on their website.

Technorati: syscon awards glassfish hudson javacaps metro jaxp

Saturday Apr 05, 2008

GlassFish Metro Web Services Training Course

Interested in understanding the nitty gritty details of how Metro in GlassFish provides Secure, Reliable, Transactional and .NET 3.0 interoperable Web services ? You can certainly read all about it in Metro Users Guide, post questions to Metro Forum, subscribe to Metro Blogs or The Aquarium.
But now there is a new 5 hours Web-based course, WTMB-SAS-1500, from Sun Training. The course content is organized in 5 different modules:
  • WMT-SAS-1543:Adding Quality of Service and .NET Interoperability to Web Services
  • WMT-SAS-2544: Creating Reliable and Secure Interoperable Web Services
  • WMT-SAS-2545: Creating Transactional Web Services
  • WMT-SAS-2546: Working With the Web Services Policy
  • WMT-SAS-2547: Brokered Trust
Each module explains What/Why/How of each technology and then shows a complete demo using NetBeans on how to use that feature. The course can be taken within 365 days after the purchase. Read more details here.

Here are some other related courses:
Technorati: sun training course metro webservices glassfish netbeans

Tuesday Apr 01, 2008

BizTalk Services SDK, GlassFish and Metro

Microsoft BizTalk R11 CTP was released last week and now contains a sample that is based on GlassFish, Metro and NetBeans. Even though today is April 1st, this is not intended to be an April Fool's Day joke. Read more about the sample in this blog entry. The relevant bits from the entry are quoted below:

The sample shows how to use the BizTalk Services Identity Security Token Service (STS) to secure the communication between a Java client and a Java service providing federated authentication and claims-based authorization. The sample, which you can find in ./Samples/OtherPlatforms/StandaloneAccessControl/JavaEE5 once you installed the SDK, is a pure Java sample not requiring any of our bits on either the service or client side. The interaction with our services is purely happening on the wire.

The Metro team over at Sun Microsystems has made a very significant contribution to making this all work. Before we started making changes to accommodate Java, there would have been very little hope for anyone to get this seemingly simple scenario to work. We had to make quite a few changes even though our service did follow the specs.

As a result of this collaboration, Metro 1.2 is going to be a better and more interoperable release for the Sun's customers and the greater Java community and BizTalk Services as well as our future identity products will be better and more interoperable, too. Win-Win. Thank you, Sun.

Thank you Microsoft for adding this sample to the BizTalk Services SDK.

Metro team demonstrated a similar demo at JavaOne 2007. The demo shows how an Excel 2007 client can invoke a secure and reliable endpoint deployed on GlassFish. The entire source code for the sample, along with instructions to build, are available here.

This is possible today because of our participation in previous 6 plugfests (Mar 2008, Nov 2007, Jul 2007, Oct 2006, Mar 2006, Nov 2005) hosted by Microsoft.

Technorati: glassfish netbeans metro webservices biztalk microsoft interoperability

Sunday Mar 30, 2008

Slides for St Louis & Kansas City Developer Update Meetings

I presented on GlassFish and Metro in Developer Update meetings in St Louis & Kansas City. The slides are available here. The demos shown in the talk can be seen at:
The healthcare scenario explained in the talk can be seen as a demo here and the associated source code can be downloaded here.

The flight out of Kansas City got cancelled because of a hydraulic pump failure and finally reached home around mid night :( I was at least glad to come back home the same night!

The travel calendar so far this year is:

Event City Date
The Server Side Java Symposium Las Vegas Mar 26, 2008
Ajax World East 2008 Day 2Day 1 New York Mar 18-19, 2008
SD West 2008 Santa Clara Mar 6, 2008
GlassFish Day Hyderabad, India Feb 29, 2008
Sun Tech Days - Day 2, Talent Show, Day 1 Hyderabad, India Feb 27-28, 2008
acts_as conference - Day 2, Day 1 Orlando Feb 8-9, 2008
South Bay Ruby Meetup Mountain View Jan 30, 2008

Next stop, FISL in Brazil.

Technorati: conf glassfish netbeans metro webservices stlouis kansascity

Tuesday Mar 25, 2008

Rails powered by GlassFish & jMaki @ The Server Side Java Symposium, Las Vegas - Mar 26, 2008

If you want to learn more about:
  • How to use GlassFish as development & deployment platform for Rails applications ?
  • How GlassFish v3 Gem provides a "green" alternative to WEBrick & Mongrel ?
  • How to use NetBeans & jMaki plug-in to embed rich widgets in your Rails applications ?
Then you can learn all about it in The Server Side Java Symposium, Las Vegas. Here are the coordinates:

Date: Mar 26, 2008
Time: 2:30 - 3:30pm
Track: Language & Coding
Title: Rails powered by GlassFish & jMaki

A popular statement for Las Vegas is What happens in Vegas, Stays in Vegas! But I promise to share all the slides & demos with you so that you can enjoy at least the technical part of it ;-)

Another interesting session worth attending is How to use the Metro Web services stack to Build Fast, Scalable Services by Kohsuke on Mar 26 (Wed) from 4:10 - 5:15pm.

Technorati: conf theserverside tssjs lasvegas rubyonrails glassfish jmaki netbeans metro webservices

Sunday Mar 16, 2008

Travel Schedule - Next 5 weeks

Here is my travel schedule for next 5 weeks:

Mar 17-21 Ajax World, New York Web Application Development using jMaki
Mar 25-26 The Server Side Java Symposium, Las Vegas Rails powered by GlassFish & jMaki
Mar 27 Developer Update, St Louis Westport DoubleTree, FREE event Open Source Web Services stack in GlassFish
Mar 28 Developer Update, Kansas City, FREE event Rich Internet Applications and GlassFish
Apr 16-19 FISL, Brazil Web 2.0 Application Development using jMaki and
Asynchronous Ajax for Revolutionary Web Applications

Stop by and say hello if you are present at any of the events. You'll hear about different GlassFish technologies:
  • How Metro provides enterprise-grade open source Web services stack for meeting all your needs
  • How jMaki allows you to create Rich Internet Applications
  • How Rails applications can be powered by GlassFish & jMaki
  • Asynchronous Ajax that allows you to scale your applications tremendously
  • And any other topic that you are interested in :)
Drop a comment if you are interested in a run or meal together ?

Technorati: conf glassfish metro webservices netbeans jmaki ajax newyork lasvegas stlouis kansascity brazil fisl ajaxworld tssjs

Wednesday Jan 30, 2008

TOTD #23: JavaFX Client invoking a Metro endpoint

This TOTD is inspired by Learning JavaFX Script - Part 3. The original article explains how to invoke a Web service from a JavaFX client using NetBeans 5.5.1 and GlassFish v1. Newer version of both NetBeans and GlassFish are available since the article was written. This TOTD (tip of the day) explains how to invoke a Metro endpoint deployed on GlassFish v2 from a JavaFX client - all using NetBeans 6.

  1. Following screencast #ws7, create a plain (without Security or Reliability enabled) Metro endpoint using NetBeans 6 and GlassFish v2.
  2. In NetBeans 6 IDE, install the JavaFX plugin as described here.
  3. Create Web service client library - Creating a Web service client in JavaFX Script Application is causing a NullPointerException (issue #126352). The workaround I used is to create a separate library with client-side artifacts and then include it as dependency in the JavaFX client project.
    1. Create a new project of type "Java Class Library" as shown below:

      and click on "Finish".
    2. Enter the project name as "MetroClientLibrary" as shown below:

      and click on "Finish".
    3. Right-click on the newly created project, select "New", "Web Service Client...".
    4. Click on "Browse..." button next to "Project" radio button and select the deployed Web service from Metro endpoint project. If the Web service is deployed on a different machine then you may specify the WSDL URL. Specify the package name "client" as shown below:

      and click on "Finish".
    5. Once the Web service client-side artifacts are generated (indicated by expandable Web Service References tree node), right-click on the project and select "Build". This generates a JAR file that will be utilized later. The location of this jar file is shown in the Output console. In our case, it is

  4. Create JavaFX project
    1. Create a new JavaFX project by right-clicking in the Project explorer, selecting "New Project" and entering the values as shown below:

    2. Click on "Next >" and enter the values as shown below:

      and click on "Finish".
    3. Right-click on the newly created project, "Properties", "Libraries", "Add JAR/Folder" and select the JAR file created in "MetroClientLibrary" project as shown below:

      and click on "OK".

      Notice, Java SE 6 U4 is used to compile and run this project. If you are using an earlier version of Java SE 6, then you need to override JAX-WS 2.1 and JAXB 2.1 jars using endorsed mechanism as explained here. The classes in these jars are already bundled in Java SE 6 U4.
    4. In metroclient.Main.fx file, replace "// place your code here" with the following code:

      import java.lang.\*;
      import javafx.ui.\*;

      import client.NewWebServiceService;
      import client.NewWebService;

      class InputModel {
          attribute name: String?;
      var inputModel = InputModel { };
      var nameField = TextField { };
      nameField.action = operation() {
 = nameField.value;

      class ButtonClickModel {
          attribute result: String;
      var model = new ButtonClickModel();

      Frame {
          title: "JavaFX Client -> Metro endpoint"
          width: 350
          height: 200
          content: GridPanel {
              rows: 3
              vgap: 5
              [SimpleLabel {
                  text: "Name : "
              SimpleLabel {
                  text: "Result from endpoint : "
              Label {
                  text: bind "{model.result}"
              Button {
                  text: "Invoke Web Service!"
                  action: operation() {
                      do {
                          try {
                              var service: NewWebServiceService = new NewWebServiceService();
                              var port: NewWebService = service.getNewWebServicePort();
                              var name: String = "{nameField.value}";
                              var result: String = port.sayHello(name);
                              System.out.println("response: {result}");
                              model.result = result;
                          } catch (e:Exception) {
                              System.out.println("exception: {e}");
          visible: true
  5. Invoke the JavaFX client project
    1. Right-click on the recently create project ("MetroClient") and select "Run Project". The following window is displayed:

    2. Enter "Duke" in the text box and click on "Invoke Web Service!" button to see the result as shown below:

After following these steps, you have created a JavaFX client that can invoke a Metro endpoint project deployed on GlassFish - all using NetBeans IDE.

Now Metro provides secure, reliable, transactional and .NET 3.0 interoperable Web service. Have you tried/used any of those features in Metro ?

Please leave suggestions on other TOTD that you'd like to see. A complete archive is available here.

Technorati: totdd javafx metro glassfish netbeans webservices

Thursday Jan 24, 2008

TOTD #22: Java SE client for a Metro endpoint

Metro is the Web services stack in GlassFish. It is your one-stop shop from a simple Hello World to Secure, Reliable,  Transactional and .NET 3.0 interoperable endpoint. Metro Tooling is provided by NetBeans and other options are explained here.

Screencast #ws7 describes how a Metro endpoint can be easily created and deployed on GlassFish and invoked from a Web client using NetBeans IDE. This TOTD (as requested here and here) describes how a Secure and Reliable Metro endpoint can be invoked using a Java SE client.

Here is my environment:

Let's get started.

  1. Following screencast #ws7 create a plain (without Reliability and Security enabled) Metro endpoint.
  2. Create the Java SE client project
    1. In NetBeans IDE, create a new project of the type Java/Java Application. Name the project as "SEClient" and take all other defaults.
    2. Right-click on the newly created project, select "New", "Web Service Client...".
    3. Click on the "Browse..." button next to "Project" radio button and select the deployed Web service endpoint.
    4. Enter the package name as "client" and click on "Finish".
  3. Invoke the plain Metro endpoint
    1. Right-click on the project, select "Properties", "Libraries", "Add JAR/Folder" and add "webservices-rt.jar" from the "lib" directory of GlassFish installation. Click on "OK".
    2. Expand the "Web Service References" node in the project and drag the leaf node in the "main" method of "" of the client project.
    3. Change the value of parameter "name" to "Duke".
    4. Right-click the project and select "Run". This will build the project, invoke the endpoint and show the results in Output window as "Hello Duke".
    5. If your GlassFish instance is configured to show SOAP messages then the following SOAP messages will be shown in the output window:

      <?xml version="1.0" ?>
      <S:Envelope xmlns:S="">
          <ns2:sayHello xmlns:ns2="http://server/">
      <?xml version="1.0" ?>
      <S:Envelope xmlns:S="">
          <ns2:sayHelloResponse xmlns:ns2="http://server/">
            <return>Hello Duke</return>
  4. Invoke the Reliable Metro endpoint
    1. Following the instructions in screencast #ws7, enable Reliability on Metro endpoint and re-deploy.
    2. In the client project, select the first child node of "Web Service References", right-click and select "Refresh Client".
    3. In the "Confirm Client Refresh" window, select "Also replace local wsdl file with original WSDLs located at:" checkbox and click on "Yes".
    4. Right-click the client project and select "Run". This will build the project, invoke the endpoint and show the results in Output window as "Hello Duke".
    5. The SOAP messages during this run will now contain Reliable Messaging protocol messages and resemble as shown below:

      <?xml version="1.0" ?>
      <S:Envelope xmlns:S="">
          <To xmlns="">http://localhost:8080/SEEndpoint/HelloServiceService</To>
          <Action xmlns=""></Action>
          <ReplyTo xmlns="">
  5. Invoke the Secure Metro endpoint
    1. Following the instructions in screencast #ws7, disable Reliability and enable Security on Metro endpoint and re-deploy.
    2. In the client project, select the first child node of "Web Service References", right-click and select "Refresh Client".
    3. In the "Confirm Client Refresh" window, select "Also replace local wsdl file with original WSDLs located at:" checkbox and click on "Yes".
    4. Right-click on the first child of "Web Service References" node, select "Edit Web Service Attributes" and select "Use development defaults". This will ensure that client and endpoint security credentials match.
    5. Expand "Source Packages", "META-INF" and open "HelloServiceService.xml". The name of this file is derived from the service name at the endpoint and may be different. Specify the location of trust store by adding the following attributes to "sc:KeyStore" element:

      location="C:\\testbed\\glassfish\\final\\glassfish\\domains\\domain1\\config\\cacerts.jks" type="JKS" storepass="changeit"

      The updated element looks like:

      <sc:TrustStore wspp:visibility="private" peeralias="xws-security-server" location="C:\\testbed\\glassfish\\final\\glassfish\\domains\\domain1\\config\\cacerts.jks" type="JKS" storepass="changeit"/>

      Make sure to match the value of location and password of the trust store in your environment.
    6. Right-click the client project and select "Run". This will build the project, invoke the endpoint and show the results in Output window as "Hello Duke".
    7. The SOAP messages during this run are now secured using the default security profile in NetBeans. The SOAP messages resemble as shown below:

      <?xml version="1.0" ?>
        xmlns:ds="" xmlns:xenc=""
          <To xmlns="" wsu:Id="5006">http://localhost:8080/SEEndpoint/HelloServiceService</To>
          <Action xmlns="" wsu:Id="5005">http://server/HelloService/sayHelloRequest</Action>
          <ReplyTo xmlns="" wsu:Id="5004">
          <MessageID xmlns="" wsu:Id="5003">uuid:bb0e9571-a773-49bb-bad0-20a01d3af9f1</MessageID>
          <wsse:Security S:mustUnderstand="1">
            <wsu:Timestamp xmlns:ns10="" wsu:Id="3">

If you are using JDK version prior to Java SE 6 U4, then need to override the JAX-WS and JAXB API as described here. Java SE 6 U4 already includes JAX-WS and JAXB 2.1 APIs which are required for the Metro client to work.

Please leave suggestions on other TOTD that you'd like to see. A complete archive is available here.

Technorati: totd webservices metro glassfish netbeans javase

Thursday Jan 17, 2008

Travel Plans for Q1 2008 - Fairfax, Little Rock, Orlando, Hyderabad, New York, Las Vegas

Here are my tentative travel plans for the next 3 months:
Event Dates Location
Partner Preso Jan 23 Fairfax, Virginia
Partner Preso Jan 24 Little Rock, Arkansas
Rails for All Feb 8-9 Orlando, Florida
Sun Tech Days Feb 27-29 Hyderabad, India
Ajax World Mar 18-20 New York
The Server Side Java Symposium Mar 26-28 Las Vegas

Stop by and say hello if you are at any of the locations! Also, drop a comment or shoot me an email if you'd like me to talk to your local Java User Group about GlassFish provides an open-source, production-quality and Java EE 5 compatible Application Server. We can also drill down on Metro or jMaki with numerous working samples. If you host or attend a Ruby Meetup then we can also talk about JRuby on GlassFish.

Let me know if you'll be interested in running a few miles together :)

Technorati: glassfish metro jruby ruby jmaki meetup jug webservices web2.0

Wednesday Jan 16, 2008

Tango Overview - Now Translated in Chinese

"Project Tango: Adding Quality of Service and .NET Interoperability to the Metro Web Services Stack" - The original article, introduced here, provides an introduction to how different Quality-of-Service, such as Security, Reliability and Transactions are enabled in Metro. One of the core benefits of Metro is interoperability with .NET 3.0 and the article describes how that is baked in the Web services stack.

The same article is now available in Chinese at Sun Developer Network China. Thanks to the Globalization Team in China for completing this effort, and Zhen Tao in particular who did the translation!

Metro runtime is available as part of GlassFish v2 UR1 and tooling is available in NetBeans 6.

Let us know if you'll be interested in creating a localized version of this article.

Technorati: metro webservices tango glassfish netbeans china


profile image
Arun Gupta is a technology enthusiast, a passionate runner, author, and a community guy who works for Oracle Corp.

Java EE 7 Samples

Stay Connected


« July 2016