Author |
Message
|
jboller001 |
Posted: Thu Jun 15, 2006 2:34 pm Post subject: MRM XML Validation Error Using Validate Node in WMB 6.0 |
|
|
 Apprentice
Joined: 31 May 2006 Posts: 40
|
I've defined an XML message set and when I attempt to validate it using the Validate node I receive an error if an element is null. The following scenarios cause the validation to fail:
<Element/>
<Element></Element>
<Element> </Element>
This results in the following excepiton details:
(0x01000000):ParserException = (
(0x03000000):File = 'F:\build\S600_P\src\MTI\MTIforBroker\MtiImbParser2\MtiImbTreeIterator.cpp'
(0x03000000):Line = 1337
(0x03000000):Function = 'MtiImbTreeIteratorImpl::fetchData'
(0x03000000):Type = ''
(0x03000000):Name = ''
(0x03000000):Label = ''
(0x03000000):Catalog = 'BIPv600'
(0x03000000):Severity = 3
(0x03000000):Number = 5341
(0x03000000):Text = 'Syntax Error: Unknown or Invalide Type found in Tree.'
I've tried checking the nillable attribute of the field and have played with the Encoding Numeric Null and Encoding Non-Numeric Null attributes of the message set and have had no luck. Any suggestions would be greatly appreciated. |
|
Back to top |
|
 |
juddg |
Posted: Fri Jun 16, 2006 1:56 am Post subject: Clarification |
|
|
Apprentice
Joined: 22 Nov 2004 Posts: 33
|
Hi,
This error is returned when attempting to serialize the message tree to the output rather than parsing an input message. Please can you clarify the nodes in your flow and ESQL and mappings that you are using. Also is the element that is null defined (modelled) within the message set that you have created or is it self-defining.
Regards,
juddg. |
|
Back to top |
|
 |
jboller001 |
Posted: Fri Jun 16, 2006 4:23 am Post subject: |
|
|
 Apprentice
Joined: 31 May 2006 Posts: 40
|
Incoming message is manipulated using a java compute node which is then passed to the Validate node. The element that is null is defined in the message definition file and has a minOccurs = 0. |
|
Back to top |
|
 |
juddg |
Posted: Fri Jun 16, 2006 6:01 am Post subject: Further clarification |
|
|
Apprentice
Joined: 22 Nov 2004 Posts: 33
|
Hi,
When you say that you manipulate the incoming message do you create a new output message based on the values in the input message? It appears that the element in the tree has an unrecognised type when it reaches the validation node. Please can post the java code that you are using to manipulate this element.
Regards,
juddg. |
|
Back to top |
|
 |
jboller001 |
Posted: Fri Jun 16, 2006 6:17 am Post subject: |
|
|
 Apprentice
Joined: 31 May 2006 Posts: 40
|
I really don't manipulate the message. I have a message set with a payload defined as anyType. The java compute node extracts the payload and the subsequent validate node attempts to validate it. My input message is an Envelope MRM and the payload represents an independent MRM structure. Here's the code:
MbMessage outMessage = new MbMessage();
MbMessageAssembly outAssembly = new MbMessageAssembly(contact admin,
outMessage);
MbElement inputBody = inMessage.getRootElement().getLastChild();
List payload = (List)inputBody.evaluateXPath("/OTDAPayload/*");
MbElement payloadElement = (MbElement)payload.get(0);
MbElement outRoot = outMessage.getRootElement();
MbElement outBody = outRoot.createElementAsLastChild("MRM");
outBody.copyElementTree(payloadElement);
This works fine as long as the XML elements are not null. |
|
Back to top |
|
 |
jboller001 |
Posted: Fri Jun 16, 2006 9:16 am Post subject: |
|
|
 Apprentice
Joined: 31 May 2006 Posts: 40
|
I get the same results when I replace the Validate node with the following Java call:
outBody.toBitstream(messageSetType, messageSetId, messageSetFormat, 0,0,0);
I'm beginning to believe that this may be a bug with the MRM parser. |
|
Back to top |
|
 |
juddg |
Posted: Fri Jun 16, 2006 9:34 am Post subject: Reproducible |
|
|
Apprentice
Joined: 22 Nov 2004 Posts: 33
|
Hi,
I can reproduce te problem using either a java compute node or an ESQL compute node. However if I don't copy across the empty element from the input to the output but create it in the output with value NULL it doesn't fail.
I need to to do a bit more investigation next week.
Thanks for supplying the additional information.
Regards,
juddg. |
|
Back to top |
|
 |
juddg |
Posted: Mon Jun 19, 2006 5:08 am Post subject: Please log a service call |
|
|
Apprentice
Joined: 22 Nov 2004 Posts: 33
|
Hi,
Please can you raise a service call with IBM for this problem quoting this post. The problem is specific to an empty element that is parsed as self-defining on input but is then subsequently matched with an element in a message set.
Regards,
juddg. |
|
Back to top |
|
 |
jboller001 |
Posted: Wed Jun 21, 2006 9:59 am Post subject: |
|
|
 Apprentice
Joined: 31 May 2006 Posts: 40
|
We're going to create an IBM PMR.
Thanks for your help, |
|
Back to top |
|
 |
frikkieo |
Posted: Wed Jul 05, 2006 12:36 am Post subject: |
|
|
Novice
Joined: 16 Jul 2004 Posts: 13 Location: South Africa
|
Have you managed to get this problem sorted as I am experiencing the same on an ESQL compute node? |
|
Back to top |
|
 |
kimbert |
Posted: Wed Jul 05, 2006 1:19 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
I am experiencing the same |
First, make sure that it really is the same problem. If you are getting this error:
Quote: |
'Syntax Error: Unknown or Invalide Type found in Tree.' |
...then it is probably the same problem. |
|
Back to top |
|
 |
francoisvdm |
Posted: Wed Jul 05, 2006 1:24 am Post subject: |
|
|
Partisan
Joined: 09 Aug 2001 Posts: 332
|
I'm getting this same problem in V6, same error message, same input as you. Was this resolved? I'm using MB V6 _________________ If you do not know the answer or you get the urge to answer with "RTFM" or "Search better in this forum", please refrain from doing so, just move on to the next question. Much appreciated.
Francois van der Merwe |
|
Back to top |
|
 |
moogoo |
Posted: Wed Jul 05, 2006 5:42 am Post subject: |
|
|
Acolyte
Joined: 20 Sep 2002 Posts: 54 Location: US
|
Are you sure the "Element" tag in your sample XML message is in the same location as what's described in your message set? I was having similar errors and discovered that my sample data was faulty.
MG |
|
Back to top |
|
 |
francoisvdm |
Posted: Wed Jul 05, 2006 5:48 am Post subject: |
|
|
Partisan
Joined: 09 Aug 2001 Posts: 332
|
yeah, my test data is 100% the same. I solved my problem by going to XMLNS domain just before I write it out to queue. Before that I like MRM to do mapping in mapping node from web services input to SAP Idoc. _________________ If you do not know the answer or you get the urge to answer with "RTFM" or "Search better in this forum", please refrain from doing so, just move on to the next question. Much appreciated.
Francois van der Merwe |
|
Back to top |
|
 |
kimbert |
Posted: Wed Jul 05, 2006 5:54 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
Before that I like MRM to do mapping in mapping node from web services input to SAP Idoc. |
Please note: You can still use the mapper when using the XMLNSC domain. Just go to the message set properties and set 'Runtime parser' to 'XMLNSC'. The mapper will see this property and will generate mapping code for the XMLNSC domain instead of the MRM domain. |
|
Back to top |
|
 |
|