Page 1 of 1

Error when loading XML

Posted: Fri Jun 27, 2008 2:12 am
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

Posted: Fri Jun 27, 2008 4:44 am
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

Posted: Fri Jun 27, 2008 5:46 am
by ArndW
We just installed the "namespace" patch (Which also addresses end-of-wave issues) and it works like a charm.

Posted: Sun Jun 29, 2008 9:27 pm
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 ?

Posted: Mon Jun 30, 2008 6:23 am
by eostic
That fixpack may be a good idea for other reasons, but no...for this namespace issue you need a specific patch.

Ernie

patch

Posted: Tue Jul 29, 2008 1:40 am
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

Posted: Tue Jul 29, 2008 6:07 am
by eostic
"if" it's the same namespace issue, it's a patch whose number is e117664.

Ernie