Error when loading XML

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
norhidayat
Participant
Posts: 2
Joined: Tue May 13, 2008 12:40 am
Location: indonesia

Error when loading XML

Post by norhidayat »

I had Problem when try loading data from xml to hashed file

Error Message
The name '{0}' is not a valid NCName.
expression = '/:getcddistResponse/:getcddistResult/:ZBAPITXXPRCDDIST' Remaining tokens are: ('/')



My Structure Data at Hashed table
MANDT Decimal /ns1:getcddistResponse/ns1:getcddistResult/ns1:ZBAPITXXPRCDDIST/MANDT/text()
BUKRS Varchar(255) /ns1:getcddistResponse/ns1:getcddistResult/ns1:ZBAPITXXPRCDDIST/BUKRS/text()
DIST_CODE Decimal /ns1:getcddistResponse/ns1:getcddistResult/ns1:ZBAPITXXPRCDDIST/DIST_CODE/text()
DIST_DESC Varchar(255) /ns1:getcddistResponse/ns1:getcddistResult/ns1:ZBAPITXXPRCDDIST/DIST_DESC/text()
WERKS Varchar(255) /ns1:getcddistResponse/ns1:getcddistResult/ns1:ZBAPITXXPRCDDIST/WERKS/text()

and My XML

<getcddistResponse xmlns="http://tempuri.org/PerfRptWs/Service1">
<getcddistResult>
<ZBAPITXXPRCDDIST>
<MANDT xmlns="">300</MANDT>
<BUKRS xmlns="">D012</BUKRS>
<DIST_CODE xmlns="">01</DIST_CODE>
<DIST_DESC xmlns="">OFFICE 2</DIST_DESC>
<WERKS xmlns=""/>
</ZBAPITXXPRCDDIST>
<ZBAPITXXPRCDDIST>
<MANDT xmlns="">310</MANDT>
<BUKRS xmlns="">D012</BUKRS>
<DIST_CODE xmlns="">02</DIST_CODE>
<DIST_DESC xmlns="">OFFICE 1</DIST_DESC>
<WERKS xmlns=""/>
</ZBAPITXXPRCDDIST>
</getcddistResult>
</getcddistResponse>


How do i fix this problem
thx

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

Post by eostic »

Looks like it's an issue for 8.x that was corrected awhile back. There is a patch for this, and it usually relates to namespaces. Contact whoever provides your support. It's a pretty clear symptom. In "most" cases, to continue with your development in the meantime, you should be able to read a test document successfully if you remove all the namespace details (all the xmlns="http//....." and prefixes on the elements).

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

We just installed the "namespace" patch (Which also addresses end-of-wave issues) and it works like a charm.
norhidayat
Participant
Posts: 2
Joined: Tue May 13, 2008 12:40 am
Location: indonesia

Post by norhidayat »

eostic wrote:Looks like it's an issue for 8.x that was corrected awhile back. There is a patch for this, and it usually relates to namespaces. Contact whoever provides your support. It's a pretty clear symptom. In "most" cases, to continue with your development in the meantime, you should be able to read a test document successfully if you remove all the namespace details (all the xmlns="http//....." and prefixes on the elements).

Ernie
Thank's Ernie, After I remove the namespace details and it's work.
My current Datastage is 8.0.
if i want to add namespace in the xml, do i need to update the fix pack 8.0.1 ?
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

That fixpack may be a good idea for other reasons, but no...for this namespace issue you need a specific patch.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
jtsoong
Participant
Posts: 29
Joined: Mon Oct 22, 2007 11:52 pm

patch

Post by jtsoong »

Hi guys,

I too am having this problem but can't seem to find which patch needs to be installed?

I was wondering if anyone had a link to it? I tried searching the APAR's etc but to no avail :(

(Or do i have to contact IBM support for the patch, would it not be listed?)


Cheers and thanks

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

Post by eostic »

"if" it's the same namespace issue, it's a patch whose number is e117664.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
Post Reply