Oracle Application Server 10g Web Services Frequently Asked Questions Oct, 2006 This FAQ addresses frequently asked questions relating to Oracle Application Server 10g Release 3 (10.1.3.1) Web Services Common Questions Web Services Development Web Services With attachment Oracle Database an Web Services Quality Of Services: Security and Reliability Upgrade and Migration 1.0 Common Questions 1.1 What are Web Services? Web Services are application components that are accessible over open protocol and independent of their implementations. 1.2 What is SOAP? SOAP is an XML-based protocol for exchanging information between system. SOAP has these features: Protocol independence Language independence Platform and operating system independence Support for RPC/Encoded and Document/Literal message formats Support for SOAP XML messages incorporating attachments 1.3 What is WSDL? Web Services Description Language (WSDL) is an XML format for describing network services containing RPC-oriented and message-oriented information. 1.4 What is REST? REST (Representational State Transfer) services architecture conforms to the Web architecture defined by the World Wide Web Consortium (W3C), and leverages its architectural principles. It uses the semantics of HTTP whenever possible. REST Web services use XML documents, not SOAP envelopes, for sending messages. Unlike SOAP Web Services, REST is a "style" and has no standards or tools support from vendors. Oracle Application Server Web Services framework support REST Web Services. You can find more information about it in the Chapter 11: Assembling REST Web Services of the Web Services Developer s Guide. 1.5 What is WS-I? The Web Services Interoperability (WS-I) organization is committed to supporting the use of Web Services and promoting interoperability between vendor solutions. Oracle Application Server 10g Web Services FAQ Page 1
You can find more information about Web Services interoperability at http://www.ws-i.org/ and in the Chapter 1: Ensuring Interoperable Web Services of the Advanced Web Services Developer's Guide. 1.6 What are the new features in Oracle Application Server 10.1.3 Web Services? In addition to the preceding standards, Oracle Application Server10.1.3 Web services contains these 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 REST Web Services Ant Tasks for Configuration and Scripting Custom Type Mapping Framework for Serialization Database Web Services enhancements SOAP Header Support MIME and DIME Document Support Web Service Attachments with MTOM Message Delivery Quality of Service JMS Transport as an Alternative to HTTP Web Services Provider Support to create services independent of JAX-RPC Web Services Invocation Framework for Describing WSDL Programming Artifacts SOAP Message Auditing and Logging 1.7 What are the standards supported by Oracle Application Server Web Services? Oracle Application Server Web Services framework supports multiple industry standards: J2EE 1.4 Web Services, that includes JAX-RPC 1.1, EJB 2.1, SAAJ 1.2 SOAP 1.1 and 1.2 WSDL 1.1 WS-I Basic Profile 1.1 WS-Security WS-Reliability Oracle Application Server 10g Web Services FAQ Page 2
1.8 What are the components that could be exposed as Web Services? Oracle Application Server Web Services allow developer to expose the following components are Web Services: Java classes Enterprise Java Beans (EJBs) version 2.1 and 3.0 JMS queues or topics PL/SQL procedures SQL/DMLStatements Oracle Advanced Queues Java classes in the database 2.0 Web Services Development 2.1 How do I get started with Web Services? As developer of a Web Services, Service Oriented Architecture (SOA), application you have to create Web Services, meaning exposing some business logic as Web Service; or you will have to consume existing Web Service using a published WSDL. As a developer of a Web Service you can choose to start from the implementation (Java class, EJB, PL/SQL,..) and generate, using Oracle tools, the different Web services artifacts: this is often call a bottom-up method. It is also possible to start from an existing WSDL, and generate the different Java interfaces from it: this is called top-down. 2.2 What are the message formats supported by OracleAS Web Services? Oracle Application Server Web Services supports SOAP 1.1 and 1.2 messages. The format of the messages can be document or RPC style and literal or encoded use. You can find more information about message format in the Chapter 4: OC4J Web Service Messages of the Web Services Developer s Guide. 2.3 Does Oracle Application Server Web Services integrated with IDEs? Yes. Oracle Application Server Web Services provides a tool named Oracle Web Service Assembler (WSA) that allow developer to create client and server Web service artifacts. Oracle WSA is integrated out of the box with Oracle JDeveloper 10g. Oracle WSA is accessible as a command line or using Apache Ant tasks, so it is possible to integrate Oracle WSA to any Java IDE. You can find more information about Oracle WSA in the Chapter 17: Using Web Services Assembler of the Oracle AS Web Service Developer Guide Oracle Application Server 10g Web Services FAQ Page 3
2.4 Is it possible to access Servlet objects such as request and context? Yes. Even if Web Services are protocol agnostics, Oracle Application Server Web Sevices framework has published API to manipulate HTTP request. You service implementation should implement the javax.xml.rpc.server.servicelifecycle, then from the init() method you have access to the Context object.... ServletEndpointContext servletendpointcontext = null; ServletContext servletcontext = null; public void init(object context) throws ServiceException { servletendpointcontext = (ServletEndpointContext) context; servletcontext = servletendpointcontext.getservletcontext(); }... To access the Servlet request and response you have to use the MessageContext and the following properties, coming from the oracle.webservices.serverconstants class. MessageContext mc = servletendpointcontext.getmessagecontext(); mc.getproperty( ServerConstants.HTTP_SERVLET_REQUEST ); 3.0 Web Services with Attachment 3.1 Does Oracle Application SOAP Messages with Attachments? Yes. Oracle Application Server Web Services framework supports SOAP Messages with attachments and MTOM (Message Transmission Optimization Mechanism). OracleAS Web Services framework provides different format and encoding. The framework allows developer to choose between MIME and DIME encoding. SOAP with attachment and MTOM are currently the standard for Web Services attachments, however DIME is provided to ensure better interoperability with Microsoft platform, that is currently deprecating DIME in favor of MTOM. You can find more information about Web Service Attachment in the Chapter 2: Working with Message Attachments of the Advanced Web Services Developer's Guide book. 3.2 Does Oracle Application Web Services support streaming for large documents? Yes. If the application needs to exchange very large document (eg: >=10Mb) it is possible to use streaming to improve the performance and scalability of the application. You can find more information about streaming in the Chapter 2: Working with Message Attachments of the Advanced Web Services Developer's Guide book. Oracle Application Server 10g Web Services FAQ Page 4
4.0 Oracle Database and Web Services 4.1 Can I publish database SQL queries and PL/SQL objects as Web Services? Yes. OracleAS Web Services framework provides tool to publish SQL queries and PL/SQL store procedures as Web Services. In addition to publish database object as Web Services it is also possible to consume Web Services from the database. You can find more information about Database Web Services in the Chapter 9: Developing Database Web Services of the Web Services Developer s Guide. 5.0 Quality Of Services: Security and Reliability 5.1 Are Web Services secure? Yes. Oracle Application Server Web Services framework supports Web Service Security (WS- Security). WS-Security is an OASIS open standard that defines how secure Web Services. Oracle Application Server Web Services allow developer and administrators to define how user are authenticated, and how messages are encrypted and signed. It is also very common usage to use standard Web based security using transport layer security (HTTPS) and send user credential using HTTP authentication. You can find more information about Web services security in Web Services Security Guide and the Chapter 4: Ensuring Web Services Security of the Advanced Web Services Developer's Guide. 5.2 Are Web Services reliable? Yes. Oracle Application Server Web Services framework supports Web Service Reliability (WS- Reliability). WS-Reliability is an OASIS open standard that defines an interoperable way to guarantee message delivery. You can find more information about Web services security in the Chapter 5: Ensuring Web Service Reliability of the Advanced Web Services Developer's Guide. 6.0 Upgrade and Migration 6.1 Is it possible to deploy Oracle J2EE 1.3 Web Services? Yes. It is possible to deploy Web Services develop using Oracle J2EE 1.3 Web Services stack from OracleAS 10g Release 1 and 2). However these services will not appears in the list of Web Services in the Oracle Application Server Control and Web Services JMX MBeans. Oracle Application Server 10g Web Services FAQ Page 5
6.2 What is the process to migrate from a non Oracle Web Service stack? To migrate existing Web Service, the best way is to take the existing WSDL and implementation class and do a top down assemble using Oracle WebServicesAssembler (WSA) or Oracle JDeveloper. Also it is possible to deploy Apache Axis Web Services in Oracle Application Server 10g (10.1.3) Release 3, you can find more information about Apache Axis deployment in the Chapter 7: Developing with Open Source Frameworks of the Oracle Containers for J2EE Developer s Guide Oracle Application Server 10g Web Services FAQ Page 6
Oracle Application Server 10g: Web Services FAQ October 2006 Author: Tugdual Grall Contributing Authors: Oracle Corporation World Headquarters 500 Oracle Parkway Redwood Shores, CA 94065 U.S.A. Worldwide Inquiries: Phone: +1.650.506.7000 Fax: +1.650.506.7200 oracle.com Copyright 2005, Oracle. All rights reserved. This document is provided for information purposes only and the contents hereof are subject to change without notice. This document is not warranted to be error-free, nor subject to any other warranties or conditions, whether expressed orally or implied in law, including implied warranties and conditions of merchantability or fitness for a particular purpose. We specifically disclaim any liability with respect to this document and no contractual obligations are formed either directly or indirectly by this document. This document may not be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without our prior written permission. Oracle, JD Edwards, PeopleSoft, and Retek are registered trademarks of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Oracle, JD Edwards, PeopleSoft, and Retek are registered trademarks of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Oracle Application Server 10g < Component Name>FAQ Page 7