ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » not getting null value converting xml to Text1

Post new topic  Reply to topic
 not getting null value converting xml to Text1 « View previous topic :: View next topic » 
Author Message
warrior12
PostPosted: Thu Apr 12, 2012 10:00 pm    Post subject: not getting null value converting xml to Text1 Reply with quote

Newbie

Joined: 10 Apr 2012
Posts: 2

hi there,

i am converting XML msg to Text Delimited file output.
for this am using two message set one is xml and other is Text1.

1)even its xml message set we are selecting Domain as MRM.
so our mapping logic like:
SET OutputRoot.MRM = InputRoot.MRM;

-------------------
in op message set i m selecting
O/p Policy for missing element : useNullValue
then In Local element of nullable elemts:
Logical property : Nillable=true
Physical Property : Encoding Null=NullLiteralValue
Encoding Null Value= ''

------------------------------------------------
Sample message:

<XXXCode>CD</XXXCode>
<XXXName languageCode="EN">XXXName</XXXName>
<XXXDescription>XXXDescription</XXXDescription>
<XXXCategoryCode>token</XXXCategoryCode>
<XXXSystemCode>ISO</XXXSystemCode>
<EffectiveDate>2001-12-31</EffectiveDate>
<ExpiryDate>2001-12-31</ExpiryDate>
<Conversion>
<ConvertToXXXCode>GE</ConvertToXXXCode>
</Conversion>

in message definition i am having 3 elements in Conversion after ConvertToXXXCode but if remove it from the input message becuase its optional but then in op its not appending delimiter for that.
but if i remove any element in between then its appending ~ for that.

coming op : CD~XXXName~XXXDescription~~token~~ISO~~2001-12-31 ~2001-12-31~GE

expected op: CD~XXXName~XXXDescription~~token~~ISO~~2001-12-31 ~2001-12-31~GE~~

its giving problem only after last elements

can anyone please tell how i can get it.

Thanks.
Back to top
View user's profile Send private message
Esa
PostPosted: Fri Apr 13, 2012 12:14 am    Post subject: Re: not getting null value converting xml to Text1 Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

warrior12 wrote:

-------------------
in op message set i m selecting
O/p Policy for missing element : useNullValue
then In Local element of nullable elemts:
Logical property : Nillable=true
Physical Property : Encoding Null=NullLiteralValue
Encoding Null Value= ''


I may be wrong, but I am under the impression that for TDS messages these are applied for input messages only.

Code:
SET OutputRoot.MRM = InputRoot.MRM;
IF OutputRoot.MRM.SecondLastField IS NULL THEN
  SET OutputRoot.MRM.SecondLastField = '';
END IF;
IF OutputRoot.MRM.LastField IS NULL THEN
  SET OutputRoot.MRM.LastField = '';
END IF;
Back to top
View user's profile Send private message
McueMart
PostPosted: Fri Apr 13, 2012 12:18 am    Post subject: Reply with quote

Chevalier

Joined: 29 Nov 2011
Posts: 490
Location: UK...somewhere

Or could it be to do with this:

(See suppress absent element delimiter)

http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/index.jsp?topic=%2Fcom.ibm.etools.mft.doc%2Fad00812_.htm&resultof=%22suppress%22%20%22absent%22%20%22element%22%20%22delimiters%22%20%22delimit%22
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Apr 13, 2012 12:54 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
1)even its xml message set we are selecting Domain as MRM.
Please do not use the MRM parser for XML data. There is no good reason to do that. XMLNSC is the correct parser for XML data. You can just change your ESQL to
Code:
SET OutputRoot.MRM  = InputRoot.XMLNSC.(XMLNSC.Element)*[1];


Quote:
in op message set i m selecting
O/p Policy for missing element : useNullValue
...
Those settings do not control the output of elements that are missing from the message tree. They control how a NULL value gets written out.
Important question: does your message tree contain any NULL values? ( a Trace node will give you the answer ). If not, then those settings will have no effect at all on your output.

I suspect that McueMart is on the right lines here
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » not getting null value converting xml to Text1
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.