Dashboard > Avoka Public > ... > Avoka LiveCycle ES Components > XML to SQL DSC
XML to SQL DSC Log In   View a printable version of the current page.
Added by Lachlan Aldred , last edited by Kendy Yus on Oct 22, 2008  (view change)
Labels: 
(None)

Component: com.avoka.livecycle.xml2sql 1.0

Xml2Sql Service

XML 2 SQL: Sets the parameters for XML 2 SQL.

Operation: performConversion

Convert XML to SQL: Convert XML into SQL.

Input Parameter Type Description
Repeating Element java.lang.String Specify an XPath expression to find the XML repeating element that acts as a source of data to be used in repeated SQL updates statements. That is, a separate SQL update statement will be sent to the Database for each XML element that the XPath expression addresses. For instance, with XPath expression '/process_data/varName/rootNode/repeatingNode', if there are 4 elements of name 'repeatingNode', under an element 'rootNode', then 4 SQL updates will be generated by this solution component.

If the insert for any repeating element fails, the entire set will be rolled back.
SQL Statement java.lang.String SQL to execute on each iteration. Use '?' for parameters in the SQL statement - these will be replaced at execution time with the value of each parameter.

For instance, if there are three parameters defined then your SQL statement would likely take the form 'insert into `DatabaseName`.`TableName` values (?, ?, ?)'.
Parameters java.lang.String This is a list of xml sources to be applied into the SQL parameters (i.e. the parts of the SQL query idenfieid by a '?'). Any XPath expressions beginning with a slash ('/') is interpreted as being an self-contained XPath statment. Otherwise it will be appended to the repeating element.

Use '#' in the xpath expression to refer to the current repeating index (1-based).
JNDI Data Source List<List<String>> This component relies on JNDI (Java Naming and Directory Interface) to obtain a database connection. For example 'java:/IDP_DS' is the JNDI reference of the LiveCycle turn-key MySQL database.

New datasources can be added in '%LiveCycleHome%/jboss/server/all/deploy/adobe-ds.xml'
Output Parameter Type Description
No. Elements Processed int Number of elements processed in the XML.
No. Rows Inserted/Modified int Number of rows inserted/modified by the SQL statement.

Operation: performConversionUpdates

Convert XML to SQL with fallback SQL.: Convert XML into SQL with an alternative (or fallback) SQL update statment for those rows that are already inserted.

Input Parameter Type Description
Repeating Element java.lang.String Specify an XPath expression to find the XML repeating element that acts as a source of data to be used in repeated SQL updates statements. That is, a separate SQL update statement will be sent to the Database for each XML element that the XPath expression addresses. For instance, with XPath expression '/process_data/varName/rootNode/repeatingNode', if there are 4 elements of name 'repeatingNode', under an element 'rootNode', then 4 SQL updates will be generated by this solution component.

If the insert for any repeating element fails, the entire set will be rolled back.
SQL Statement java.lang.String SQL to execute on each iteration. Use '?' for parameters in the SQL statement - these will be replaced at execution time with the value of each parameter.

For instance, if there are three parameters defined then your SQL statement would likely take the form 'insert into `DatabaseName`.`TableName` values (?, ?, ?)'.
SQL Update Statement java.lang.String If insert statement fails due to a forgiegn key violation then this update statement will be used as a fallback measure. Use '?' for parameters in the SQL statement - these will be replaced at execution time with the value of each parameter.

For instance, if there are three parameters defined then your SQL statement would likely take the form 'UPDATE `DatabaseName`.`TableName` set `ColumnName` = ? WHERE `Keyname' = ?.
Parameters java.lang.String This is a list of xml sources to be applied into the SQL parameters (i.e. the parts of the SQL query idenfieid by a '?'). Any XPath expressions beginning with a slash ('/') is interpreted as being an self-contained XPath statment. Otherwise it will be appended to the repeating element.

Use '#' in the xpath expression to refer to the current repeating index (1-based).
JNDI Data Source List<List<String>> This component relies on JNDI (Java Naming and Directory Interface) to obtain a database connection. For example 'java:/IDP_DS' is the JNDI reference of the LiveCycle turn-key MySQL database.

New datasources can be added in '%LiveCycleHome%/jboss/server/all/deploy/adobe-ds.xml'
Output Parameter Type Description
No. Elements Processed int Number of elements processed in the XML.
No. Rows Inserted/Modified int Number of rows inserted/modified by the SQL statement.

For how to configure license information for this component service - XML 2 SQL, please click on the following link:
Avoka LiveCycle ES Component License Configuration

Please send us any questions or comments on this documentation regarding XML 2 SQL by clicking on the following link:
Feedback

Licence Configuration:

Parameter Type Description
License Key java.lang.String The license key provided to you when you purchased a production license for this Solution Component. If blank this Solution Component will assume evaluation mode and allow 100 invocations or 6 hours up-time.
License Organisation java.lang.String The organization name you provided to Avoka for which you are licensing this Solution Component.
Powered by Atlassian Confluence 2.7.2, the Enterprise Wiki. Bug/feature request - Atlassian news - Contact administrators