[Servingxml-help] Where to start?
Brought to you by:
danielaparker
From: Castillo, D. <Dav...@lf...> - 2010-01-26 21:48:23
|
I have a servingxml script that extracts data from a DB and formats it into XML records. I have a new requirement : for each record call a web service written in java with data from the record and enrich the record with results from the web service? Where should I start? Is this an extension to ServingXML or can I make the service call in a saxFilter after the <sx:content> element? By the way we have been very successful utilizing ServingXML as our ETL tool. Who needs Informatica? Here's snippets the breakdown of the code <sx:resources xmlns:sx="http://www.servingxml.com/core"> <sx:service id="ddb"> <sx:serialize> <sx:content ref="ddbdoc"/> <sx:batchedSerializer path="doc" batchSize="10000"> <sx:xsltSerializer> <sx:outputProperty name="indent" value="yes"/> <sx:outputProperty name="cdata-section-elements" value="field"/> <sx:fileSink file="{$filepre}/ddb-{$ssnmin}-{$ssnmax}-{$sx:batchSequenceNumber}.xml"/ > </sx:xsltSerializer> </sx:batchedSerializer> </sx:serialize> </sx:service> <sx:recordContent id="ddbdoc"> <sx:recordStream> <sx:sqlReader id="ddbext"> <sx:sqlConnectionPool ref="jdbcPool"/> <sx:sqlQuery recordType="ddbrec" trim="true"> SELECT... </sx:sqlQuery> </sx:sqlReader> <sx:composeRecord recordType="composite" repeatingGroupField="contractGroup" startTest="1=1" endTest="((sx:current//CN_CNTRCT_NBR != sx:previous//CN_CNTRCT_NBR) or (sx:current//IS_ADMIN_SYS_CDE != sx:previous//IS_ADMIN_SYS_CDE))"> <sx:newField name="svcAgents"> <sx:toString select="contractGroup/ddbrec[AGT_POL_ROLE_CDE='SA']/AGT_TAX_ID_NBR"/> </sx:newField> <sx:newField name="wrtAgents"> <sx:toString select="contractGroup/ddbrec[AGT_POL_ROLE_CDE='WA']/AGT_TAX_ID_NBR"/> </sx:newField> <sx:newField name="agtRoleCdTaxId"> <sx:toString select="contractGroup/ddbrec/AGT_RCD_TXID"></sx:toString> </sx:newField> </sx:composeRecord> </sx:recordStream> <sx:recordMapping ref="ddbrecToXml"/> </sx:recordContent> <sx:recordMapping id="ddbrecToXml"> <add> <sx:onRecord recordType="composite"> <doc> <field name="cntrct"> <sx:toString select="contractGroup/ddbrec[1]/CN_CNTRCT_NBR"/> </field> ... </doc> </sx:onRecord> </add> </sx:recordMapping> Notice of Confidentiality: **This E-mail and any of its attachments may contain Lincoln National Corporation proprietary information, which is privileged, confidential, or subject to copyright belonging to the Lincoln National Corporation family of companies. This E-mail is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient of this E-mail, you are hereby notified that any dissemination, distribution, copying, or action taken in relation to the contents of and attachments to this E-mail is strictly prohibited and may be unlawful. If you have received this E-mail in error, please notify the sender immediately and permanently delete the original and any copy of this E-mail and any printout. Thank You.** |