Was following this guide to read from xml file and write to a table.
http://www.ibm.com/developerworks/data/ ... 0703xiong/
However, columns are not getting generated after mentioning the namespace declaration as:
--------------------------------------------------------------
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
---------------------------------------------------------------
Could you please suggest where I'm I going wrong?
Thank you.
=============
Source file looks like:
=============
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<ase:aseXML xmlns:ase="urn:aseXML:r22" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:aseXML:r22 http://www.nemmco.com.au/aseXML/schemas ... ML_r22.xsd">
<Header>
<From description="NEMMCO">NEMMCO</From>
<To description="SPI Electricity Pty Ltd">EASTERN</To>
<MessageID>a4eca52a-1816-444a-be71-279664e30f92</MessageID>
<MessageDate>2009-07-20T15:13:49+10:00</MessageDate>
<TransactionGroup>CATS</TransactionGroup>
<Priority>Medium</Priority>
<SecurityContext>None</SecurityContext>
<Market>NEM</Market>
</Header>
<Transactions>
<Transaction transactionID="a4eca52a-1816-444a-be71-279664e30f92" transactionDate="2009-07-20T15:13:49+10:00">
<ReportResponse version="r10">
<ReportParameters xsi:type="ase:CATSSnapshotReportParameters">
<ReportName>Snapshot</ReportName>
<Participant>EASTERN</Participant>
<AsAtDateTime>2009-07-20T15:13:49+10:00</AsAtDateTime>
<Tables>
<Table>CATS_METER_REGISTER</Table>
</Tables>
<LastSequenceNumber>1</LastSequenceNumber>
</ReportParameters>
<ReportResults xsi:type="ase:ReplicationReportFormat">
<ReplicationBlock tableName="ElectricityNMIMeters">
<Row xsi:type="ase:ElectricityNMIMeterRow">
<SequenceNumber>14941778</SequenceNumber>
<CreationDate>2003-12-16T11:49:27+10:00</CreationDate>
<MaintenanceDate>9999-12-31T00:00:00+10:00</MaintenanceDate>
<RowStatus>A</RowStatus>
<FromDate>2003-12-15T00:00:00+10:00</FromDate>
<ToDate>9999-12-31T00:00:00+10:00</ToDate>
<NMI>2001152666</NMI>
<SerialNumber>728653</SerialNumber>
<NextScheduledReadDate>2009-09-02</NextScheduledReadDate>
<Location>60</Location>
<Hazard>1</Hazard>
<InstallationTypeCode>BASIC</InstallationTypeCode>
<Route>62051</Route>
<Manufacturer>Email</Manufacturer>
<Model>YA1625</Model>
<Constant>1</Constant>
<Status>C</Status>
</Row>
<Row xsi:type="ase:ElectricityNMIMeterRow">
<SequenceNumber>19609933</SequenceNumber>
<CreationDate>2004-09-23T02:15:46+10:00</CreationDate>
<MaintenanceDate>9999-12-31T00:00:00+10:00</MaintenanceDate>
<RowStatus>A</RowStatus>
<FromDate>2004-09-21T00:00:00+10:00</FromDate>
<ToDate>9999-12-31T00:00:00+10:00</ToDate>
<NMI>2001217326</NMI>
<SerialNumber>293563</SerialNumber>
<NextScheduledReadDate>2009-09-08</NextScheduledReadDate>
<Location>60</Location>
<Hazard>28</Hazard>
<InstallationTypeCode>BASIC</InstallationTypeCode>
<Route>65351</Route>
<Manufacturer>Landis & Gyr</Manufacturer>
<Model>YA1841_5</Model>
<Constant>1</Constant>
<Status>C</Status>
</Row>
</ReplicationBlock>
</ReportResults>
<Event severity="Information">
<Code>0</Code>
<Explanation>Success</Explanation>
</Event>
</ReportResponse>
</Transaction>
</Transactions>
</ase:aseXML>
Generating Column names in XML Input Stage
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 12
- Joined: Thu Jul 30, 2009 1:33 am
- Location: Melbourne
-
- Premium Member
- Posts: 12
- Joined: Thu Jul 30, 2009 1:33 am
- Location: Melbourne
Hi,
Still in process of debugging above job. Could you please help me understand following error:
extract_CMR..XML_HDR_Tran: XML input document parsing failed. Reason: Xalan fatal error (publicId: , systemId: , line: 0, column: 0): An exception occurred! Type:NetAccessorException, Message:Could not connect to the socket for URL 'http://www.nemmco.com.au/aseXML/schemas ... ML_r22.xsd'
Xalan fatal error (publicId: , systemId: , line: 2, column: 189): Fatal error encountered during schema scan
Thank you.
Regards
Satish
Still in process of debugging above job. Could you please help me understand following error:
extract_CMR..XML_HDR_Tran: XML input document parsing failed. Reason: Xalan fatal error (publicId: , systemId: , line: 0, column: 0): An exception occurred! Type:NetAccessorException, Message:Could not connect to the socket for URL 'http://www.nemmco.com.au/aseXML/schemas ... ML_r22.xsd'
Xalan fatal error (publicId: , systemId: , line: 2, column: 189): Fatal error encountered during schema scan
Thank you.
Regards
Satish
Hard to say exactly...usually if the xsd cannot be found you will simply get a warning message, not an abort. At the very least, isolate it and be sure your retrieval logic works......
a) be sure you don't have "validate" checked. It will look for the xsd anyway, but it's possible that option makes it worse.
b) place the xsd local, fully qualify it, and see if you get the same symptom. I haven't seen a scenarion where the URL syntax was utilized.
c) remove the schema mention entirely, and test your logic. There is much more still to do to ensure that you are reading things correctly.
Ernie
a) be sure you don't have "validate" checked. It will look for the xsd anyway, but it's possible that option makes it worse.
b) place the xsd local, fully qualify it, and see if you get the same symptom. I haven't seen a scenarion where the URL syntax was utilized.
c) remove the schema mention entirely, and test your logic. There is much more still to do to ensure that you are reading things correctly.
Ernie
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
-
- Premium Member
- Posts: 12
- Joined: Thu Jul 30, 2009 1:33 am
- Location: Melbourne