XML input Stage Error

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
srai
Participant
Posts: 101
Joined: Wed Feb 09, 2005 10:50 pm

XML input Stage Error

Post by srai »

Hi All,

I am working with DataStage XML input stage.

I have tried my best to do the xml input stage setup.

While running job I am getting following errors-

The name '{0}' is not a valid NCName.
expression = '/:CustomerInfo' Remaining tokens are: ('/')

Have anybody have idea about this?

Thanks in advance
Santosh
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

From what Ernie has posted, there are namespace bugs in the early 8.x releases. What exact version do you have? What patches / fixpacks have you installed?
-craig

"You can never have too many knives" -- Logan Nine Fingers
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Yes. Look around and then check with your service provider...this looks a lot like the symptom needing patch e117664 as I recall.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
srai
Participant
Posts: 101
Joined: Wed Feb 09, 2005 10:50 pm

Post by srai »

chulett wrote:From what Ernie has posted, there are namespace bugs in the early 8.x releases. What exact version do you have? What patches / fixpacks have you installed? ...

Hi,

I am using DS8.0. AFAIK there we have not istalled any service pack.
Its just the by default DataStage8.0 installation.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Then you're chock full o' bugs... better get patching. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
ponzio
Participant
Posts: 165
Joined: Mon Dec 05, 2005 9:13 am
Location: Italy

Post by ponzio »

Hi,
I'm getting the same error ... but I'm not able to find the above patch :roll:

I tried to work around and I've got some good things but my solution produces some warnigs that I can't hunderstand.

My job is like this FOLDER STAGE --> XML INPUT --> trasnformer --> seq.file

1) I've removed the "xsd:" from the xml table definition in the XML Input Stage

2) the values are correctly written in the seq. file but a lot of warnigs are generated in the log.
A warning is generated for each fileds different from the first field (the repetition element ... the key), here is an example of the warnigs

BGAS_00200_XML_INPUT_TABELLA..XML_INPUT: XSLT Processor: Unknown element on the output. Element Name = "protocolloRichiesta"

Then, after these warnigns, a Phantom appears :

Server:WETLSRVV
Project:ESTRAZIONI
Job No:369
Job name:BGAS_00200_XML_INPUT_TABELLA
Invocation:
Event Number:560472
Event type:Warning
User:WETLSRVV\Administrator
Timestamp:26/05/2010 16.24.39
Message Id:DSTAGE_RUN_E_0187
Message:
DataStage Job 369 Phantom 482
XSLT Warning: Source tree node: messaggio. (, line 21, column 109.)
XSLT Warning: Source tree node: messaggio. (, line 22, column 103.)
XSLT Warning: Source tree node: messaggio. (, line 23, column 146.)
XSLT Warning: Source tree node: messaggio. (, line 24, column 128.)
XSLT Warning: Source tree node: messaggio. (, line 25, column 134.)
XSLT Warning: Source tree node: messaggio. (, line 26, column 144.)
XSLT Warning: Source tree node: messaggio. (, line 27, column 117.)
XSLT Warning: Source tree node: messaggio. (, line 28, column 121.)
XSLT Warning: Source tree node: messaggio. (, line 29, column 216.)
XSLT Warning: Source tree node: messaggio. (, line 45, column 117.)
XSLT Warning: Source tree node: messaggio. (, line 46, column 87.)
XSLT Warning: Source tree node: protocolloInoltro. (, line 376, column 64.)
XSLT Warning: Source tree node: messaggio. (, line 21, column 109.)

Please can someone help me ? Thanks in advance !

