Miles to go ...

Arun Gupta is a Technology Evangelist for Web Services and Web 2.0 Apps at Sun. He was the spec lead for APIs in the Java platform, committer in multiple Open Source projects, participated in standard bodies and contributed to Java EE and SE releases.
« TOTD #10: Consuming... | Main | Screencast #Web 9:... »

http://blogs.sun.com/arungupta/date/20071003 Wednesday October 03, 2007

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

del.icio.us | furl | simpy | slashdot | technorati | digg
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 09: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 09: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 10: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 11: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 09, 2007 at 06:24 AM 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 10: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 09: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 11: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 19, 2007 at 06:20 AM 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 07:31 AM PDT #

NB 6.0 is scheduled to be released later this year.

Posted by Arun Gupta on October 27, 2007 at 08: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 08: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 26, 2007 at 05:22 AM 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 11: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 08, 2007 at 04:58 AM 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 01:10 PM 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 03:00 PM 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 03:59 PM 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 08: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 12:42 PM 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 08: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 04:58 PM 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 04:59 PM 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 08:54 AM PST #

thanks a lot, i will also use this screencast

Posted by alper celik on January 03, 2008 at 04:04 PM 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 02:37 PM 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 18, 2008 at 07:46 AM 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 25, 2008 at 07:15 AM 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 25, 2008 at 07:20 AM 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 08: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 09: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 03:04 PM PDT #

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

Posted by Muhammad Faisal on April 24, 2008 at 04:44 AM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
« TOTD #10: Consuming... | Main | Screencast #Web 9:... »

Valid HTML! Valid CSS!

This is a personal weblog, I do not speak for my employer.

--> ajax ajaxworld conf eclipse fitness gem glassfish glassfishday hyderabad india indigo interoperability javaone javaone2008 jax-ws jmaki jpa jruby marathon metro microsoft mysql netbeans phobos photography presos railsconf ruby rubyonrails running runninglog runsfm screencast siliconvalleymarathon sun suntechdays swdp tango theserverside totd training traveltips v3 vista wcf web2.0 webservices windows wsaddressing wsit
Project Tango: Adding Quality of Service and .NET Interoperability to the Metro Web Services Stack
Locations of visitors to this page

calendar

« May 2008
SunMonTueWedThuFriSat
    
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
       
Today

Stats

Today's Page Hits: 34


Total # blog entries: 594
Total # comments: 1619

www.flickr.com
This is a Flickr badge showing public photos from ArunGupta. Make your own badge here.
Add to Technorati Favorites

Last 50