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 » NULL elements with the attribute xsi:nil="true"

Post new topic  Reply to topic
 NULL elements with the attribute xsi:nil="true" « View previous topic :: View next topic » 
Author Message
Dhiren
PostPosted: Mon May 05, 2008 1:59 am    Post subject: NULL elements with the attribute xsi:nil="true" Reply with quote

Novice

Joined: 27 Jan 2005
Posts: 17

Hello,

I'm having trouble handling NULL elements with attribute xsi:nil="true". The input message set has the 'Nillable' property checked and the .msgset file has the 'Encoding non-Numeric Null' set to "NULLXMLSchema". Inspite of this I get a parseNext error on a date field.
Came across the foll troubleshooting link.. Identical problem scenario and set-up exactly as mentioned in here.. still no Luck..
http://www-1.ibm.com/support/docview.wss?rs=849&context=SSKM8N&dc=DB520&dc=DB560&uid=swg21289387&loc=en_US&cs=UTF-8&lang=en&rss=ct849websphere


Using MB v6.0.2
sample Input XML
.....<paymentAmount>70.81</paymentAmount>
<companyCode>0001</companyCode>
dueDate xsi:null='true'/>
<recoveryType/> .......

Am I missing anything ? Tips/ideas/ wil be greatly appreciated
Thanks.
Back to top
View user's profile Send private message Yahoo Messenger
Gaya3
PostPosted: Mon May 05, 2008 2:30 am    Post subject: Reply with quote

Jedi

Joined: 12 Sep 2006
Posts: 2493
Location: Boston, US

did you read this

http://www.mqseries.net/phpBB2/viewtopic.php?t=21165


Regards
gayathri
_________________
Regards
Gayathri
-----------------------------------------------
Do Something Before you Die
Back to top
View user's profile Send private message
Dhiren
PostPosted: Mon May 05, 2008 3:29 pm    Post subject: Reply with quote

Novice

Joined: 27 Jan 2005
Posts: 17

Gyathri,

Thanks for the reply. Yes, I did see that... First off it was a MB v5 soln, and moreoever I could not find the "namespace flag" on the message set..
Back to top
View user's profile Send private message Yahoo Messenger
kimbert
PostPosted: Tue May 06, 2008 1:06 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

It's xsi:nil, not xsi:null.
Back to top
View user's profile Send private message
dmx0t1
PostPosted: Sun Nov 23, 2008 8:28 pm    Post subject: Reply with quote

Apprentice

Joined: 23 Nov 2008
Posts: 27

any one have any idea how to output xsi:nil="true"?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sun Nov 23, 2008 9:07 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

dmx0t1 wrote:
any one have any idea how to output xsi:nil="true"?


With the MRM parser set the element/attribute VALUE = NULL and make sure the message set is configured correctly.

With the XMLNS/XMLNSC parsers use the correct type and namespaces:

SET ns:myelement.xsi:nil TYPE = (XML.Attribute|XMLNSC.Attribute);
SET ns:myelement.xsi:nill = 'true';

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
dmx0t1
PostPosted: Mon Nov 24, 2008 12:55 am    Post subject: Reply with quote

Apprentice

Joined: 23 Nov 2008
Posts: 27

fjb_saper wrote:

...

SET ns:myelement.xsi:nil TYPE = (XML.Attribute|XMLNSC.Attribute);
SET ns:myelement.xsi:nill = 'true';

Have fun


Thanks fjb_saper for the reply, but I've only been able to achieve <StartKeyValue xsi:nil="true"></StartKeyValue>, how can I get <StartKeyValue xsi:nil="true" /> instead?
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Nov 24, 2008 1:47 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

dmx0t1: which domain are you using?

I hope everybody realises that
Code:
SET ns:myelement.xsi:nil TYPE = (XML.Attribute|XMLNSC.Attribute);
is not valid ESQL. What fjb_saper means is that you should use XML.Attribute with the XMLNS domain, or XMLNSC.Attribute with the XMLNSC domain.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Nov 24, 2008 4:01 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

dmx0t1 wrote:
fjb_saper wrote:

...

SET ns:myelement.xsi:nil TYPE = (XML.Attribute|XMLNSC.Attribute);
SET ns:myelement.xsi:nill = 'true';

Have fun


Thanks fjb_saper for the reply, but I've only been able to achieve <StartKeyValue xsi:nil="true"></StartKeyValue>, how can I get <StartKeyValue xsi:nil="true" /> instead?


XML is not for human eyes but to be parsed by a processor. As such there is no difference between
<StartKeyValue xsi:nil="true"></StartKeyValue>
and
<StartKeyValue xsi:nil="true" />

Not quite true... the first line while specifying the nil value would allow for children nodes/elements to be inserted between opening and closing tags (there just happen to be none) while the second form specifies at the same time that no children nodes are allowed.

A good parser however should not make any difference between the two.


_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Mon Nov 24, 2008 4:23 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
he first line while specifying the nil value would allow for children nodes/elements to be inserted between opening and closing tags (there just happen to be none) while the second form specifies at the same time that no children nodes are allowed.
I am being very pedantic now, but that statement is not true (although it makes no difference to the subject of this thread). If an element has xsi:nil="true" then it *must* be empty. And there really is no difference at all between <a/> and <a></a>.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Nov 24, 2008 4:27 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

kimbert wrote:
Quote:
he first line while specifying the nil value would allow for children nodes/elements to be inserted between opening and closing tags (there just happen to be none) while the second form specifies at the same time that no children nodes are allowed.
I am being very pedantic now, but that statement is not true (although it makes no difference to the subject of this thread). If an element has xsi:nil="true" then it *must* be empty. And there really is no difference at all between <a/> and <a></a>.


Thanks for the correction Kimbert. I learn everyday from you
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
dmx0t1
PostPosted: Mon Nov 24, 2008 9:58 pm    Post subject: Reply with quote

Apprentice

Joined: 23 Nov 2008
Posts: 27

To kimbert : i am using XMLNSC domain

kimbert wrote:
dmx0t1: which domain are you using?

I hope everybody realises that
Code:
SET ns:myelement.xsi:nil TYPE = (XML.Attribute|XMLNSC.Attribute);
is not valid ESQL. What fjb_saper means is that you should use XML.Attribute with the XMLNS domain, or XMLNSC.Attribute with the XMLNSC domain.


this what i did:

Code:

DECLARE xsi Namespace 'http://www.w3.org/2001/XMLSchema-instance';
SET OutputRoot.XMLNSC.Request.RequestHeader.FromKey.(XMLNSC.Attribute)xsi:nil = 'true';


and the output turned out to be <FromKey xsi:nil="true"></FromKey>, though i am hoping broker can kill the closing tag and make it <FromKey xsi:nil="true" />
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Nov 25, 2008 3:57 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

I get
Code:
<FromKey xsi:nil="true" />
on my v6.1.0.2 broker.
Are you on the latest fix pack?
Back to top
View user's profile Send private message
dmx0t1
PostPosted: Tue Nov 25, 2008 7:14 pm    Post subject: Reply with quote

Apprentice

Joined: 23 Nov 2008
Posts: 27

i am running version 6.1.0.1...will try 6.1.0.2
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 » NULL elements with the attribute xsi:nil="true"
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.