Here is an extract of the XML file (I've inserted "." to preserve the alignement:

<?xml version="1.0" encoding="UTF-8"?>
<xsd:richiesteSgate xmlns:xsd="http://www.sgate.ancitel.it/xsd/">
...<xsd:messaggio>
......<xsd:protocolloInoltro>424361</xsd:protocolloInoltro>
......<xsd:richiesta><xsd:protocolloRichiesta>424360</xsd:protocolloRichiesta>
......<xsd:tipologiaDomanda>NUOVA</xsd:tipologiaDomanda>
......<xsd:clienteDomestico>
.........<xsd:codiceFiscaleClienteDomestico>NDRMLA73M51H211Z</xsd:codiceFiscaleClienteDomestico>
.........<xsd:nomeClienteDomestico>MAILA</xsd:nomeClienteDomestico>
.........<xsd:cognomeClienteDomestico>ANDREANI</xsd:cognomeClienteDomestico>
.........<xsd:componentiFamigliaAnagrafica>5</xsd:componentiFamigliaAnagrafica>
......</xsd:clienteDomestico>
......<xsd:fornitura>
.........<xsd:tipologiaFornitura>INDIVIDUALE</xsd:tipologiaFornitura>
.........<xsd:individuale>
............<xsd:pdrIndividuale>02490000159641</xsd:pdrIndividuale>
............<xsd:intestatarioFornituraIndividuale>
...............<xsd:codiceFiscaleClienteDomestico>NDRMLA73M51H211Z</xsd:codiceFiscaleClienteDomestico>
...............<xsd:nomeClienteDomestico>MAILA</xsd:nomeClienteDomestico>
...............<xsd:cognomeClienteDomestico>ANDREANI</xsd:cognomeClienteDomestico>
...............<xsd:componentiFamigliaAnagrafica>5</xsd:componentiFamigliaAnagrafica>
............</xsd:intestatarioFornituraIndividuale>
............<xsd:utilizzoFornituraIndividuale>
...............<xsd:AcquaCaldaSanitariaCotturaCibi>true</xsd:AcquaCaldaSanitariaCotturaCibi>
...............<xsd:Riscaldamento>true</xsd:Riscaldamento>
............</xsd:utilizzoFornituraIndividuale>
.........</xsd:individuale>
.........<xsd:indirizzoFornitura>
............<xsd:istatPdr>043043</xsd:istatPdr>
............<xsd:fasciaClimaticaPdr>D</xsd:fasciaClimaticaPdr>
............<xsd:capPdr>62018</xsd:capPdr>
............<xsd:indirizzoPdr>VIALE TRIESTE</xsd:indirizzoPdr>
............<xsd:civicoPdr>22</xsd:civicoPdr>
.........</xsd:indirizzoFornitura>
.........<xsd:pod>IT001E585736007</xsd:pod>
......</xsd:fornitura>
......<xsd:bonus>
.........<xsd:dataDisponibilita>2010-03-30</xsd:dataDisponibilita>
.........<xsd:dataPresentazione>2010-03-30</xsd:dataPresentazione>
.........<xsd:dataInizioAgevolazione>2010-05-01</xsd:dataInizioAgevolazione>
.........<xsd:dataFineAgevolazione>2011-04-30</xsd:dataFineAgevolazione>
.........<xsd:retro>true</xsd:retro>
......</xsd:bonus></xsd:richiesta>
...</xsd:messaggio>
...
...<xsd:messaggio><xsd:protocolloInoltro>425548
......</xsd:protocolloInoltro>

.....

</xsd:messaggio></xsd:richiesteSgate>
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Hard to say, except that it "looks" like it is doing validation and finding that you have an element that shouldn't be there.........(it's not known to the xsd). You may have an old xsd, or it's truly a bad element.

Right now it looks like it is a legitimate error. Get a copy of the xsd and search it for that exact element name, in the context where it is being used.

Also, are you checking the validation box?

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
ponzio
Participant
Posts: 165
Joined: Mon Dec 05, 2005 9:13 am
Location: Italy

Post by ponzio »

Hi Ernie.
To be honest I don't know XML very well so please sorry if I'm wrinting some silly things :oops:

Could you tell me more about the PATCH you mentioned in other post?

By the way ....
I'm not checking the validation box.
As I wrote I've removed the string "xsd:" at the beginning of every tag , and consequently in the data stgage metadata (column 'description in the XML Input Stage').
I did this to try to avoid the namespace problem of my datastage version. This is the real file I try to process:

<?xml version="1.0" encoding="UTF-8"?>
<richiesteSgate xmlns:xsd="http://www.sgate.ancitel.it/xsd/"><messaggio>
...<protocolloInoltro>424361</protocolloInoltro>
......<richiesta>
.........<protocolloRichiesta>424360</protocolloRichiesta>
etc etc

Is the xsd used the one reached by the link xmlns:xsd="http://www.sgate.ancitel.it/xsd/" :?: Am I right ?
Could it be a problem if from my datastage server is not possible to navigate to internet ?
Do you think is useful to post here the xsd file ?

The only field that doesn't cause the warning is the repetition element "protocolloInoltro".

Does exist a way to say to ignore the xsd ?

Thanks,
Andrea
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Hi Andrea...

