I'm quite new to Castiron and this is what I'm trying to accomplish
I have a Salesforce query object that gets me information from a custom object.
What I need to do is to map the output from the query to XML elements and eventually construct an XML file. How do we accomplish this? Do we need a prebuilt XML template? or does CastIron build this one dynamically?
Any feedback is much appreciated
You need a schema and WriteXML2009-06-17T22:16:00ZThis is the accepted answer. This is the accepted answer.1) First, you need to build or acquire an XSD containing the schema for the object you are mapping to.
2) Import the schema to the project using the right-click "add document" menu item in the XML Schemas directory of the project.
3) In the variables tab, use the right-click "Create new variable" menu item and create a variable of the type you imported.
4) Map from the salesforce.com query output to your variable.
5) Use WriteXML to serialize your variable.
6) Use an FTP or HTTP activity to write the data to the target.
Sathya400 2700057BXV13 Posts
Re: You need a schema and WriteXML2012-04-18T02:45:47ZThis is the accepted answer. This is the accepted answer.
- SystemAdmin 110000D4XK
<common header info 1>
<common header info 2>
<common header info 3>
Can some one help me on this please.
Thank you in advance.
Re: You need a schema and WriteXML2012-04-23T22:46:43ZThis is the accepted answer. This is the accepted answer.
- Sathya400 2700057BXV
Where possible, you should be looking to use bulk inserts to the database (set the batching flag in the configuration of the Database Insert/Update/Upsert activity), rather than row by row. This will make your orchestration faster and more efficient. If you need to process row by row, use the for-each activity.
You essentially have two design patterns you can use:
1) Get data -> ReadXML -> For Each account -> Try -> Map row to the Insert DB activity (use the Catch block to handle any database errors)
2) Get data -> ReadXML -> Try -> Map from the Account complex type in bulk to the Insert DB activity (use the Catch block to handle any database errors)
For scenario 2, an error will roll back the entire transaction, so you need to plan to have contingency logic in the catch block to decide how to handle any errors you encounter. The most likely errors will be due to check constraints, primary key errors, foreign key constraints, or data errors.
Alan Moore, WebSphere Cast Iron ISSW STSM