Screencast #WS7: Secure and Reliable Web service using Metro/GlassFish and NetBeans IDE 6

The Web services support in NetBeans 6 is further simplified from NetBeans 5.5.1. There are two main points I like:

  • Integral support for Security, Reliability and Transactions on an endpoint. This means there is no need to download any additional plug-in.
  • A new Web Services Designer allows to design the Web service visually. This lowers the entry barrier for first-time users.

There are other minor enhancements as well which makes the overall experience much more pleasant. This screencast shows how a Secure and Reliable Web service can be easily developed using NetBeans 6 and deployed on Metro/GlassFish.

A cutting edge build of NetBeans 6 can be downloaded from here or a more stable build (beta 1 as of today) from here. GlassFish V2 Final is bundled with both NetBeans beta1 and daily build.

Enjoy it here!

Technorati: screencast webservices metro glassfish netbeans

Comments:

Nice presentation Arun. Question: When you are activating Reliable Messaging, does that imply that Metro is switching from HTTP to JMS as the transport mechanism? Conversely (if the answer to the preceding question is "no"), if you're using JMS, does activating Reliable Messaging become unnecessary or redundant? Thanks, Glen

Posted by Glen on October 04, 2007 at 02:37 AM PDT #

Metro implements the WS-Reliable Messaging specification. The complete list of specifications is available at: http://wsit.dev.java.net/specification-links.html. Activating Reliable messaging ensures that appropriate protocol negotiation ( as defined in the WS-RM specification) happens behind-the-scenes for Web services messages and they are delivered as per the "delivery assurance" configured on the endpoint. OTOH JMS uses a binary protocol for message exchange. However you can use JMS as an alternate transport (as opposed to HTTP) in Metro as well. More details are available at: https://jms-ws-transport.dev.java.net/.

Posted by Arun Gupta on October 04, 2007 at 02:43 AM PDT #

Thanks for the great presentation Arun! Do you have any plans on doing screencasts about Web Service security scenarios (Message Level, Transport Level, STS...etc) between Metro and .NET 3.0?

Posted by Ali on October 04, 2007 at 03:12 AM PDT #

Nice presentation...the specifications are covered gracefully and the visual WS editor looks great!!!

I have a question... will (and approx when) Metro be conform to more advanced security specifications?
I mean WS-SecureConversation, WS-Trust and WS-SecurityPolicy.
There is any plan about it?

I think it would be great to see an example with more complex data structures passing on the wire (involving more JAXB stuff).

Posted by Davide Gesino on October 08, 2007 at 04:51 PM PDT #

Davide, Metro already implements WS-Secure Conversation, WS-Trust and WS-Security Policy. A complete list of specifications is available at:

http://wsit.dev.java.net/specification-links.html

You can always pass more complex data structures and JAXB will take care of marshalling/unmarshalling them. If you have a specific question, please post it at Metro forum:

http://forums.java.net/jive/forum.jspa?forumID=46

Posted by Arun Gupta on October 08, 2007 at 11:24 PM PDT #

Ali, Secure Web services interop scenario has been on my TODO list for a while. I will do it in the next few weeks so please stay tuned.

Posted by Arun Gupta on October 10, 2007 at 03:33 PM PDT #

[Trackback] A user asked how to invoke a Java EE 5 Web service from JRuby. This TOTD explains how a simple Metro Web service deployed on GlassFish V2 can be easily invoked from JRuby. Create a simple Web service using...

Posted by Arun Gupta's Blog on October 12, 2007 at 02:37 AM PDT #

[Trackback] Mid West Java Tech Days concluded in Minneapolis earlier today. First, here are some facts I learned about Minneapolis: Minneapolis is a Twin City with St Paul Has 20 lakes and wetlands Mall of America - Biggest retail and...

Posted by Arun Gupta's Blog on October 16, 2007 at 04:20 PM PDT #

[Trackback] Mid West Java Tech Days concluded in Chicago yesterday. With approximately 160 participants, the conference attendees were slightly larger in number than the Minneapolis Tech Days. The interaction with the audience was also good. The day started with ...

Posted by Arun Gupta's Blog on October 18, 2007 at 11:20 PM PDT #

I found NetBeans 6.0 as excellent.
pls let me know when your going to release its full version

Posted by Sridhar Kokkula on October 27, 2007 at 12:31 AM PDT #

NB 6.0 is scheduled to be released later this year.

Posted by Arun Gupta on October 27, 2007 at 01:12 AM PDT #

[Trackback] Rama and I presented on Metro and jMaki in Silicon Valley Code Camp last Saturday. Here are the pictures: It was good to meet Peter Kellner (SVCC Organizer), Aaron Houston (Program Coordinator for JUGs), Van Riper (Silicon Valley JUG Founder),...

Posted by Arun Gupta's Blog on October 30, 2007 at 01:20 AM PDT #

