Oracle Dynamic Services User's and Administrator's Guide
Release 9.0.1

Part Number A88783-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to next page

D
Sample Service Packages

A set of sample service packages (see Table D-1 through Table D-10) is available online after installing Oracle Dynamic Services. The sample service packages can be found at:

On UNIX systems:

$ORACLE_HOME/ds/demo/services

On Windows NT systems:

$ORACLE_HOME\ds\demo\services

These sample service packages can be installed as described in the note at the end of Section 3.2. In creating your own services, you can use these sample service packages as beginning points and copy the entire sample service package directory to a directory of your choice and then begin making modifications. Once you have determined category information for the classification XML file and have modified the remaining files to your liking, follow the steps in Section 3.2.1 to create a set of categories required by your service using the DSAdmin utility and Section 3.2.2 to register your service. Next, browse your registered services (see Section 3.3) and test your service by executing it using the DSAdmin utility (see Section 3.4).

Table D-1 CnnPortfolio Sample Service Package
Service Package  Description 

CnnPortfolio 

Simple service package. CNN Financial Network. Given a stock ticker, this service returns the stock ticker symbol, time, current price, change in its value, and transaction volume. This service specifies:

  1. An input section that uses no input namespaces, no aliases, specifies an input adaptor to do some validation of the request and specifically of the specified parameters, specifies rendering directives that maps the input XML schema file to HTML for presentation to service consumer application clients, then the service consumer application transforms the HTTP request back into an XML document that conforms to the request XML schema file specified by the service provider.
  2. A protocol section that uses the HTTP Web protocol to communicate to the HTTP-based service provider and specifies in the parameters section the HTTP GET request method, the servicing URL, and the HTTP query string named symbols, which resolves to the alias SymbolList.
  3. Uses the default, standard simple execution adaptor.
  4. An output section that uses an adaptor that takes the HTML response, transforms it to XHTML, then another stylesheet transforms the XHTML response to the XML response defined by the output schema; the output schema points to the XML Schema documents (or DTDs) that define the XML output the service returns to the service consumer application. The output section formats the XML response in the form of a template containing the items Symbol, Time, Price, Change, and Volume.
 
Table D-2 Currency Sample Service Package
Service Package  Description 

Currency 

Simple service package. Oanda Currency Conversion service. Given a source currency, this service returns a currency conversion value. This service specifies:

  1. An input section that uses the namespace curreq, the aliases SourceCurrency, DestCurrency, and Value, all of which specify the xpath used to extract the values of each respective node, specifies no input adaptor, specifies rendering directives that maps the input XML schema file to HTML for presentation to service consumer application clients, then the service consumer application transforms the HTTP request back into an XML document that conforms to the request XML schema file specified by the service provider.
  2. A protocol section that uses the HTTP Web protocol to communicate to the HTTP-based service provider and specifies in the parameters section the HTTP GET request method, the servicing URL, and the HTTP query strings named exch, which resolves to the alias SourceCurrency, expr, which resolves to the alias DestCurrency, and value, which resolves to the alias Value.
  3. Uses the default, standard simple execution adaptor.
  4. An output section that uses an adaptor that takes the HTML response, transforms it to XHTML, then another stylesheet transforms the XHTML response to the XML response defined by the output schema; the output schema points to the XML Schema documents (or DTDs) that define the XML output the service returns to the service consumer application. The output section formats the XML response in the form of a template containing the items SourceCurrency, DestCurrency, and Value.
 
Table D-3 DBService Sample Service Package
Service Package  Description 

DBService 

Simple service package. Database service. Given a connection name, username, password and dbURL string, this service connects to an Oracle database using the JDBC protocol adaptor, queries a table, and returns the results of the query. This service specifies:

  1. An input section that uses the namespace db, the aliases username, password, dburl, TableName, and Where, all of which specify the xpath used to extract the values of each respective node, specifies no input adaptor, specifies rendering directives that maps the input XML schema file to HTML for presentation to service consumer application clients, then the service consumer application transforms the HTTP request back into an XML document that conforms to the request XML schema file specified by the service provider.
  2. A protocol section that uses the JDBC protocol to communicate to a database-based service provider and specifies in the connectiondefs section the connection information, the connection page name and associated query string.
  3. Uses the default, standard simple execution adaptor.
  4. An output section that uses an adaptor that takes the HTML response, transforms it to XHTML, then another stylesheet transforms the XHTML response to the XML response defined by the output schema; the output schema points to the XML Schema documents (or DTDs) that define the XML output the service returns to the service consumer application. The output section formats the XML response in the form of a template containing the rowset row consisting of resultnum, employee name, and employee salary.
 
