Developer Tools
JDeveloper
A web service is a discrete, reusable software component that is accessed programmatically over the Internet to return a response. A WSDL (Web Service Description Language) document describes a web service and the operations the service exposes through a set of definitions. You can work in JDeveloper's IDE to quickly define a WSDL document, and then create a Java web service from the WSDL.
Create a New Application: Use the Create Application wizard to create a generic application.
Create a WSDL Document: Use the WSDL visual editor to create the WSDL definition of a service that supports one operation (method).
Create a Java Web Service from the WSDL: Use the Create Java Web Service from WSDL wizard to generate and publish a service class and expose a method as a web service operation.
Add Service Implementation Code: Use the source editor to add code to the generated service implementation class.
Use the HTTP Analyzer to Test the Web Service: Run the web service in JDeveloper's integrated server and test the service in the HTTP Analyzer.
Add a Policy to the Web Service: Use the Java Web Service editor to add an Oracle Web Service Manager security policy. Then test the web service in the HTTP Analyzer.
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...]
ServiceFromWsdl.
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...]
A WSDL (Web Service Description Language) document describes a web service and the operations (methods) the service exposes through a set of definitions. [ tell me more...]
CreditRating as the WSDL name, 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...]
CreditRatingDetails.xsd as the file name.
public_html directory of the project. Then click
OK.
After creating the XML schema document, the editor window should look something like this: [ tell me more...]
RatingService in the
Port Type Name
field, then click
OK.
A WSDL (Web Service Description Language) document is an XML-formatted document that describes a web service and the operations (or methods) the service exposes through a set of definitions. As you create a WSDL document using the integrated tools, JDeveloper generates the XML code for you, which you can view by using the XML editor. [ tell me more...]
processRating and press Enter.
The default view of the WSDL visual editor is Design, which provides a visual way to add elements to a WSDL document. There are four panes on the visual editor, namely,
Messages,
Port Types,
Bindings/Partner Link Types, and
Services. You can collapse and expand any pane by clicking the
or
icon in front of the name. [
tell me more...]
By default, when you drag and drop a port type on the Bindings/Partner Link Types pane, JDeveloper displays the Create Binding dialog. If you wish to create a partner link type, click
next to
Add and select
Add partnerLinkType from the dropdown menu. [
tell me more...]
A service is a collection of ports. A port defines a specific network address for a binding, which is a specific communication protocol for each message in each operation of a port type. [ tell me more...]
When you complete the steps for creating a WSDL document, the WSDL visual editor should look similar to this, if all panes are expanded: [ tell me more...]
JDeveloper makes it easy to create a web service from a WSDL document by providing a wizard. [ tell me more...]
When you use the wizard to create the first Java web service in a project, you have to select the J2EE or Java EE version using the Select Deployment Platform page, which looks like this: [ tell me more...]
The WSD L Document URL dropdown listbox lists the existing WSDL documents in the current application. When you select the WSDL document you created earlier, make sure Copy WSDL Locally is not selected because you already have the WSDL document in the project. [ tell me more...]
project1 as the package name and
project1.types as the root package name. Then click
Finish
.
When you finish the wizard steps for creating the Java web service from the WSDL, JDeveloper displays messages in the Web Services Log window that tell you the generation is complete. [ tell me more...]
In this example, you will add the service implementation code in the
RatingServiceImpl.java file that JDeveloper generated when you used the wizard to create the Java web service from the WSDL. [
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...]
processRating() method, add the service implementation code for the operation.
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...]
987654321 in the
ssn parameter field. Then click
rating 0 in 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 you test the web service, the HTTP Analyzer test window in the IDE should look similar to this: [ tell me more...]
A web service policy consists of facts or assertions, and rules that apply to a particular web service. To begin adding a policy to the web service, you will open the Java Web Service properties editor. [ tell me more...]
Policies are additional business functionality for web services, such as logging and security capabilities. The Configure Policies page of the Java Web Service Editor enables you to attach either Oracle Web Service Manager policies or Oracle WebLogic Server policies. The type of policy a web service can use is constrained by the type of web services it is: For JAX-WS, you can attach Oracle Web Service Manager (security only) policies or Oracle WebLogic Server policies; for JAX-RPC, you can attach Oracle WebLogic policies only. [ tell me more...]
WS-Security (Web Services Security) is a standard communications protocol for applying security to web services. The WS-Security specification provides mechanisms to help developers of web services secure SOAP message exchanges, for example, by encoding and attaching binary security tokens in the headers of messages. The WS-Security UsernameToken Profile specification describes how to encode UsernameTokens with the WS-Security specification. Through UsernameTokens, a web service consumer can supply a means of identifying the requestor by “username”, and optionally using a password to authenticate that identity to the web service producer. [ tell me more...]
987654321 in the
ssn parameter field. Then click
rating 0 in the Response pane.
When you complete the steps for adding the policy, you should see the following
@SecurityPolicy annotation that JDeveloper added to the
RatingServiceImpl.java file in the source editor: [
tell me more...]
Copyright © 1997, 2009, Oracle. All rights reserved.