[Trackback] This TOTD explains how to add Reliability and Security to a Contract-First Endpoint using NetBeans IDE. In the Contract-First, the contract, i.e. the WSDL, is defined first as opposed to starting from Java. The Metro programming model starts with a...

Posted by Arun Gupta's Blog on November 25, 2007 at 09:22 PM PST #

The screencast was really useful.
Can you post an example where all the configuration for WS-IT is done manually without using wizards from NetBeans.

Posted by Shirish on November 28, 2007 at 03:46 PM PST #

[Trackback] New Instructor-led classroom training sessions on Java EE 5 Web Services are now available. Creating Web Services Using Java Technology (course #DWS-3111-EE5) Designing Java Web Services (course #DWS-4112-EE5) Developing Secure Java Web Services (cours...

Posted by Arun Gupta's Blog on December 07, 2007 at 08:58 PM PST #

Shirish, manual configuration of WSIT is very tedious and requires understanding policy assertion syntax, WSDL syntax and other details. Right now, NetBeans IDE is the only way to configure WSIT capabilities on an endpoint.

Posted by Arun Gupta on December 11, 2007 at 05:10 AM PST #

Arun, I get a lot of audio blips and garbles and a/v sync issues when watching this. I'm running Mac OS 10.4. Any idea if this is a problem with the video or my computer?

Posted by Jeremy Ross on December 26, 2007 at 07:00 AM PST #

Jeremy,

I just watched this screencast on my Mac OS 10.4 laptop and it worked fine. I tried both Firefox 2.0.0.x and Safari. What is your environment ?

-Arun

Posted by Arun Gupta on December 26, 2007 at 07:59 AM PST #

It's a problem with Flash v9.0.115.0 released on 12/03/07. Currently the only solution is to install a previous version of flash.

uninstall current version: http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_14157&sliceId=2

get previous flash versions:
http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_14266&sliceId=1

Posted by Jeremy Ross on December 27, 2007 at 12:43 AM PST #

One question, how do I make the Glassfish output display in NetBeans show the soap messages that are being sent across the wire? That is very handy but mine is not doing it for some reason. Thanks, Peter

Posted by Peter on December 31, 2007 at 04:42 AM PST #

Hi Arun, nice screen cast, I am having trouble with secure web services, I have followed your demo and still can not get secure ws to work.

I am using nb6 on a windows machine, it seems to be fine on my ubuntu linux machine same versions of nb plugin etc. any pointers would be gratefully received...

Posted by Neil Hathaway on January 02, 2008 at 12:51 AM PST #

Peter, SOAP messages can be displayed by setting the logging properties in domain.xml as described at:

http://blogs.sun.com/arungupta/entry/message_logging_in_wsit_updated

Complete details about Metro logging are available at:

http://blogs.sun.com/arungupta/entry/totd_1_soap_messaging_logging

Posted by Arun Gupta on January 02, 2008 at 08:58 AM PST #

Neil, What error are you seeing with NB6/Windows machine ? Please provide either a screen dump or NetBeans log.

Posted by Arun Gupta on January 02, 2008 at 08:59 AM PST #

[Trackback] Metro 1.1 was released last month. This blog describes how to install Metro 1.1 on GlassFish v2 UR1 (which comes with Metro 1.0 baked in) and use it with NetBeans IDE. Download & Install Metro 1.1. Download, Install & Configure...

Posted by Arun Gupta's Blog on January 03, 2008 at 12:54 AM PST #

thanks a lot, i will also use this screencast

Posted by alper celik on January 03, 2008 at 08:04 AM PST #

Hello Arun, I'm trying to deploy a secure web service using your presentation as a guide, but I'm using a Java Desktop Application as a web client. The application can use de web service method only if "Secure Services" is not selected. If I use that feature the Desktop Application does not work fine. What I can do?

Posted by Javier Imbús on January 17, 2008 at 06:37 AM PST #

Arun, I have the same problem as Javier except with RM. My web Client works but my regular java app client does not. Maybe a bug? Here is the glassfish error:

A required header representing a Message Addressing Property is not present, Problem header:{http://www.w3.org/2005/08/addressing}Action
com.sun.xml.ws.addressing.model.MapRequiredException

Looks like WS-Addressing is not working properly

Posted by Peter on January 17, 2008 at 11:46 PM PST #

Javier, Peter, A new blog now describes in detail how Java SE client can invoke a Secure and Reliable Metro endpoint. See it live at:

http://blogs.sun.com/arungupta/entry/totd_22_java_se_client

Posted by Arun Gupta on January 24, 2008 at 11:15 PM PST #

[Trackback] 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. S...

Posted by Arun Gupta's Blog on January 24, 2008 at 11:20 PM PST #

[Trackback] 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...

Posted by Arun Gupta's Blog on January 31, 2008 at 12:59 AM PST #

[Trackback] 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: Secure and Reliable Web service development and deployment using...

Posted by Arun Gupta's Blog on March 31, 2008 at 02:17 AM PDT #

Arun,

Thanks for the great tutorial. Unfortunately, I have done everything you've said as far as setting up a secure web service and I still can't validate properly on the client end. I have even gone into the files and manually edited the username/password so they match up on both the client and server sides.

I receive this error message:
WSP1049: Loaded WSIT configuration from file: file:/C:/Users/Dominic/Documents/NetBeansProjects/TestClient/build/web/WEB-INF/classes/META-INF/wsit-client.xml
SEC5046: Audit: Authentication refused for [wsitUser].
SEC1201: Login failed for user: wsitUser
WSS1408: UsernameToken Authentication Failed
javax.xml.ws.soap.SOAPFaultException: Invalid Username Password Pair

My environment is Windows Vista 64 and I have Java 6, glassfish v2, and Netbeans 6.0.1 installed.

Would appreciate any help you can give.

Thanks,

Dominic

Posted by Dominic Holt on April 18, 2008 at 08:04 AM PDT #

good link giving productive information to user. very much relevant to the given topic.

Posted by Muhammad Faisal on April 23, 2008 at 09:44 PM PDT #

[Trackback] I presented on GlassFish at Utah JUG yesterday, slides are available. The topic provided insight into GlassFish v2, the current production version, and GlassFish v3 - the upcoming modular, embeddable & extensible version. There were close...

Posted by Arun Gupta's Blog on July 18, 2008 at 12:11 AM PDT #

Dominic, I have had the same results as you. Please post back if you find a solution!

Posted by Flint on July 23, 2008 at 01:44 AM PDT #

[Trackback] Mauricio, Doris, Simon and I visited DFJUG @ Taguatinga yesterday (make sure to pronounce it correctly, otherwise you'll be corrected again & again, as I was :). 200 attendees, mostly students, stayed all along the 4 hourof  present...

Posted by Arun Gupta's Blog on September 24, 2008 at 10:11 PM PDT #

I found NetBeans 6.0 as excellent.

Is this right?

Posted by Nappy Rash on October 19, 2008 at 12:31 AM PDT #

Oh yeah, NetBeans 6.0 is indeed excellent :)

What particularly do you like about it ?

Posted by Arun Gupta on October 19, 2008 at 12:36 AM PDT #

Well I asked a friend who's a developer to create software to share data on my phone. He said ''no'' then found NetBeans and has created something that now works, brilliant!

Posted by Nappy Rash on October 29, 2008 at 04:39 AM PDT #

[Trackback] Presented on GlassFish at Java MUG last week. The event is hosted at Sun's North Dallas Office. It was impressive to know that local Sun team is hosting 4 User Groups (MySQL, Solaris, and OpenSolaris other than the JUG)...

Posted by Arun Gupta's Blog on November 16, 2008 at 09:52 PM PST #

Well I asked a friend who's a developer to create software to share data on my phone. He said ''no'' then found NetBeans and has created something that now works, brilliant!

Posted by laptop batteries on November 26, 2008 at 12:46 PM PST #

That's good to know, feel free to share your feedback at: http://my.netbeans.org/index.php?page=feedback

Posted by Arun Gupta on November 27, 2008 at 12:48 AM PST #

[Trackback] India has always had the largest number of attendees of all the Tech Days, and this time is certainly no exception. 10,000+ attendees, the passion for technology, the eagerness to share their work, and everything else makes it certainly...

Posted by Arun Gupta's Blog on February 18, 2009 at 07:39 PM PST #

[Trackback] India has always had the largest number of attendees of all the Tech Days, and this time is certainly no exception. 10,000+ attendees, the passion for technology, the eagerness to share their work, and everything else makes it certainly...

Posted by Arun Gupta's Blog on February 18, 2009 at 07:46 PM PST #

Your presentation on WSIT was very useful. Where can I download your presentation. I want to go through it again as I could not find time to write down the notes as the presentation was fast due to very less time. Can you please put that online?

Thanks a lot!

Regards,
Pratap

Posted by Pratap Reddy Maddi on February 19, 2009 at 05:27 PM PST #

Pratap,

The slides are available at:

http://blogs.sun.com/arungupta/resource/confs/wsit-techdays-hyderabad09.pdf

Posted by Arun Gupta on February 22, 2009 at 01:55 PM PST #

Güzel paylaşım olmuş

Posted by Notebook tamiri on August 22, 2009 at 09:58 PM PDT #

I wonder if most of these comments are still relevant in the light of recent developments?

Posted by Share on April 18, 2010 at 03:05 AM PDT #

Share,

http://blogs.sun.com/arungupta/entry/screencast_29_web_service_using is a more recent screencast of this capability.

Posted by Arun Gupta on April 19, 2010 at 08:02 AM PDT #

except with RM. My web Client

Posted by luxury motor yacht charter on April 21, 2010 at 07:34 AM PDT #

I wonder if most of these comments are still relevant in the light of recent developments?

Posted by RFID on October 22, 2011 at 12:09 AM PDT #

Post a Comment:
Comments are closed for this entry.
About

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

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
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
   
       
Today