X

NetBeans 6 M10 and Web Service Designer

Guest Author
NetBeans 6 Milestone 10 is now
available.
One of the
new and
noteworthy features
is

better Web services support
. This entry is a follow up to an
earlier post
where Web services designer was tried on Milestone 9.



  1. Uninstall NetBeans 6 M9 build from the machine.


  2. Download
    either the Full or Standard version. Full version provides UML,

    SOA and Ruby support as well. I downloaded Full version and did a custom

    install as shown

    here:




  3. The build number is 200706281431 as shown here:







    Click through Next buttons and finish installing taking defaults all the way

    through.

  4. After the install is completed, it requires to start NetBeans IDE from

    the Start Menu or desktop icon as shown here:







    An option to start NetBeans IDE after finishing the install would be

    nice (issue

    #108809
    ).

  5. The first visible difference from NetBeans M9 and NetBeans 5.5.1 is that

    "Runtime" tab is now renamed to "Services". Even the content within Services

    tab is cleaned up and re-ordered. Here is a snapshot from NetBeans 5.5.1 and

    NetBeans 6 M10:

     









  6. Adding Server instance is a better experience and shows GlassFish V2 as

    the default. Here is a snapshot from NetBeans 5.5.1 and NetBeans 6 M10:



     









  7. A new addition to M10 is that it allows to choose a


    GlassFish profile
    as shown here:




  8. I used

    GlassFish V2 b53
    and added the server instance by taking all defaults.

  9. Following the instructions #2 and #3 from


    here
    , add a new Web service to a Web project. The Web Service Designer

    color scheme is now much more in-lined with the existing IDE as shown here:







    The

    earlier version
    always used to remind of three colors in the

    Indian national

    flag
    :) Notice the small icons right next to "Design" button, they allow

    you to fit the diagram in current window size. But there is a small gotcha.

    Any hints ? Notice the missing letter "n" in "Policy Configuration" and "g"

    in "Reliable Messaging" (issue

    #108807
    ).

  10. Click on "Add Operation" and it allows you to add an operation by

    specifying the operation name and parameters. And the new thing is, it

    allows you to add Exceptions as well as shown here:







    Couple of issues here. First the parameter name specified in designer is

    ignored and the source code still uses the default parameter name

    "parameter". However little bit more investigation revealed that tabbing out

    of the parameter box did accept the parameter name. This is a usability

    issue and so I filed

    #108794.

    Secondly, the faults are still not correctly displayed in the designer as

    shown here:







    The source view of the Web service shows:



    public String operation(@WebParam(name = "parameter")

    String parameter) throws {

    //TODO write your implementation code here:

    return null;

    }




    Notice, an empty throws clause (issue

    #108798
    ). An expanded view looks like:




  11. Because of

    #108798,

    I had to remove the operation and add it again and this time without any

    faults. So I right-clicked on the project and the deploy sub-menu is changed

    as shown here:







    For the first time deployment, this menu item is confusing. I think the

    thought process behind this might have been that "Deploy" by itself (which

    was in NetBeans 5.5.1) does not give the feeling that it undeploys the

    previous project. But why does the user need to know it ? Another option is

    to change the menu item label if the project is already deployed. But this

    label is certainly confusing. (issue

    #108801
    ).

  12. Once the project was deployed, I tried "Test Web Service" contextual

    menu and it worked like a charm.

  13. Selecting one of the boxes in "Policy Configuration" generated the

    appropriate WSIT configuration file. And it was also found to be in-sync

    with the "WSIT Configuration" tab that is reached by clicking "Edit Web

    Service Attributes" in the contextual menu.

  14. To verify WSIT functionality, I selected "Reliable Messaging" in Policy

    Configuration, deployed the project again and invoked the endpoint. As

    expected, several WS-Addressing and WS-Reliable Messaging headers were shown

    in the browser window confirming that Reliable Messaging was correctly

    enabled.

Here is a summary of the issues filed:



  1. An option to start NetBeans IDE after install is completed (#108809)

  2. Parameter name specified in Designer is not propagated to the source

    code (#108794)

  3. Faults are broken in Designer (#108798)

  4. Incomplete words if Window is resized (#108807)

  5. "Undeploy and Deploy" menu label is confusing (#108801)

Technorati: wsit
webservices
glassfish

netbeans

Join the discussion

Comments ( 2 )
  • Arun Gupta's Blog Thursday, October 4, 2007
    [Trackback] 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...
  • Arun Gupta's Blog Monday, November 26, 2007
    [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...
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.