Web services consist of a set of messaging protocols and programming standards that expose business functions over the Internet using open standards. A web service is a discrete, reusable software component that is accessed programmatically over the Internet to return a response. You can work in JDeveloper's IDE to quickly create a web service from a Java class. You can then test the web service by running it on JDeveloper's integrated server, and running a generated proxy against the web service.
Create a New Application: Use the Create Application wizard to create a generic application.
Create a Java Class: Create a Java class containing a method that can be exposed as an operation in a web service.
Create the Web Service: Use the Create Java Web Service wizard to publish the Java class and expose the method as a web service operation.
Use the HTTP Analyzer to Test the Web Service: Run the web service in JDeveloper's integrated server instance and test the service in the HTTP Analyzer.
Create a Proxy to the Web Service: Use the Create Web Service Proxy wizard to generate a proxy to the web service.
Add Code to Call the Proxy: In the source editor, add code to the main method in the generated Java client. Then run the Java client.
The JDeveloper application is the highest level in the organizational structure. It stores information about the objects you are working with, while you are creating your application. It keeps track of your projects and the environment settings while you are developing. [ tell me more...]
Application templates provide you with a quick way to create the project structure for standard applications with the appropriate combination of technologies already specified. The new application created from the template appears in the Application Navigator already partitioned into tiered projects, with the associated technology scopes set in each project. [ tell me more...]
When you complete the steps for creating a new application and project, the Projects panel in the Application Navigator should look like this: [ tell me more...]
New classes can be created and added to your project after you build the initial application and project. [ tell me more...]
CreditRatingas the class name, and
ratingserviceas the package name. Accept the remaining defaults and click OK.
To follow along with the example, in this step and throughout the cards, enter values as shown in the instructions. Then you will be able to follow the steps in the cue cards exactly as written. [ tell me more...]
The insert or replace mode for the editor is controlled by the Insert key on the keyboard. The default is insert mode. Press Insert to toggle between insert and replace mode. [ tell me more...]
When you complete the steps for creating a Java class, the Application Navigator should look like this: [ tell me more...]
You can quickly create a web service to expose the method in the Java class as an operation in the service. [ tell me more...]
When you use the wizard to create the first Java web service in a project, you have to select the Java EE version using the Select Deployment Platform page, which looks like this: [ tell me more...]
When you launch the wizard from the context menu on the Java class file in the Application Navigator, JDeveloper automatically populates the Component To Publish field with the fully qualified class name. [ tell me more...]
When you launch the Create Java Web Service wizard from the context menu on the Java class file in the Application Navigator, JDeveloper automatically selects all available methods in the Java class for exposing as operations in the web service. [ tell me more...]
When you complete the steps for creating the web service using the wizard, JDeveloper displays some messages in the Web Services Log window. [ tell me more...]
You can quickly test the web service using JDeveloper's integrated server. To begin testing, you will right-click the web service in the Application Navigator, and choose Test Web Service from the context menu. [ tell me more...]
After you create a web service, you will usually test it to ensure that you get the results you expect. JDeveloper's IDE allows you to deploy the web service to an integrated server for testing. [ tell me more...]
123456789in the parameter field. Then click Send Request. You should see
1in the Response pane.
The HTTP Analyzer allows you to examine and monitor HTTP request and response packets. When you select Test Web Service, by default JDeveloper displays the HTTP Analyzer log window and HTTP Analyzer Instances window below the editor window. The web service deploys to Integrated WebLogic Server, then JDeveloper displays the HTTP Analyzer test window with the Request and Response panes placed side by side. [ tell me more...]
After completing the steps for testing the web service in JDeveloper's integrated server instance, the HTTP Analyzer test window in the IDE should look similar to this: [ tell me more...]
JDeveloper makes it easy to use a web service in an application by allowing you to create a proxy to the service with the Create Web Service Proxy wizard. A web service proxy lets you access the web service from a client application. [ tell me more...]
RatingProxyas the project name and click Finish .
JDeveloper creates a web service proxy class from a web service description (WSDL), which is a description language that defines how to communicate with a web service. [ tell me more...]
There are two ways you can reference the web service description (WSDL): URL or existing web service description document file. [ tell me more...]
ratingproxy.proxyas the package name and
ratingproxy.proxy.typesas the root package name. Click Next .
After completing the steps for creating a web service proxy from a web service description, JDeveloper displays the Java client file in the source editor. The Application Navigator should look similar to this: [ tell me more...]
In the previous cue card, when you completed the steps for creating a web service proxy from a web service description, JDeveloper generated the Java client file along with other web service proxy files. [ tell me more...]
When you used the wizard to generate the web service proxy in the previous card, JDeveloper also automatically generated the CreditRatingSoap12HttpPortClient.java file, which is a Java client that can connect to the proxy. [ tell me more...]
Before you can test the Java client to the web service proxy, the web service must be up and running to process the client request. [ tell me more...]
When you run the Java client, JDeveloper should display the response value
1 in the
RatingProxy.jpr Running Log window: [
tell me more...]
Copyright © 1997, 2009, Oracle. All rights reserved.false ,,,,,,,,,,,,,,,