In this section you will create a new EJB module project called Hello. You will also create a WSDL document, a web service and then clean and build the EJB module project.
From the NetBeans IDE's main menu, choose File -> New Project.
The New Project wizard opens.
In the Categories list, select the Enterprise node and in the Projects list select EJB Module.
Click Next.
In the Project Name field, type Hello.
You may choose to change the Project Location or use the default location.
Click Next.
In the Server field select your server and in Java EE Version field select the appropriate version.
Click Finish.
The Projects window now contains a node for a EJB Module project called Hello.
In the Projects window of the IDE, right-click the Hello node and choose New -> WSDL Document.
In the File Name field type HelloWSDL.
In the WSDL Type, select the Concrete WSDL Document option.
In the Binding field, select SOAP and in the Type field, select RPC Literal.
Click Next.
On the Abstract Configuration page, in Input, under the Message Part Name double-click Part1 and change the value to in and press Return.
Doing the same way in Output, change Part2 to out under Message Part Name and press Return.
Click Next.
Choose the defaults and click Finish on the Concrete Configuration page.
In the Projects window of the IDE, right-click the Hello node and choose New -> Other.
In the Categories list select Web Services and in File Types select Web Service from WSDL.
Click Next.
Type the Web Service Name as HelloWebWSDL and the Package name as Hello1.
Click the Browse button to select local WSDL file or the WSDL URL and then click Open.
This WSDL File or the WSDL URL is located in the NetBeans Projects folder. For example: C:\Documents and Settings\Administrator\My Documents\NetBeansProjects\Hello\src\java This path is valid if you have used the default project location while creating the EJB module project.
Click Finish.
Click the Source button and add the following line to the public class.
return "Java EE Service Engine" + in;
From the NetBeans IDE toolbar click Save All button.