Hope you find the following helpful.
In the WSAD 5.1, create a simple Web project and add the following
java code in javasource folder.
com.source;
public Class HelloWorld {
public
String getMessage(){
return "Hello World";
}
}
I am assuming that the Server is configured and the created Web Project is added to it.
Once, this is done..do the following :
1. Right click the HelloWorld.java and opt for option => Web Services => Generate WSDL Files
2. A box opens :Select the Web project (Current Project) where you want the WSDL to be generated. Click Next
3. Select the HelloWorld class as the java bean . Click next
4. Make sure the getMessage() method is selected in the Methods option
5. Style and Use

ocument/Literal
6. Click finish.
The above will create :
1. An HelloWorld_SEI.java (Service End Interface = SEI) for the class HelloWorld.java in the same package as HelloWorld
This interface contains the methods exposed as Webservices.
2. A WSDL in the WebContent for the HelloWorld class in the WebContent which represents the above SEI.
Create the Client stubs for the HelloWorld Webservice. :
7. Navigate to WebContent/ wsdl/HelloWorld.wsdl file.
8. Right Click and navigate to => Web Services => Generate Client
9. Another box will open :
10. Keep the following values : Client proxy type : Java proxy; Check "Overwrite files without warning" and "Create folders when necessary" options......Click next
11. Select your Server and Web service runtime as IBMWebSphere 5.0.2 .
12. Select a different Client Web Project or create a new one . Click Next
13. Click Finish.
Run the Server.
Write an java class using the created stubs to access the Webservice method "getMessage()".
Hope this works for you.
Regards,
Pawan