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 » TDS Modelling: Min Occurrences = 0 vs. Length Constraints

Post new topic  Reply to topic
 TDS Modelling: Min Occurrences = 0 vs. Length Constraints « View previous topic :: View next topic » 
Author Message
jamesyu
PostPosted: Mon Apr 13, 2009 7:24 am    Post subject: TDS Modelling: Min Occurrences = 0 vs. Length Constraints Reply with quote

Acolyte

Joined: 31 Jan 2007
Posts: 70

I have turned on the validation on my MQOutput node to validate TDS output messages. I have a question in my TDS output message definition regarding how to set both min occurrs = 0 and the length constraints on one simple type field.

The field X is a simple type of xsd:string. I put the length constraints like min=8 and max=8 for this field. I also specified the min occurs to 0 since this field is optional.

But the parser complains. All what I am trying to tell the parser is, if this field X is present, make sure the length is always 8. If not present, please do not validate this field on the length.

Can this be modelled with TDS, meaning can I have both min occurrs = 0 and length constraints on one field?
Back to top
View user's profile Send private message
smdavies99
PostPosted: Mon Apr 13, 2009 7:37 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Quote:
But the parser complains.


How does it complain? Please let us know.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
jamesyu
PostPosted: Mon Apr 13, 2009 9:01 am    Post subject: Reply with quote

Acolyte

Joined: 31 Jan 2007
Posts: 70

smdavies99 wrote:
Quote:
But the parser complains.


How does it complain? Please let us know.


Oh, I forgot to check this Nillable for the field X. In the message definition file, if I specify Min Occurrs = 0 with a Length constraints on a specific numbe of bytes for the field X, I also need to check this Nillable. Then in ESQL, I also need to say SET X VALUE = NULL if the input is nothing.

Am I right?
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Apr 13, 2009 1:00 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Yes, it is possible. I suggest that you switch off validation until you get the correct message tree for all types of valid input. Then enable validation to check the length constraints ( you did know that TDS will not even look at the length constraints, or at any other facet? Those are for the validation engine only ).
If you need help with getting the correct message tree, then you need to supply a lot more detail about your input message style and how it can vary.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Apr 13, 2009 4:19 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

kimbert wrote:
Yes, it is possible.


OI!

You're on leave!

Take it!
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 » TDS Modelling: Min Occurrences = 0 vs. Length Constraints
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.