- XML Types and Return Types This page last changed on Nov 28, 2008. .stickable, h1, h2, h3, h4, h5 false true Show Sticky notes Hide Sticky notes Save Cancel Oracle Data Service Integrator Documentation > Data Services Developer's Guide # XML Types and Return Types In entity data services there are two types of types: Return types XML types XML types and return types are very closely related. In data service operations involving entity data services, XML types define the shape of the data service. Physically XML Types are represented a global elements in XML schemas (XSD files.) In other words, the XML types represents in hierarchical form the shape of the data service. A way to think of these two artifacts is to first consider the class and the instance of the class in such languages as Java. XML types can be thought of as a class from which objects in the form of functions are created. In many cases the information needed by these functions is either: A subset of the overall XML types -- for example, a function that returns last name and address but not first name or social security number. In need of further specification -- for example, adjusting a query to list all orders inside each customer rather than to repeat customer information each time.
  | Return and XML types can be see in action in the following example: Creating Your First Data Services
## Where XML Types are Used Oracle Data Service Integrator uses XML types in its model diagrams, entity data services, query editor, update mapper, and metadata browser. ## Where Return Types are Used Return types are sometimes called target schemas. Return types can be thought of as the backbone of both data services and data models. Programmatically, return types are the "r" in FLWR (for-let-where-return) queries. Return types have the following main purposes: Provide a template for the mapping of data from a variety of data sources and, in the case of updates, back to those data sources. Help determine the arrangement of the XML document generated by the XQuery. Return types describes the structure or shape of data that a query produces when it is run.
| In order to maintain the integrity of Oracle Data Service Integrator queries used by your application, it is important that the query return type match the XML type in the containing data service. Thus if you make changes in the return type, you should use the XQuery Editor's "Save and associate schema" command to make the data service's XML type consistent with query-level changes. Alternatively, create a new data service based on your return type. For details see Creating a Simple Data Service Function.

Document generated by Confluence on Jan 13, 2009 15:57