GlassFish v2 supported in IntelliJ Web Services Plugin

Guest Author
As a follow up from a previous
, the Web Services
in IntelliJIDEA now supports GlassFish
. Here are the steps I followed to deploy the Web service on GlassFish:

  1. I updated the plugin version from "0.6 build 2" to "0.7
    build 1" as shown
  2. Using Project Settings (default shortcut Ctrl+Alt+S), configure GlassFish
    in the Web Services plugin as shown
  3. Following steps 1, 2, and 3 from the previous
    , I created a POJO and enabled Web service support as shown
    . There is no need to add any GlassFish specific deployment
    descriptor. However make sure web.xml is using version 2.5 as shown
  4. Following Steps 4, 5, and 6 from the previous
    , I added the @javax.jws.WebService annotation and
    exposed the class as Web service as shown
    . The menu item changed from "Expose Class as Web Service"
    to "Deploy Class as Web Service". I find this confusing since at
    this stage the service endpoint is not getting deployed. Instead, under the
    covers required artifacts are generated. There is an explicit deploy step
    later and it's confusing to mix that here. I think it should be renamed back
    to "Expose Class as Web Service".
  5. To configure and run the GlassFish instance and deploy the newly created
    module, follow the instructions as shown in Step 7 here.
  6. Once the GlassFish server has started, the endpoint is hosted at http://localhost:8080/hello/services/Hello.

Now, we need to invoke the Web service using the following steps:

  1. Add a new "Java Module" to the project by selecting
    "File", "New Module".
  2. Select the newly created module in the "Project" window. In
    "Tools" menu, select "WebServices", "Generate Java
    Code From Wsdl" as shown
    . This generates the client-side artifacts and can be seen by
    expanding "src" node in "helloclient" module.
  3. Add a new class "HelloClient" in the "client" subnode
    of "src" as shown below:

    public class HelloClient {

      public static void main(String[] args) {



  4. Build the module by selecting "helloclient" node, right-click,
    selecting "Make module "helloclient"".
  5. Add add activation.jar as a module library as shown
  6. Right-click HelloClient, select "Run "HelloClient.main()""
    (default shortcut Ctrl+Shift+F10).
  7. The output window shows the result as shown

Thanks to AdvancedTools
for adding GlassFish v2 support to the Web Services plugin.

Technorati: NetBeans
IntelliJ Eclipse
GlassFish Web

Join the discussion

Comments ( 1 )
  • Arun Gupta's Blog Tuesday, May 1, 2007
    [Trackback] Interested in first-class support for GlassFish in IntelliJ IDEA ? Vote here. Since this is still a wish for IntelliJ developers, consider using NetBeans IDE that provide comprehensive support for GlassFish. Developing/deploying a Web service on GlassF...
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.