Creating XMLBean Support for Java Functions 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 # Creating XMLBean Support for Java Functions Before you can create a Physical Data Service from Java functions, you need to create a `.class` file that contains XMLBean classes based on global elements and compiled versions of your Java functions. This topic describes how to create XMLBean classes based on a schema of your data. Supported XMLBean Standards Creating XMLBean Classes for Java Functions See Also ## Supported XMLBean Standards Imported Java functions containing complex types must have a schema that conforms to one of the following XMLBean standards:
Version | URL
--- | ---
Apache | org.apache.xmlbeans
Oracle | com.bea.xml
If your Java routines were compiled under previous versions, they will need to be recompiled before they can be imported.
| The New Physical Data Service wizard requires that all the complex parameter or return types used by the functions correspond to XMLBean global element types whose content model is an anonymous type. Thus only functions referring to a top level element are imported.
## Creating XMLBean Classes for Java Functions This topic describes how to create XMLBean classes based on a schema of your data. Creating a New Project Enabling XMLBeans Builder Importing Schema and Java Source Files Creating a Project Reference ### Creating a New Project You need to create a new project to build the XMLBean classes. ##### New Project To create a new project: Using Workshop for WebLogic, create a new project by right-clicking in the Project Explorer and choosing New > Project in the menu. The New Project wizard is launched. Choose Java > Java Project and click Next. Type a name for the project and select Create separate source and output folders in the Project layout area. Click Finish. Workshop for WebLogic creates a new project in the Project Explorer. ##### New Java Project Wizard ### Enabling XMLBeans Builder You need to enable the XMLBeans Builder in the project to allow it to create classes based on the Java source and XML schema files. ##### Project Properties To enable XMLBeans Builder: Right-click the new project, and choose Properties from the menu. The Properties dialog appears. Click XMLBeans, select the Enable XMLBeans Builder checkbox, and click OK. ##### Enabling XMLBeans Builder ### Importing Schema and Java Source Files You need to import the schema files and Java source files into the project. To import the schema and Java source files: Copy the schema files representing the data used by the Java functions along with the Java source files into the src folder. ### Creating a Project Reference The final step involves creating a reference to your XMLBeans-based project from the dataspace in which you want to use the Java functions. To create the project reference: Right-click the dataspace project in which you want to use the Java functions and choose Properties from the menu. Select Project References in the Properties dialog. Select your XMLBeans-based project, and click OK. When your project is deployed, Oracle Data Service Integrator does the following: Rebuilds your XMLBeans-based project, if required, and generates a JAR file Copies the JAR file to the `DSP-INF/lib` folder in the dataspace project ##### Project References ## See Also ##### How Tos Create a Physical Data Service from a Java Function ##### Reference Physical Data Services from Java Functions Overview XMLBeans Example Using a Metadata-rich Java Class

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