Monday February 05, 2007
Creating and Invoking a Web service using GlassFish in NetBeans, IntelliJ, and Eclipse - Part 3
In this third and last part of a blog series (part 1 and part 2), I plan to explore the steps to develop/deploy/invoke a Web service on GlassFish using Eclipse IDE.
Eclipse does not offer GlassFish as a a bundled container. Instead you need to install GlassFish plugin for Eclipse explicitly. The plugin requires WTP 1.0 installed in Eclipse so I did that following the instructions. After installing WTP, I configured GlassFish v2 M4 following rest of the plugin install instructions.
Here are the steps I followed to successfully build and deploy a Web service:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:j2ee="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="2.5"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
</web-app>@javax.jws.WebService
public class Hello {
public String sayHello(String name) {
return "Hello " + name;
}
}http://localhost:8080/hello/HelloService?wsdl.So far we have been able to deploy JAX-WS based Web service on GlassFish. Eclipse allows generating a Web service client using Axis run-time environment only. So as with IntelliJ, if you want to invoke a Web service using JAX-WS, the recommended way is to use NetBeans 5.5.1 to invoke the Web service.
Enjoy Web services deployed on GlassFish in Eclipse! And remember, GlassFish v2 uses Web Services Interoperability Technology (WSIT) that gives you interoperable Web services with Microsoft .NET 3.0 framework.
So if you want first-class Web services support in an industry-grade, cross-platform IDE and deploy it on an open source, production-quality, Java EE5-compatible Application Server, NetBeans IDE is the only choice.
Technorati: NetBeans IntelliJ Eclipse GlassFish Web services WSIT
Posted by Arun Gupta in webservices | Comments[15]
|
|
|
|
|
Today's Page Hits: 1830
Total # blog entries: 1002