|
|
|
Enterprise Web Services
November 2003 |
This FAQ addresses frequently asked questions relating to Enterprise Web services
aspects of Oracle Application Server Containers for J2EE 10g (9.0.4).
-
What new Web services features are supported in OC4J 9.0.4.
OC4J 9.0.4 enhances the J2EE Web services already supported by implementign
the following new features; (i) Support SOAP Headers, Header Processing
API's; (ii)
Support for typed and untyped SOAP messages for interoperability; (iii)
SOAP fault support; (iv) Web services specific built-in debugging features
(v) Extended data type support for PL/SQL Web services (CLOB, BLOB,BFILE
and user-defined Object types); (v) Complete support for UDDI v2 registry
features with advanced features like subscription and notification.
-
Does OC4J Web services runtime support JAX-RPC?
NO, OC4J 9.0.4 does support JAX-RPC APIs . JAX-RPC APIs are supported in
next release, Oracle Application Server 10g 10.0.3.0.0, a preview of
which
is available on Oracle Technology
Network.
-
Where can I find the OC4J Web services Developer's Guide?
Documentation for all Oracle products is available from the Oracle Technology
Network (OTN) at http://otn.oracle.com/documentation/content.html.
The Web services Developer's Guide is available with OC4J documentation
set at
http://otn.oracle.com/tech/webservices/documentation.html
-
Is there any sample code available for Web services?
Several Web Services samples available for download from Oracle
Technology Network. You can find How-To samples on the How-To
link from OC4J Home Page. Additional samples are available from Web
services Center
-
Can I use a third-party database like DB2, SQLServer with Oracle UDDI
registry?
Yes, OC4J supports third-party databases like DB2, SQLServer, Informix,
Sybase, etc. by using DataDirect JDBC drivers. These drivers can be downloaded
from Oracle Technology Network for exclusive use with Oracle Application
Server.
- Is it possible to create stateful PL/SQL Web Services? If not,
will it be possible in coming releases?
Currently PL/SQL Web services are stateless. You can work around it by creating
a stateful Java Web service yourself which in turn calls a PL/SQL Web service
or PL/SQL procedure directly from Java - stateful Java Web services . Bear
in mind to some degree stateful Web services are problematic today because
most implementations, including ours, use cookies to manage state and thus
depend on HTTP whereas as we go forward folks will start moving SOAP over
other protocols like JMS, FTP, SMTP etc. In these scenarios state managed
using cookies won't make sense. Over time the specifications will evolve to
allow state to be carried in SOAP headers thus enabling interoperable stateful
Web services. Oracle, along with other industry leaders, submitted WS-Context
specification to OASIS to address this based on open standards.
- If a Web service is deployed on IBM WebSphere using an Oracle
Database as backend, is it possible to run these Web services on OC4J
9.0.4.
It depends on the which version of WebSphere these web services
are developed with . If it is Websphere 4.x or prior it is possible to migrate
to 'Oracle SOAP' with minimal changes. This is because both WebSphere
and 'Oracle SOAP' are based off-of Apache SOAP. If it is Websphere 5.x, then
it is not possible until J2EE 1.4 is finalized and all vendors support it.
Until then there is only interoperability but not portability for Web services
across J2EE platforms is not there.
- OC4J 9.0.4 supports SOAP headers. Does it support SOAP header attributes
"actor" and "mustUnderstand"? If yes
how do I set these attributes for the header that I send from the client to
web service.
Before you to add the header element to your message, you have to construct
the full header structure yourself. Here is some sample code which describes
that : As you can see in this example code, the QName
for the mU and actor attributes are constructed as a simple string
and rely on the fact that I already know the prefix used in the SOAP envelope
by our implementation. An alternate option will be to create another attribute
(xmlns:SOAP-ENV) to define the soap envelope namespace. Note that the value
you use for this new prefix is up to you. The only important part is the value
you use for this attribute is the right URI (xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/)
and that you use this prefix in the mU and actor attributes.
String TNS_CFG = "http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Configuration.xsd";
...
public static Element constructConfigHeader( HashMap userConfig, UUID demoUserID)
{
DOMImplementation i = new XMLDOMImplementation();
Document d = i.createDocument( TNS_CFG, "nsh:ConfigurationHeader",null);
Element config = d.getDocumentElement(); // mustUnderstand="boolean" actor="anyURI"
config.setAttribute("SOAP-ENV:mustUnderstand", "1");
config.setAttribute("SOAP-ENV:actor", "/WarehouseA/WarehouseService.asmx");
// LoggingFacility addChild( i, d, config, "nsh:UserId", demoUserID.toString(), null ); for (int j = 0; j < CONFIG_GRID.length; j++)
{
// lookup URL from role
String url = (String)userConfig.get(CONFIG_GRID[j][1]);
if (url == null) url = CONFIG_GRID[j][4];
addChild( i, d, config, "nsh:ServiceUrl", url, CONFIG_GRID[j][1]);
}
return config;
}
---------------------------------------------------------------------------
//part of submitOrder
...
Vector headerEntries = new Vector();
headerEntries.addElement(configElem);
Header configHeader = new Header();
configHeader.setHeaderEntries( headerEntries);
requestEnv.setHeader(configHeader);
...
---------------------------------------------------------------------------
//calling code
...
RetailerStub retailerStub = new RetailerStub();
retailerStub.endpoint = retailerURL;
Element configuration = constructConfigHeader( userConfig, userID);
orderList = retailerStub.submitOrder( orderParts, configuration);
...
|
//wire format
...
<?xml version = '1.0' encoding = 'UTF-8'?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Header>
<nsh:ConfigurationHeader
xmlns:nsh="http://www.ws-i.org/SampleApplications/SupplyChainManagement/2002-08/Configuration.xsd"
SOAP-ENV:mustUnderstand="1"
SOAP-ENV:actor="/WarehouseA/WarehouseService.asmx">
<nsh:UserId>6007a7b3c1ed4cc2a4bfa36a258d3e75</nsh:UserId>
<nsh:ServiceUrl Role="Retailer">http://samples.bowstreet.com/wsi/soaprpc/wsi/RetailerImpl</nsh:ServiceUrl>
<nsh:ServiceUrl Role="WarehouseA">http://samples.bowstreet.com/wsi/soaprpc/wsi/WarehouseAImpl</nsh:ServiceUrl>
<nsh:ServiceUrl Role="WarehouseB">http://samples.bowstreet.com/wsi/soaprpc/wsi/WarehouseBImpl</nsh:ServiceUrl>
<nsh:ServiceUrl Role="WarehouseC">http://samples.bowstreet.com/wsi/soaprpc/wsi/WarehouseCImpl</nsh:ServiceUrl>
<nsh:ServiceUrl Role="LoggingFacility">http://dwdemos.alphaworks.ibm.com/WS-I_Sample/servlet/messagerouter
</nsh:ServiceUrl>
</nsh:ConfigurationHeader>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
|
- I have installed Oracle Application Sever 10g and when I deploy
andtry to publish Web services into Oracle UDDI registry, EM does not provide
me UDDI publishing GUI functionality? Is this functionality missing?
Oracle Application Server 10g UDDI Registry is installed and configured
only when you choose OID install. Some steps to help you:
install infrastructure (keep down the OID port, hostname, password)
install portal (you need to type in the information just kept)
ping UDDI servlet http://your-host:port/uddi/inquiry
login to EM and you should be able to publish a webservice into UDDI
(you should be able to see the UDDI registry link from OC4J_Portal)
Top of Page
Oracle Corporation
World Headquarters
500 Oracle Parkway
Redwood Shores, CA 94065
U.S.A.
Worldwide Inquiries:
+1.650.506.7000
Fax +1.650.506.7200
http://www.oracle.com/
Copyright © Oracle Corporation
2003
All Rights Reserved
This document is provided for
informational purposes only,
and the information herein is
subject to change
without notice. Please
report any errors herein to
Oracle Corporation. Oracle
Corporation does not provide
any warranties covering and specifically
disclaims any
liability in connection with
this document.
Oracle is a registered trademark
of Oracle Corporation.
All other company and product
names mentioned are used
for identification purposes only
and may be trademarks of
their respective owners.
|