Miles to go …

October 3, 2007

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

Filed under: webservices — arungupta @ 11:00 pm

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

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • DZone
  • email
  • StumbleUpon
  • Technorati
  • Twitter
  • Slashdot
Related posts:
  1. Screencast #WS3: Reliable and Interoperable Web service using WSIT plug-in, NetBeans and GlassFish
  2. Screencast #29: Web service using NetBeans 6.8 and GlassFish v3 (Accessing database in business method)
  3. Screencast #WS1: Web services development using NetBeans IDE and GlassFish
  4. Screencast #WS2: Invoking a Web service using NetBeans IDE
  5. TOTD #21: Metro 1.1 with GlassFish v2 UR1 and NetBeans 6

49 Comments »

  1. 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

    Comment by Glen — October 4, 2007 @ 9:37 am

  2. 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/.

    Comment by Arun Gupta — October 4, 2007 @ 9:43 am

  3. 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?

    Comment by Ali — October 4, 2007 @ 10:12 am

  4. 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).

    Comment by Davide Gesino — October 8, 2007 @ 11:51 pm

  5. 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

    Comment by Arun Gupta — October 9, 2007 @ 6:24 am

  6. 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.

    Comment by Arun Gupta — October 10, 2007 @ 10:33 pm

  7. [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…

    Comment by Arun Gupta's Blog — October 12, 2007 @ 9:37 am

  8. [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…

    Comment by Arun Gupta's Blog — October 16, 2007 @ 11:20 pm

  9. [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 …

    Comment by Arun Gupta's Blog — October 19, 2007 @ 6:20 am

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

    Comment by Sridhar Kokkula — October 27, 2007 @ 7:31 am

  11. NB 6.0 is scheduled to be released later this year.

    Comment by Arun Gupta — October 27, 2007 @ 8:12 am

  12. [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),…

    Comment by Arun Gupta's Blog — October 30, 2007 @ 8:20 am

  13. [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…

    Comment by Arun Gupta's Blog — November 26, 2007 @ 5:22 am

  14. 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.

    Comment by Shirish — November 28, 2007 @ 11:46 pm

  15. [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…

    Comment by Arun Gupta's Blog — December 8, 2007 @ 4:58 am

  16. 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.

    Comment by Arun Gupta — December 11, 2007 @ 1:10 pm

  17. 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?

    Comment by Jeremy Ross — December 26, 2007 @ 3:00 pm

  18. 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

    Comment by Arun Gupta — December 26, 2007 @ 3:59 pm

  19. 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

    Comment by Jeremy Ross — December 27, 2007 @ 8:43 am

  20. 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

    Comment by Peter — December 31, 2007 @ 12:42 pm

  21. 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…

    Comment by Neil Hathaway — January 2, 2008 @ 8:51 am

  22. 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

    Comment by Arun Gupta — January 2, 2008 @ 4:58 pm

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

    Comment by Arun Gupta — January 2, 2008 @ 4:59 pm

  24. [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…

    Comment by Arun Gupta's Blog — January 3, 2008 @ 8:54 am

  25. thanks a lot, i will also use this screencast

    Comment by alper celik — January 3, 2008 @ 4:04 pm

  26. 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?

    Comment by Javier Imbús — January 17, 2008 @ 2:37 pm

  27. 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

    Comment by Peter — January 18, 2008 @ 7:46 am

  28. 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

    Comment by Arun Gupta — January 25, 2008 @ 7:15 am

  29. [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…

    Comment by Arun Gupta's Blog — January 31, 2008 @ 8:59 am

  30. [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…

    Comment by Arun Gupta's Blog — March 31, 2008 @ 9:17 am

  31. 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

    Comment by Dominic Holt — April 18, 2008 @ 3:04 pm

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

    Comment by Muhammad Faisal — April 24, 2008 @ 4:44 am

  33. [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…

    Comment by Arun Gupta's Blog — July 18, 2008 @ 7:11 am

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

    Comment by Flint — July 23, 2008 @ 8:44 am

  35. [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…

    Comment by Arun Gupta's Blog — September 25, 2008 @ 5:11 am

  36. I found NetBeans 6.0 as excellent.

    Is this right?

    Comment by Nappy Rash — October 19, 2008 @ 7:31 am

  37. Oh yeah, NetBeans 6.0 is indeed excellent :)

    What particularly do you like about it ?

    Comment by Arun Gupta — October 19, 2008 @ 7:36 am

  38. 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!

    Comment by Nappy Rash — October 29, 2008 @ 11:39 am

  39. [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)…

    Comment by Arun Gupta's Blog — November 17, 2008 @ 5:52 am

  40. 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!

    Comment by laptop batteries — November 26, 2008 @ 8:46 pm

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

    Comment by Arun Gupta — November 27, 2008 @ 8:48 am

  42. [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…

    Comment by Arun Gupta's Blog — February 19, 2009 @ 3:39 am

  43. [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…

    Comment by Arun Gupta's Blog — February 19, 2009 @ 3:46 am

  44. 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

    Comment by Pratap Reddy Maddi — February 20, 2009 @ 1:27 am

  45. Pratap,

    The slides are available at:

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

    Comment by Arun Gupta — February 22, 2009 @ 9:55 pm

  46. Güzel paylaşım olmuş

    Comment by Notebook tamiri — August 23, 2009 @ 4:58 am

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

    Comment by Share — April 18, 2010 @ 10:05 am

  48. Share,

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

    Comment by Arun Gupta — April 19, 2010 @ 3:02 pm

  49. except with RM. My web Client

    Comment by luxury motor yacht charter — April 21, 2010 @ 2:34 pm

RSS feed for comments on this post. TrackBack URL

Leave a comment

The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.
Powered by WordPress