How to create a Web service ?

With IDEA 6.0, I searched:

- bundled help
- online documentation
- forums
- intellij.net

but not able to find any documentation on how to create a Web service starting from Java and deploy it on a JavaEE compatible server, for example GlassFish. I could configure GlassFish but what other steps are required to develop/deploy/invoke the Web service ?

Thanks,
-Arun

0
45 comments
Avatar
Permanently deleted user

Basically when one wants to use GlassFish based web service then it is enough to point to GlassFish install in WebServices plugin settings. After that, just repeat the steps for web service develop/deployment you have done previously.
As to JDK6: when JWSDP2 path is empty and the client module uses JDK6 then generation of web services client stubs will proceed with JDK6 built-in tools.

0
Avatar
Permanently deleted user

Nice, I wonder however if web service "autodetection" works in the older versions of the Glassfish (e.g. JEE 5), since if it isn't, then one still needs some additional magic passes :)

0
Avatar
Permanently deleted user

Configuring the plugin shows the following window:

http://blogs.sun.com/arungupta/resource/images/intellij-jwsdp-ws-configure.PNG

I don't see any GlassFish configuration here. What am I missing ?

-Arun

0
Avatar
Permanently deleted user

Just point JWSDP2 path to Glassfish install

0
Avatar
Permanently deleted user

If I select GlassFish build, then Ok button gets disabled.

I'm using GlassFish v2 b33 (https://glassfish.dev.java.net/servlets/NewsItemView?newsItemID=4579).

0
Avatar
Permanently deleted user

Weird, plugin accepts Glassfish directory if it contains subdirectory 'lib' that contains 'appserv-ws.jar' containing JAX-WS implementation. This works for JEE 5 install.

0
Avatar
Permanently deleted user
0
Avatar
Permanently deleted user

In GlassFish v2, appserv-ws.jar is replaced by webservices-rt.jar and webservices-tools.jar. This might work for GlassFish v1 but that's not the focus of my study.

Do you think you might be able to add a separate GlassFish v2 line item in the configuration dialog ? I'll be happy to provide support required for that.

-Arun

0
Avatar
Permanently deleted user

Ok, will include the support for Glassfish v.2

0
Avatar
Permanently deleted user

You can use GlassFish v.2 or JAX-WS 2.1 RI with updated version of the plugin

0
Avatar
Permanently deleted user

I'm getting the following error:

-- cut here --
CLI026 Multiple declaration of option "haproperty" in the descriptor file.
Disconnected from server
-- cut here --

Any idea ?

-Arun

0
Avatar
Permanently deleted user

Please, add Glassfish specific descriptor in Web Module Settings.
Add unique -context-web-root- value like /myhello

0
Avatar
Permanently deleted user

I wonder why sun-jaxws.xml and sun-web.xml, both, are added. Where do you want me to add context-root and can you give the exact fragment ?

-Arun

0
Avatar
Permanently deleted user

In sun-web.xml you need to add 'context-root' tag with appropriate value. Result
sun-web.xml looks like following text:
-


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sun-web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Application Server 9.0 Servlet 2.5//EN"
"http://www.sun.com/software/dtd/appserver/sun-web-app_2_5-0.dtd">
<sun-web-app>
<context-root>/myservice2</context-root>
</sun-web-app>
-


JAX-WS RI needs sun-jaxws.xml to have description mapping from context path to web service class.
If you deploy web app interactively via application deployer then all such application vendor specific files are hidden under the cover.

0
Avatar
Permanently deleted user

Thanks for your help. I could finally deploy and invoke a Web service using GlassFish v2 in IntelliJ through the Web services plugin. Read about it at:

http://blogs.sun.com/arungupta/entry/glassfish_v2_supported_in_intellij

I could get away without needing the GlassFish specific deployment descriptor.

0

Please sign in to leave a comment.