1) Get the application server added
Tools > Server Manager > Add Server > Select JBoss Application Server 4
Next > Browse > (pick installation location ) > Next > Set Domain to
ALL (or default if only config available) > Finish
2) Create the WebService Project
File > New Project > Enterprise Category | Enterprise Application >
(change as necessary) > Finish
3) Create the WebService
Expand EnterpriseApplication1-ejb > Expand Source Packages > Right Click
New > WebService > Enter a package name (I chose com.foo.webservice) >
Finish
4) Update the Webservice code
Project opens with NewWebService.java >
add import: >
import javax.ejb.Stateless;
add annotations:
@Stateless
@WebService()
add method
@WebMethod
public void test()
{
System.out.println("WebService called");
}
5) In build.xml, override method wsgen-JBossWebWS-nonJSR109 like this:
Run Project
should see something similar to below in the log
15:49:30,903 INFO EARDeployer Init J2EE application:
file:/javalibs/jboss-4.0.4.GA-CR8/server/default/deploy/EnterpriseApplic
ation1.ear
15:49:32,893 INFO Ejb3Deployment EJB3 deployment time took: 1213
15:49:32,895 WARN EndpointMetaData Cannot obtain style, using
default: document
...
Comments