I can't exactly say why it's checking the XSD if you don't have Validation checked, but the error seems like a "clean" one (meaning...it "is" comparing the incoming document to the xsd, and it doesn't like it).

If you have time, research it more. Get yourself a copy of that xsd. Open it in IE......open also your xml document in another tab. Look for that element name in your XML doc. Then look for it in your xsd. See if it exists. That might not be enough, because it could exist in a different context, but that's a start.

Then get on the web and look for sites that provide "xml validation" (there are tons of them). Most will provide an upload box where you can put your document and the xsd, and they will tell you if your document is truly valid according to its xsd.

The cheap way out of this, though, is to just "zap" the xsd right out of the header. You don't "need" it. If you have already removed all the namespaces, you might as well just remove the xsd declaration also. Just get rid of the whole thing xmlns:xsd ----- and also check to see if you have any SchemaLocation attributes and remove those too.

If you do that and it still fails, then we've been chasing a phantom, and maybe it's just a manifestation of early 8.0 problems with XML. Been too long to remember what patches to get you. You should call your support provider if you reach that conclusion.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
ponzio
Participant
Posts: 165
Joined: Mon Dec 05, 2005 9:13 am
Location: Italy

Post by ponzio »

Hi Ernie,
first of all thanks for your help ...
eostic wrote: Get yourself a copy of that xsd. Open it in IE......open also your xml document in another tab. Look for that element name in your XML doc. Then look for it in your xsd. See if it exists.
The xsd contains these lines (iit's not possible to open it in IE) :
.....................................................................
<?xml version="1.0" encoding="utf-8"?>
<!-- Created with Liquid XML Studio 1.0.8.0 (http://www.liquid-technologies.com) -->
<xs:schema xmlns:sgate="http://www.sgate.ancitel.it/xsd/" elementFormDefault="qualified" targetNamespace="http://www.sgate.ancitel.it/xsd/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:include schemaLocation="01_SGATEGAS_XSD_PRIMITIVI_v1.1.xsd" />
<xs:complexType name="tipoEsitoAgevolazione">
<xs:annotation>
<xs:documentation>
Esito della validazione della richiesta di agevolazione
effettuata dal distributore
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="protocolloInoltro" type="sgate:tipoProtocollo" />
<xs:element name="protocolloRichiesta" type="sgate:tipoProtocollo" />
etc ect ect
.....................................................................

it seems that I can find my elements in it ...
eostic wrote: Then get on the web and look for sites that provide "xml validation" (there are tons of them).
eostic wrote: The cheap way out of this, though, is to just "zap" the xsd right out of the header.
eostic wrote: If you do that and it still fails, then we've been chasing a phantom, and maybe it's just a manifestation of early 8.0 problems with XML. Been too long to remember what patches to get you. You should call your support provider if you reach that conclusion.
I'm going to do these 2 things as soon as possible.
You mentioned patch e117664 ... could it be helpful ?
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

My memory isn't that good. There were many patches, as the old threads will attest. But now that we're far beyond fix pack one, your best bet, imho, is to discuss this with support.
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

{0} indicates a zero byte - that is, 0x00. Maybe you can pre-process your XML stream to remove these.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ponzio
Participant
Posts: 165
Joined: Mon Dec 05, 2005 9:13 am
Location: Italy

Post by ponzio »

ray.wurlod wrote:{0} indicates a zero byte - that is, 0x00. Maybe you can pre-process your XML stream to remove these. ...
Hi Ray.
When you say "zero byte" what do you mean?
I pre-processed my file to remove the reference to xsd, i.e. the string "xsd:" in all the tags.
What kind of pre-processing you're suggesting to me ?

ponzio wrote:
eostic wrote: Then get on the web and look for sites that provide "xml validation" (there are tons of them).
eostic wrote: The cheap way out of this, though, is to just "zap" the xsd right out of the header.
I'm going to do these 2 things as soon as possible.
Ernie,
I've validated both my original document and the pre-processaed one .. They're valid !
I've also "zapped" the xsd right out of the header ...same warnigs
:(
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

As noted above, 8.0 with XML was in disarray. There were many patches. The {0} symptom is a classic. Search the forum...entries of a few years ago often mentioned this {0} thing. Call support. Clarify it and patch it. It's very likely that this is your problem, and they are the experts on how best to do that, and/or validating that this is really your issue.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Upgrade!
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply