XML File Access builder
Data integration builders generate all the code and artifacts necessary to attach to and interface with backend systems in order to create, retrieve, update and delete data from those systems. Currently, Portlet Factory has builders for integration with back ends such as SQL databases from multiple vendors, Lotus Domino, SAP, PeopleSoft, Siebel and any WSDL-based web services. In addition, customers can use the methodology described here to write custom builders to integrate with their own proprietary applications. Although there are, of course, multiple approaches to creating integration builders, the methodology described here is sufficiently generic to cover most if not all situations and has been used successfully to create the builders mentioned above.
This sample shows how to create a data integration type builder. It does this by demonstrating a simple XML File Access Builder, which allows you to read/write records to/from an XML file. Along with the builder code, it also includes a set of sample provider/consumer models that access an orders.xml file.
This sample builder shows the following techniques:
- Creating a schema from sample data.
- Creating a schema using the SchemaCreator API.
- Creating Data Service and operations.
- Caching of a schema.
- Using a Builder helper at runtime (access to back end).
- Using a Coordinator class to populate a select list from a back end.
Figure 1. Screen shot of the final sample builder UI with inputs filled in
Notes on running the sample and prerequisites
To run the sample model that uses the XML File Access builder:
1. Download the sample ZIP file and import it into a project using the File, Import, WebSphere Portlet Factory Archive command.
2. For builder development in general, we recommend starting Eclipse with the -debug flag. This will let you view any println statements you include in your builder or Coordinator code.
3. Open the samples\builders\XmlFileAccessConsumer.model model and run it.
http://integration_builder_sample.zip/$file/integration_builder_sample.zip|Integration Sample">Integration">http://integration_builder_sample.zip/$file/integration_builder_sample.zip|Integration Sample