Saturday, September 8, 2012

In this post I will explain you how you can create Java web service in Jdeveloper and deploy the same from Jdeveloper itself.

Follow below steps to create and deploy Java Web Service

Step 1.) Create a new project in Jdeveloper.
  • Go to Application and right click on it and choose New Project.
Create New Project

  • Select Generic Project.
Choose Generic Project

  • Select Java and Web Services and add it to right pane.
Add Java and Web Service
  • You can change Default Package name as per your requirement and click Finish.
change package name

Step 2.) Create/Add Java code as per your requirement. I will simply add one Java class that contain only one function for this post.
  • Right click on newly created project and add new Java Class.
Create Java Class

  • Fill all necessary details and click OK.

Change Class and Package Name
  • Add your Java code inside Java Class
Add Java Code

Step 3.) Create Web Service from Java Code.
  • Go to newly created project and right click on above created Java Class. Click on "Create Web Service".
Create Java Web Service
  • Select the deployment profile as per your requirement.

Choose SOAP

  • You can also change Web Service Name.
Change service name
  • If you have more than one function in Java Class.You can choose the functions that you want to expose.
Java Exposed Functions
  • Accept all default and we are done with Web Service Creation.

Final Java Web Service

Step 4.) You can simple deploy above created Web Service to server. Just right click on project and click on deploy and you can choose the server to which you want to deploy it.

Deploy it to Server


Post a Comment