Skip Headers
Oracle® Application Server Web Services Developer's Guide
10
g
Release 3 (10.1.3)
B14434-01
Home
Solution Area
Index
Next
Contents
List of Examples
List of Figures
List of Tables
Title and Copyright Information
Preface
Intended Audience
Documentation Accessibility
Related Documents
Conventions
1
Web Services Overview
Understanding Web Services
Web Services Standards
Java 2 Enterprise Edition
Simple Object Access Protocol 1.1 and 1.2
Web Service Description Language 1.1
Web Service-Interoperability Basic Profile 1.1
New and Enhanced Features
Web Service Security for Authentication, Integrity, and Confidentiality
Web Services Management Framework and Application Server Control
Web Services Metadata for the Java Platform (J2SE 5.0 Web Service Annotations)
REST Web Services
Enhanced Web Service Home Page for Testing
Ant Tasks for Configuration and Scripting
Custom Type Mapping Framework for Serialization
Database Web Services
SOAP Header Support
MIME and DIME Document Support
Message Delivery Quality of Service
JMS Transport as an Alternative to HTTP
Web Services Provider Support
Web Services Invocation Framework for Describing WSDL Programming Artifacts
SOAP Message Auditing and Logging
Oracle BPEL
Compatibility with Previous Versions of Web Services
Redeploying Applications on OracleAS Web Services 10.1.3
Deprecated Features
Clustered Environments and High Availability
OC4J in a Standalone Versus Oracle Application Server Environment
2
Oracle Application Server Web Services Architecture and Life Cycle
Architecture
Processing Components
Protocol Handlers
XML Processing
Policy Enforcement
JAX-RPC Handlers
Data Binding
Endpoint Implementation
Java Management Extensions (JMX)
Development Tools
Web Services Development Life Cycle
Create the Implementation
Generate the Web Service
Generate the Client
Deploy the Web Service
Test the Web Service
Perform Post Deployment Tasks
3
Getting Started
Supported Platforms
Installing OC4J
Setting Up Your Environment for OracleAS Web Services
Setting Up Ant for WebServicesAssembler
Setting Up Ant 1.6.2 Distributed with Oracle Application Server
Setting Up Ant 1.6.2 Using a Previous Installation of Ant
Setting Up Ant 1.5.2 Using a Previous Installation of Ant
Using the "oracle:" namespace Prefix for Ant Tasks
Database Requirements
Development and Documentation Roadmap
4
Oracle Application Server Web Services Messages
OracleAS Web Services Message Formats
Understanding Message Formats
RPC and Document Styles
Literal and Encoded Uses
Supported Message Formats
Document-Literal Message Format
RPC-Encoded Message Format
RPC-Literal Message Format
Selecting Message Formats
Changing Message Formats in a Service Implementation
Message Format Recommendations
Working with SOAP Messages
OraSAAJ APIs
Using the OraSAAJ APIs
Using SOAP 1.2 Formatted Messages in Bottom Up Web Service Assembly
Using SOAP 1.2 Formatted Messages in Top Down Web Service Assembly
Converting XML Elements to SOAP Elements
Limitations
Additional Information
5
Assembling a Web Service from a WSDL
What Is Top Down Assembly?
How to Assemble a Web Service Top Down
Prerequisites
Generating the Web Service Top Down
Generating a Web Service Top Down with Ant Tasks
Limitations
Additional Information
6
Assembling a Web Service with Java Classes
Exposing Java Classes as a Stateless Web Service
Prerequisites
How to Assemble a Stateless Web Service
Ant Tasks for Generating a Stateless Web Service
Writing Java Class-Based Web Services
Writing Stateless Web Services
Defining a Java Interface
Defining a Java Class
Exposing Java Classes as a Stateful Web Service
Prerequisites
How to Assemble a Stateful Web Service
Ant Tasks for Generating a Stateful Web Service
Writing Stateful Web Services
Defining a Java Interface
Defining a Java Class
Packaging and Deploying Web Services
Tool Support for Exposing Java Classes as Web Services
Limitations
Additional Information
7
Assembling a Web Service with EJBs
Exposing EJBs as Web Services
Prerequisites
How to Assemble a Web Service from an EJB
Ant Tasks for Generating a Web Service
Writing EJBs for Web Services
Writing an EJB Service Endpoint Interface
Writing an EJB
Packaging and Deploying Web Services that Expose EJBs
Providing Transport-Level Security
Tool Support for Exposing EJBs as a Web Service
Limitations
Additional Information
8
Assembling Web Services with JMS Destinations
Understanding JMS Endpoint Web Services
How to Assemble a JMS Endpoint Web Service
Ant Tasks for Generating a Web Service
Message Processing and Reply Messages
Limitations
Additional Information
9
Developing Database Web Services
Understanding Database Web Services
Type Mapping Between SQL and XML
SQL to XML Type Mappings for Web Service Call-Ins
Changing the SQL to XML Mapping for Numeric Types
XML to SQL Type Mapping for Web Service Call-Outs
Developing Web Services that Expose Database Resources
How to Use Life Cycle for Web Service Call-in
WebServicesAssembler Support for Web Service Call-in
Exposing PL/SQL Packages as Web Services
Prerequisites
How to Assemble a Web Service from a PL/SQL Package
Ant Tasks for Generating a Web Service
Sample PL/SQL Package
Mapping Between PL/SQL Functions and Web Service Operations
Mapping PL/SQL IN and IN OUT Parameters to XML IN OUT Parameters
Mapping SQL XMLType to XML any
Exposing a SQL Query or DML Statement as a Web Service
Prerequisites
How to Assemble a Web Service from a SQL Statement or Query
Ant Tasks for Assembling a Web Service from SQL Queries or DML Statements
Sample SQL Statements
Mapping SQL Queries to Service Operations
Mapping DML Operations to Web Service Operations
Exposing an Oracle Streams AQ as a Web Service
Prerequisites
How to Assemble a Web Service from an Oracle AQ
Ant Tasks for Generating a Web Service
Developing Client Code to Access an AQ Queue Exposed as a Web Service
Accessing an Oracle AQ Queue with JMS
Sample AQ Queue and Topic Declaration
Sample Web Service for a Queue Generated by WebServicesAssembler
Sample Web Service for a Topic Generated by WebServicesAssembler
Exposing a Server-Side Java Class as a Web Service
Prerequisites
How to Assemble a Web Service from a Server-Side Java Class
Ant Tasks for Generating a Web Service
Sample Server-Side Java Class
Sample Web Service Operations Generated from a Server-Side Java Class
Developing a Web Service Client in the Database
Tool Support for Web Services that Expose Database Resources
Limitations
Additional Information
10
Assembling Web Services with Annotations
Developing Web Services with J2SE 5.0 Annotations
How to Use J2SE 5.0 Annotations to Assemble a Web Service from Java Classes
How to Use J2SE 5.0 Annotations to Assemble a Web Service from a Version 3.0 EJB
Supported J2SE 5.0 Annotation Tags
Oracle Additions to J2SE Annotations
Deployment Annotation
Overriding Annotations
Overriding Annotation Values with WebServicesAssembler
Overriding Deployment Annotation Values with Deployment Descriptors
Sample Java File with J2SE 5.0 Annotations
Limitations
Additional Information
11
Assembling REST Web Services
Assembling REST Web Services
How to Assemble a REST Web Service Top Down
Accessing REST Web Service Operations
How to Assemble a REST Web Service Bottom Up
Accessing REST Web Service Operations
REST Additions to Deployment Descriptors
Using J2SE 5.0 Annotations to Assemble REST Web Services
Testing REST Web Services
Building Requests and Responses
HTTP GET Requests
HTTP POST Requests
REST Responses
Tool Support for REST Web Services
Limitations
Additional Information
12
Testing Web Service Deployment
Using the Web Services Home Page
How to Access the Web Services Home Page
How to Use the Web Services Home Page
Understanding the Web Service Home Page
Understanding the Web Service Editor Page
Understanding the Web Service Invocation Page
Using the Web Services Home Page for REST Services
Obtaining a Web Service WSDL and Client-Side Proxies Directly
Limitations
Additional Information
13
Assembling a J2EE Web Service Client
Understanding J2EE Web Service Clients
Prerequisites
How to Assemble a J2EE Web Service Client
Deploying and Running an Application Client Module
Ant Task for Generating an Interface
Adding J2EE Web Service Client Information to Deployment Descriptors
Accessing a Web Service
Adding OC4J-Specific Platform Information
Adding JAX-RPC Handlers to Deployment Descriptors
Writing J2EE Web Service Client Code
Configuring a J2EE Web Service Client for a Stateful Web Service
Configuring a J2EE Client with Configuration Files
Configuring a J2EE Client Programmatically
Configuring a J2EE Web Service Client to Make JMS Transport Calls
Enabling Chunked Data Transfer for HTTP 1.1
Setting a Character Encoding for a SOAP Message
Packaging a J2EE Client
Packaging a Servlet or Web Application Client
Packaging Structure for Servlet or Web Application Clients
Relationship Between Deployment Descriptors and Servlet or Web Application Client EAR Files
Packaging an EJB Client
Package Structure for EJB Application Clients
Relationship Between Deployment Descriptors for EJB Application Clients
Limitations
Additional Information
14
Assembling a J2SE Web Service Client
Understanding J2SE Web Service Clients
Using Static Stub Clients
Using the Web Service Dynamic Invocation Interface
Prerequisites
How to Assemble a J2SE Web Service Client with a Static Stub
Ant Tasks for Generating a J2SE Web Service Client
Sample WSDL File
Writing Web Service Client Applications
Enabling Chunked Data Transfer for HTTP 1.1
Setting a Character Encoding for a SOAP Message on a J2SE Client
Setting Cookies in a Client Stub
Tool Support for Assembling J2SE Web Service Clients
Additional Information
15
Understanding JAX-RPC Handlers
Message Handler Overview
Writing a JAX-RPC Handler
Configuring a Server-Side JAX-RPC Handler
Registering JAX-RPC Handlers with webservices.xml
Client-Side JAX-RPC Handlers
Registering JAX-RPC Handlers for J2EE Web Service Clients
Using the handler Element in a J2EE Web Service Client
Registering JAX-RPC Handlers for J2SE Web Service Clients
Limitations
Additional Information
16
Processing SOAP Headers
Processing SOAP Headers with Parameter Mapping
Processing SOAP Headers by Using Handlers
Processing SOAP Headers by Using the ServiceLifecycle Interface
Getting HTTP Headers with the ServiceLifecycle Interface
Limitations
Additional Information
17
Using WebServicesAssembler
About the WebServicesAssembler Tool
Command Line Syntax
Setting Up Ant for WebServicesAssembler
WebServicesAssembler Commands
Web Service Assembly Commands
aqAssemble
assemble
corbaAssemble
dbJavaAssemble
ejbAssemble
jmsAssemble
plsqlAssemble
sqlAssemble
topDownAssemble
WSDL Management Commands
analyze
fetchWsdl
genConcreteWsdl
genQosWsdl
genWsdl
Java Generation Commands
genInterface
genProxy
genValueTypes
Deployment Descriptor Generation Commands
genApplicationDescriptor
genDDs
Maintenance Commands
help
version
WebServicesAssembler Arguments
General Web Services Assembly Arguments
appName
bindingName
classFileName
className
classpath
debug
ear
ejbName
emptySoapAction
help
initialContextFactory
input
interfaceFileName
interfaceName
jndiName
jndiProviderURL
mappingFileName
output
packageName
portName
portTypeName
restSupport
schema
searchSchema
serviceName
strictJaxrpcValidation
useDimeEncoding
war
Session Arguments
callScope
recoverable
session
timeout
CORBA Assembly Arguments
corbanameURL
corbaObjectPath
idlFile
idlInterfaceName
idljPath
ORBInitialHost
ORBInitialPort
ORBInitRef
Database Assembly Arguments
aqConnectionFactoryLocation
aqConnectionLocation
dataSource
dbConnection
dbJavaClassName
dbUser
jpubProp
sql
sqlstatement
sqlTimeout
sysUser
useDataSource
wsifDbBinding
wsifDbPort
JMS Assembly Arguments
deliveryMode
genJmsPropertyHeader
jmsTypeHeader
linkReceiveWithReplyTo
payloadBindingClassName
priority
receiveConnectionFactoryLocation
receiveQueueLocation
receiveTimeout
receiveTopicLocation
replyToConnectionFactoryLocation
replyToQueueLocation
replyToTopicLocation
sendConnectionFactoryLocation
sendQueueLocation
sendTopicLocation
timeToLive
topicDurableSubscriptionName
Proxy Arguments
endpointAddress
genJUnitTest
Deployment Descriptor Arguments
appendToExistingDDs
context
ddFileName
uri
WSDL Access Arguments
fetchWsdlImports
httpNonProxyHosts
httpProxyHost
httpProxyPort
importAbstractWsdl
wsdl
WSDL Management Arguments
createOneWayOperations
genQos
singleService
soapVersion
wsdlTimeout
targetNamespace
typeNamespace
Message Format Arguments
style
use
Java Generation Arguments
dataBinding
mapHeadersToParameters
overwriteBeans
unwrapParameters
valueTypeClassName
valueTypePackagePrefix
wsifEjbBinding
wsifJavaBinding
Default Algorithms to Map Between Target WSDL Namespaces and Java Package Names
Java Package Name to WSDL Namespace Mapping Algorithm
Mapping Java Artifacts to WSDL Artifacts
Mapping Java Types to XML Schema Types
WSDL Namespace to Java Package Name Mapping Algorithm
Mapping the WSDL Service Endpoint Interface and Related Endpoint Artifacts to Java Package and Class Names
Mapping WSDL Value Types and Related Artifacts to Java Names and Types
Specifying a Namespace
Specifying a Root Package Name
Establishing a Database Connection
Additional Ant Support for WebServicesAssembler
Using Multiple Instances of an Argument in Ant
Configuring Proxy Generation in an Ant Task
Generating Handler and Port Information into a Proxy
Configuring a Port in an Ant Task
Configuring a Port Type in an Ant Task
Configuring Handlers in an Ant Task
Attributes and Child Tags for handler Tags
Sample Handler Configuration
Ant Tasks that Can Configure Handlers
Configuring Multiple Handlers in an Ant Task
Adding Files to an Archive
Controlling a WebServicesAssembler Build
Assigning Multiple Web Services to an EAR or WAR Archive
Limitations on Assigning Multiple Web Services to a WAR File
Representing Java Method Parameter Names in the WSDL
Limitations
Additional Information
18
Packaging and Deploying Web Services
Packaging Web Service Applications
Packaging Structure for Web Service Applications
Packaging for a Web Service Based on Java Classes
Packaging for a Web Service Based on EJBs
Description of Packaged Files
Relationships Between Deployment Descriptor Files
Tool Support for Packaging
Packaging Support with WebServicesAssembler
WebServicesAssembler Packaging Commands
Managing Deployment Descriptors
Packaging Support with JDeveloper
Understanding Web Service Deployment
Tool Support for Deployment
Command Line Support for Deployment
A Sample Deployment Using admin_client.jar
Ant Task Support for Deployment
Deployment Support with JDeveloper
Deployment Support with Application Server Control
oracle-webservices.xml Deployment Descriptor
Components in oracle-webservices.xml
<oracle-webservices> Element
<webservice-description> Element
<port-component> Element
Securing EJB-Based Web Services at the Transport Level
<ejb-transport-security-constraint> Element
<ejb-transport-login-config> Element
oracle-webservices.xml File Listing
Limitations
Additional Information
A
Web Service Client APIs and JARs
Web Services API Packages
Setting the Web Service Proxy Client Classpath
Simplifying the Classpath with wsclient_extended.jar
Classpath Components for Clients using a Client-Side Proxy
OC4J Security-Related Client JAR Files
WS-Security-Related Client JAR Files
Reliability-Related Client JAR File
JMS Transport-Related Client JAR File
Database Web Services-Related Client JAR Files
Sample Classpath Commands
B
Oracle Implementation of the WSDL 1.1 API
Understanding the OraWSDL APIs
C
Troubleshooting
OracleAS Web Services Messages
Assembling Web Services from a WSDL
Assembling Web Services from Java Classes
Assembling Web Services From EJBs
Assembling Web Services with JMS Destinations
Developing Web Services From Database Resources
Assembling Web Services with Annotations
Assembling REST Web Services
Testing Web Service Deployment
Assembling a J2EE Web Service Client
Understanding JAX-RPC Handlers
Processing SOAP Headers
Using WebServicesAssembler
Packaging and Deploying Web Services
Ensuring Interoperable Web Services
Working with Message Attachments
Managing Web Services
Ensuring Web Service Reliability
Auditing and Logging Messages
Custom Serialization of Java Value Types
Using JMS as a Web Service Transport
Using the Web Service Invocation Framework
Using Dynamic Invocation Interface to Invoke Web Services
Basic Calls
Configured Calls
Examples of Web Service Clients that use DII
D
Third Party Licenses
Apache
The Apache Software License
Apache SOAP
Apache SOAP License
JSR 110
Jaxen
The Jaxen License
SAXPath
The SAXPath License
W3C DOM
The W3C License
Index