XMLPost in Fatwire / Oracle WebCenter Sites

Posted: December 12, 2012 in Fatwire
Tags: , , , , , , , , ,

Introduction to XMLPOST:

In any Content Management System, the CONTENT forms the main part, i.e., the Content Assets. In general, in most of the scenarios, the content is actually generated through feeds / or some other data sources. We need to import data from such sources, and create content assets into the Content Server Database on the management system.

The Fatwire / Oracle WebCenter Sites Content Server delivers with a utility to perform such imports, hence reducing most of the efforts of the developer to write code for importing the data. That utility is nothing but the XMLPost Utility.  To import any data from external sources into the Content Server database, we can use the XMLPost utility. This utility is delivered with the CS – Direct.

All we need to do is to invoke the XMLPost Utility from our program, or through command line.

In this article, we will know about the components involved and the steps involved in the process. We will see more about XMLPost in future posts.

Components involved in the Process:

Following are the components involved in importing the data:

1. The XMLPost Utility, which ships by default with the Content Server.

2. The Posting Element, which also ships by default.

               a.  CS – Direct provides one posting element:  (For Importing BASIC ASSETS)

                         1. RemoteContentPost (OpenMarket/Xcelerate/Actions/RemoteContentPost)

               b.  CS – Direct Advantage provides three posting elements: (For Importing FLEX ASSETS)

                         1.  addData (OpenMarket/Gator/XMLPost/addData)

                         2.  modifyData (OpenMarket/Gator/XMLPost/modifyData)

                         3.  deleteData (OpenMarket/Gator/XMLPost/deleteData)

3.  The Configuration file (.ini file), which specifies the information about the source files (in XML  format), what assets need to be imported, information about the host, usernames, passwords, etc.

4.   The Source files.  These are the well-formed XML files, which contains the data to be imported. This data is to be enclosed within respective tags.

The Process:

1. First, we create the configuration files (.ini files), which has the information about the data that is to be imported.

2. Then we create the source files (XML files), which has the actual data that is to be imported.

3. Place these two files in a directory, and then invoke the XMLPost Utility.

4. Then the XMLPost Utility parses

              a) The configuration file, which has been supplied by us.

              b)The Source files, and creates name / value pairs.

XMLPost Process

The Process image from Fatwire Developer guide

5. Basing on the type of assets that we are trying to import, the Content Server invokes either of the elements.

              a)  Basic Assets

                         1.  RemoteContentPost

              b)  Flex Assets

                         1.  addData

                         2.  modifyData

                         3.  deleteData

6.  The RemoteContentPost or addData/modifyData/deleteData elements perform the required actions and create the asset.

7. A HMTL will be returned to the XMLPost, to indicate whether the import operation has been succeeded or not. The information is logged into the log files, whose information is specified in the configuration files (the above specified .ini files).

8. If you specify to delete the source files (need to specify the parameter in the configuration file), the source files will be deleted once the import has been done.

We will see more in detail about XMLPost in the upcoming articles.

Stay tuned…..


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s