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 » Value Constraints/Length Constraints not wrkg 4 xsd:string

Post new topic  Reply to topic
 Value Constraints/Length Constraints not wrkg 4 xsd:string « View previous topic :: View next topic » 
Author Message
Rodeo
PostPosted: Wed Oct 03, 2007 8:49 pm    Post subject: Value Constraints/Length Constraints not wrkg 4 xsd:string Reply with quote

Apprentice

Joined: 11 Apr 2007
Posts: 30

I imported an XML schema for one of my message definitions. The physical format is XML and for one of the XML elements, the value is xsd:string type. In the value constraints/Length constraints, I have set the Max to 4. However, when a value with length >4 shows up in this element, it is not being truncated and the full length element is showing up in the output XML (based on message definition). What could be causing this issue? Am I missing something that I should be setting anywhere else?

Any thoughts/suggestions?
Back to top
View user's profile Send private message
AkankshA
PostPosted: Wed Oct 03, 2007 8:54 pm    Post subject: Reply with quote

Grand Master

Joined: 12 Jan 2006
Posts: 1494
Location: Singapore

this shall help

http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r0m0/index.jsp?topic=/com.ibm.etools.mft.doc/ad10470_.htm
_________________
Cheers
Back to top
View user's profile Send private message Visit poster's website
Rodeo
PostPosted: Wed Oct 03, 2007 9:19 pm    Post subject: Reply with quote

Apprentice

Joined: 11 Apr 2007
Posts: 30

Thanks for the link and I am pasting the info from that link on value constraints below.

My point/concern however is that though I set the xsd:string type to length 4, why is the element still allowing values of length greater than 4?

Am I trying to use xsd:string in an illegal way as mentioned in:

Length constraints are inherited from ancestor types, and any length constraints defined for a simple type must not relax the constraints imposed by any of its ancestor types. For example, it would be illegal to derive a type 'longString' (Max Length=100) from a type 'shortString' (Max Length=10).

Elements in the XML that show up before this element are also of the xsd:string type and I set the max length to different values for those elements. Could that be causing the issue?


Length Constraints : Length, Min Length, Max Length
Using length constraints, the length of all elements based on the simple type can be constrained or even limited to a single value.
Length constraints can be applied to simple types which are derived from xsd:hexBinary, xsd:base64Binary or xsd:string (including built in schema types such as xsd:normalisedString).

Length constraints are inherited from ancestor types, and any length constraints defined for a simple type must not relax the constraints imposed by any of its ancestor types. For example, it would be illegal to derive a type 'longString' (Max Length=100) from a type 'shortString' (Max Length=10).
Note: For WebSphere Message Broker by default, Length value constraints are converted to Max Length constraints when a message set is added to a BAR file. This avoids WebSphere Message Broker raising spurious validation errors for fixed-length data structures, where the strings tend to be padded to fit a fixed-width field. If strict length validation is required, this default can be changed in the message set properties by changing the flag Broker treats Length facet as MaxLength.
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Oct 04, 2007 12:42 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Enable validation on your input node ( or Compute node, or Output node, as required ).
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 » Value Constraints/Length Constraints not wrkg 4 xsd:string
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.