Table D-4 FailOverPortfolio Sample Service Package
Service Package  Description 

FailOverPortfolio 

Failover service package. Given a stock ticker, this service returns the current price. Should the first service not be available, a failover to a second service guarantees a result. This service specifies:

  1. An input section that uses no input namespaces, no aliases, no input adaptor, and specifies rendering directives that maps the input XML schema file to HTML for presentation to service consumer application clients, then the service consumer application transforms the HTTP request back into an XML document that conforms to the request XML schema file specified by the service provider.
  2. No protocol section.
  3. A failover execution adaptor that takes as parameters an ordered list of two compatible services. At execution time, should the first service fail to execute, the second service in the list is executed.
  4. No output section.
 
Table D-5 Ipfl Sample Service Package
Service Package  Description 

Ipfl 

Compound service package. International Portfolio service. Given a stock ticker, this service returns current prices in the supplied currency. This service specifies:

  1. An input section that uses no input namespaces, no aliases, no input adaptor, and specifies rendering directives that maps the input XML schema file to HTML for presentation to service consumer application clients, then the service consumer application transforms the HTTP request back into an XML document that conforms to the request XML schema file specified by the service provider.
  2. No protocol section.
  3. A compound execution adaptor that splits a single message into two messages, applies a list of two XSLT stylesheets by specifying an index that corresponds to the list of transformations to be performed on the original service message, which results in a list of two resulting messages. A conversion currency service and failover finance service are executed as single requests and each of the two messages is merged back into a single message. By modularizing each message, a dependency matrix is utilized that shows the dependencies of the input of each of the modules, thereby controlling the execution flow of each service on each message. The XSLTs are packaged in a jar file and its location specified as a service binary resource in the package section of the service header.
  4. No output section.
 
Table D-6 SampleService Sample Service Package
Service Package  Description 

SampleService 

Simple service package. Oanda Currency Conversion service. Note that this service contains annotations describing how its various sections work. Given a source currency, this service returns a currency conversion value. This service specifies:

  1. An input section that uses the fbreq namespace, aliases named SourceCurrency, DestCurrency, and Value, all of which specify the xpath used to extract the values of each respective node, no input adaptor, and specifies rendering directives that maps the input XML schema file to HTML for presentation to service consumer application clients, then the service consumer application transforms the HTTP request back into an XML document that conforms to the request XML schema file specified by the service provider.
  2. A protocol section that uses the HTTP Web protocol to communicate to the HTTP-based service provider and specifies in the parameters section the HTTP GET request method, the servicing URL, and the HTTP query strings named exch, which resolves to the alias SourceCurrency, expr, which resolves to the alias DestCurrency, and value, which resolves to the alias Value.
  3. Uses the default, standard simple execution adaptor.
  4. An output section that uses an adaptor that takes the HTML response, transforms it to XHTML, then another stylesheet transforms the XHTML response to the XML response defined by the output schema; the output schema points to the XML Schema documents (or DTDs) that define the XML output the service returns to the service consumer application. The output section formats the XML response in the form of a template containing the items SourceCurrency, DestCurrency, and Value.
 
Table D-7 Ual Sample Service Package
Service Package  Description 

Ual 

Simple service package. United Airlines service. Given a username and password, this service returns the mileage information from your UAL account including mileage summary, account number, membership level, and year-to-date premier miles. This service specifies:

  1. An input section that uses the namespace ualreq, the aliases AccountNumber and Password, both of which specify the xpath used to extract the values of each respective node, and specifies no input adaptor or rendering directives.
  2. A protocol section that uses the HTTP Web protocol to communicate to the HTTP-based service provider and specifies in the parameters section the HTTP POST request method, the servicing URL, the request header names to manually set the HTTP request headers in the request, and the HTTP query strings named stamp, user, which resolves to the alias AccountNumber, pwd, which resolves to the alias Password, ur_return_to, and ur_action.
  3. Uses the default, standard simple execution adaptor.
  4. An output section that uses an adaptor that takes the HTML response, transforms it to XHTML, then another stylesheet transforms the XHTML response to the XML response defined by the output schema; the output schema points to the XML Schema documents (or DTDs) that define the XML output the service returns to the service consumer application. The output section formats the XML response in the form of a template containing the items AccountNumber, MembershipLevel, PrimierMiles, and CurrentBalance.
 
