Thanks to Hussain for creating this tutorial. I am just extending his learning with some additions of mine.
The Sample WebService will return Credit Rating of the customer if the customer Id is Valid else it will give response as Invalid Customer Id
1) Open JDeveloper, Create New Application and Project as shown below
2) Create a Java Class, Right Click on Project->New->General->JavaClass
3) Enter Class Name as CreditRating and Package name as com.ws
4) Write a Method called getCreditRating inside the class CreditRating class.
the method should accept customer id and return a CreditRating of the customer.
public class CreditRating implements Serializable
* Do read this link for help
* in case of issues : http://programming.itags.org/development-tools/123309/
public String getCreditRating(String customerId)
rating = "Invalid Customer id";
5) Compile your Project, After Successful Compilation, Right Click your Project->Business Tier-> Web Services-> Java Web Service
6)Enter WebService Name and Select the CreditRating Class as Component to Publish and click Next
7) Once You Successfully generate the Java Web Service, You need to deploy it and Test the working of the Web Service
8) Right Click on MyWebService1 and Select Run. You’ll see a URL in the Log window as shown below.