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:
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
Posted by Arun Gupta in webservices | Comments[46]
|
|
|
|
|
Today's Page Hits: 2567
Total # blog entries: 931
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 #
Posted by Arun Gupta's Blog on October 12, 2007 at 09:37 AM PDT #
Posted by Arun Gupta's Blog on October 16, 2007 at 11:20 PM PDT #
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 #
Posted by Arun Gupta's Blog on October 30, 2007 at 08:20 AM PDT #
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 #
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 #
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 #
Posted by Arun Gupta's Blog on January 25, 2008 at 07:20 AM PST #
Posted by Arun Gupta's Blog on January 31, 2008 at 08:59 AM PST #
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 #
Posted by Arun Gupta's Blog on July 18, 2008 at 07: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 08:44 AM PDT #
Posted by Arun Gupta's Blog on September 25, 2008 at 05:11 AM PDT #
I found NetBeans 6.0 as excellent.
Is this right?
Posted by Nappy Rash on October 19, 2008 at 07: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 07: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 11:39 AM PDT #
Posted by Arun Gupta's Blog on November 17, 2008 at 05:52 AM 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 08: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 08:48 AM PST #
Posted by Arun Gupta's Blog on February 19, 2009 at 03:39 AM PST #
Posted by Arun Gupta's Blog on February 19, 2009 at 03:46 AM 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 20, 2009 at 01:27 AM 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 09:55 PM PST #