Table D-8 Yahoo Sample Service Package
Service Package  Description 

YahooPortfolio 

Simple service package. Yahoo Portfolio service. Given stock tickers, this service returns the current price. This service specifies:

  1. An input section that uses no namespace, the alias SymbolList, which specifies the xpath used to extract the values of the node, specifies an input adaptor to do some validation of the request and specifically of the specified parameters, and specifies rendering directives that maps the input XML schema file to HTML for presentation to service consumer application clients, then the service consumer application transforms the HTTP request back into an XML document that conforms to the request XML schema file specified by the service provider.
  2. A protocol section that uses the HTTP Web protocol to communicate to the HTTP-based service provider and specifies in the parameters section the HTTP GET request method, the servicing URL, the HTTP query string named SymbolList, which resolves to the alias SymbolList.
  3. Uses the default, standard simple execution adaptor.
  4. An output section that uses an adaptor that takes the HTML response, transforms it to XHTML, then another stylesheet transforms the XHTML response to the XML response defined by the output schema; the output schema points to the XML Schema documents (or DTDs) that define the XML output the service returns to the service consumer application. The output section formats the XML response in the form of a template containing the items Symbol, Time, Price, Change, and Volume.
 
Table D-9 YahooPortfolioCustomAdaptor Sample Service Package
Service Package  Description 

YahooPortfolioCustomAdaptor 

Simple service package. Yahoo Portfolio service. Given a stock ticker, this service returns the stock ticker symbol, time, current price, change in value, and transaction volume using text response. This service specifies:

  1. An input section that uses no namespace, the alias SymbolList, which specifies the xpath used to extract the values of the node, specifies an input adaptor to do some validation of the request and specifically of the specified parameters, and specifies rendering directives that maps the input XML schema file to HTML for presentation to service consumer application clients, then the service consumer application transforms the HTTP request back into an XML document that conforms to the request XML schema file specified by the service provider.
  2. A protocol section that uses the HTTP Web protocol to communicate to the HTTP-based service provider and specifies in the parameters section the HTTP GET request method, the servicing URL, the HTTP query strings named Symbols, which resolves to the alias SymbolList and format.
  3. Uses the default, standard simple execution adaptor.
  4. An output section that specifies the name of the custom output adaptor.
 
Table D-10 YahooPortfolioCustomProperty Sample Service Packages  
Service Package  Description 

YahooPortfolioCustomProperty 

Simple service package. Yahoo portfolio service. Given a stock ticker, this service returns the stock ticker symbol, time, current price, change in value, and transaction volume based on the profile of the user. This service specifies:

  1. An input section that uses a ppflreq namespace, the aliases Username and SymbolList, both of which specify the xpath used to extract the values of the node, specifies no input adaptor, and specifies rendering directives that maps the input XML schema file to HTML for presentation to service consumer application clients, then the service consumer application transforms the HTTP request back into an XML document that conforms to the request XML schema file specified by the service provider.
  2. A protocol section that uses the HTTP Web protocol to communicate to the HTTP-based service provider and specifies in the parameters section the HTTP GET request method, the servicing URL, the HTTP query string named SymbolList, which resolves to the alias SymbolList.
  3. Uses the default, standard simple execution adaptor.
  4. An output section that uses an adaptor that takes the HTML response, transforms it to XHTML, then another stylesheet transforms the XHTML response to the XML response defined by the output schema; the output schema points to the XML Schema documents (or DTDs) that define the XML output the service returns to the service consumer application. The output section formats the XML response in the form of a template containing the items Symbol, Time, Price, Change, and Volume.
 

Go to previous page Go to next page
Oracle
Copyright © 1996-2001, Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback