Posts Tagged ‘XMLPost’

To import the assets through XMLPost, we need to invoke the XMLPost Utility. We will now see how to invoke XMLPost through a program:

1. To invoke the XMLPost utility programmatically, first we need to create an XMLPost object.

Example: COM.FutureTense.XML.Post.XMLPost samplePoster = new COM.FutureTense.XML.Post.XMLPost();

2. Using that object, we need to call the doIt method of the XMLPost.

Syntax: doIt(String[] args)

3. The elements of the array are the path values of source file and ini files. Here, the source parameter can point to:

            • A single file, like -s/sample/Article-add.xml

            • A directory of XML files, like -s/sample/source-xml-files/

           •  A list file, like -s/sample/xmlpostfiles.lst

The list file provides a list of all the files that you want to import. It is similar to an .ini file but with extension of .lst.

In total, we need to program as follows. Include other calls to any other elements basing on your requirement.

………… Your code here…………..

strSourceFileDir = “-s/sample/Article-add.xml”;
strConfigFile = “-c/sample/Article-add-config.ini”;

String args[]  = {strSourceFileDir,strConfigFile};

COM.FutureTense.XML.Post.XMLPost samplePoster = new COM.FutureTense.XML.Post.XMLPost();
    samplePoster.doIt(args);   // here we are supplying the xml and ini file values
catch (Exception e)
    ics.LogMsg(” —- your error message here —–“);
  ………… Your code here…………..

That’s it. The XMLPost will be invoked, and basing on the source files the importing of assets will be done.

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…..

Fatwire Interview Questions:

Fatwire Interview Questions” is one of the most frequently googled search term in Google. Hence, I’m coming today with a list of Fatwire Interview questions. The same will be applied for Oracle WebCenter Sites as-well.

Note: These are the questions which I’ve faced from most of the interviewers.

  1. What are the different versions of Fatwire that you have worked on?
  2. Explain difference between Basic Asset Model and Flex Asset Model?
  3. Explain difference between CSElement and Template?
  4. Explain about templates and its need in Fatwire CMS?
  5. Explain how will you handle multi-level languages in Fatwire?
  6. Explain about Asset and Asset Type?
  7. Explain about the Basic Asset Model?
  8. Explain about the Flex Asset Model?
  9. Explain about Rendering?
  10. Explain about different Publishing methodologies?
  11. Explain about the types of publishing Fatwire supports?
  12. Explain about Roles and ACLs?
  13. Explain about Attribute Editors and how will you create Attribute Editors?
  14. Explain about Workflow?
  15. Explain about the default asset types of Fatwire?
  16. Explain the use of Page Asset Type in Fatwire CMS?
  17. Explain the use of CSElement, SiteEntry and Template Asset Types?
  18. When will you use asset:getattributevalues and assetset:getmultiplevalues?
  19. What are the limitations of the tag assetset:getmultiplevalues?
  20. What is the difference between asset:list and assetset:getassetlist tag?
  21. How will you perform Error handling in JSP?
  22. What happens behind the scene when I hit an URL and invoke a page in Fatwire CMS?
  23. I want to know how many flex assets are available in my Article AssetType. Is it possible to know that? If so, how can we know that?
  24. Explain about the Recommendations, Collections, Queries, Segment, and Promotion?
  25. How to re-use the asset types that are present in one site, in another site?
  26. Explain about XMLPost and BulkLoader utilities?

Happy Job Hunting…. 

To make our work of building websites simple, Fatwire ships with a few Tools and Utilities. These are called CONTENT SERVER TOOLS AND UTILITIES. Using these tools, we can see the tables, modify them and their data, export the tables, view and edit the properties, etc. Following are the CS Tools and Utilities that ship along with Fatwire.

  1. Content Server Explorer
  2. CatalogMover
  4. XMLPost

In this Article, we will discuss about the CS-Explorer. We will discuss about a few of them in upcoming posts.

Content Server Explorer

One of the most popular Tools used by the developers to make their work easy. It is called as CS-Explorer. It has many features that attract the developers. We can edit, update the tables and rows in the CS Database. We can edit, update the Templates, CSElements written XML, JSP. Following are some of its uses.

  • Maintains Revision Tracking
  • Can edit the templates, elements etc, instead of going to the advanced UI, and editing there.
  • Add entries to the tables of database
  • Create and delete the tables
  • Export and Import the tables and records.

The screen of CS-Explorer:


NOTE: CS-Explorer is a Microsoft Windows based application. Hence, it can’t run on other operating systems. In other operating systems, use CatalogMover for similar kind of works.

Stay tuned for rest of the CS Tools and Utilities.….!