|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
WBIMB 5.0.6 - Strange XML validation behaviour |
« View previous topic :: View next topic » |
Author |
Message
|
DAS |
Posted: Tue Dec 13, 2005 3:39 am Post subject: WBIMB 5.0.6 - Strange XML validation behaviour |
|
|
Apprentice
Joined: 15 Aug 2005 Posts: 30
|
I have developed a very simple message-flow that transforms one input XML message to another XML message.
Now for the MQInput node and the Compute node I am using the same XSD with a single difference --> the targetNamespace differs
Now if I am not mistaken, a mandatory element of the type string (as defined in http://www.w3.org/2001/XMLSchema) may contain an empty string, when the restrictions are loose (for example, only a maxLen restriction)
Example: <studentName></studentName> or the equivalent <studentName/> rendered differently is valid (assuming studentName is a string
I have experienced this not to be completely true when running messages with empty values through the mentioned message flow. When I am feeding the flow with a message that completely complies to the MRM (yes, I have namespaces enabled on both of my message sets (for input and output)) I get the following error in my trace:
Code: |
ParserException BIP5354E: MTI internal error: diagnostic information 'An element should contain a valid value exists on the tree without a value' |
This is an Exception that occurs when WRITING the logical tree to a physical XML message on a queue, so this does not happen at the Input node. As an addendum I must mention the fact I am not using any validation or whatsoever, but even when I am....the same error comes into play.
What makes this even more strange to me is the fact that this the problem does not arise, when I change the target namespace in my input message, into the namespace of the output message. That really puzzles me.
I can imagine that the problem sounds strange, but maybe someone recognizes this? I have tried alot of things already, like changing the encoding logical and numerical null properties...no result.
Thanks in advance! |
|
Back to top |
|
 |
wooda |
Posted: Tue Dec 13, 2005 5:12 am Post subject: |
|
|
 Master
Joined: 21 Nov 2003 Posts: 265 Location: UK
|
Trace your logical tree before writing. Post it here.
The error indicates you have a malformed tree.
If the element has an empty string value it should appear in the the tree with value "" alternatively you can have a value of null in combination with null handling options. |
|
Back to top |
|
 |
DAS |
Posted: Sat Dec 17, 2005 7:48 am Post subject: |
|
|
Apprentice
Joined: 15 Aug 2005 Posts: 30
|
Thanks for your response.
I know now that my problem is a v5 flaw (one among way too many flaws in v5), so I will just wait until v6 will be rolled in and hope that the problem is fixed. |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun Dec 18, 2005 10:12 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Completely normal and as designed:
By your own accord you have a min length of x
and your value is null.
your min value in fact is <StudentName> </StudentName>
If I read your spec right null is not acceptable but blank(spaces) is.
As such the value would need to be spaces if not otherwise specified....
Enjoy  |
|
Back to top |
|
 |
DAS |
Posted: Mon Dec 19, 2005 5:14 am Post subject: |
|
|
Apprentice
Joined: 15 Aug 2005 Posts: 30
|
That's not true, as x can be 0 too (no minLength defined!). When I validate my XML against the XSD, it is in fact valid, only the broker disallows it. So <StudentName></StudentName> is in fact perfectly legal. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|