Author |
Message
|
2d0 |
Posted: Thu Feb 14, 2008 1:15 am Post subject: WBIMB 5.0 MRM Idoc output not correct |
|
|
 Apprentice
Joined: 08 Mar 2007 Posts: 25
|
Hi,
I have an issue with a translation that translates txt to Idoc XML.
The problem is with size definitions within the Idoc segments.
Right now it generates:
<idoc segment> (For example e2edp101)
<size>1</size>
.....
</idoc segment>
While it should generate:
<idoc segment size="1">
......
</idoc segment>
In the debugger it shows the structure correctly before processing:
idoc segment
- size = 1
Strange thing is that this works for a segment within a segment, <idoc segment><idoc segment2 size"1">
It doesn't work for all the segments directly under cwdata.
I tried several statements in ESQL, but I can't get it working.
After a while I tried it with a RCD and a compute node after the translation and was able to fix it using the compute node.
However the msd of the MQRFH2 header is reset to 'none' which generates errors in the MySAP adapater.
Thanks. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Feb 14, 2008 1:28 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Check where the size is not an attribute whether the definition in the message set identifies it as attribute...
Make sure you are not missing some maintenance pack.
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
2d0 |
Posted: Thu Feb 14, 2008 1:34 am Post subject: |
|
|
 Apprentice
Joined: 08 Mar 2007 Posts: 25
|
Forgot to mention that the Idoc MRM is generated using the SAP adapter.
Size is an attribute (xsd:positiveInteger).
It isn't different compared to other flows we use here, which are working fine with this structure, but somehow it won't work for this particular flow.  |
|
Back to top |
|
 |
kimbert |
Posted: Thu Feb 14, 2008 1:43 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Your message tree does not match the message definition. In MRM language, Size is being treated as a 'self-defining' element. Self-defining elements are always serialized as an XML tag.
If you were using v6 you could take a user trace and look for the warnings about self-defining elements. In v5 the best way to detect self-defining elements is to temporarily enable validation in the message flow ( on the output node, in your case ). You should get a validation exception, and it will name some higher-level structure ( parent/grandparent of Size ) which is self-defining.
Hopefully the mismatch will be obvious at that point. If not, you will need to carefully compare a trace of your message tree against the message model, field by field, namespace by namespace, name by name, until you find the mismatch. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Feb 14, 2008 1:43 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
2d0 wrote: |
Forgot to mention that the Idoc MRM is generated using the SAP adapter.
Size is an attribute (xsd:positiveInteger).
It isn't different compared to other flows we use here, which are working fine with this structure, but somehow it won't work for this particular flow.  |
PMR time _________________ MQ & Broker admin |
|
Back to top |
|
 |
2d0 |
Posted: Thu Feb 14, 2008 2:20 am Post subject: |
|
|
 Apprentice
Joined: 08 Mar 2007 Posts: 25
|
|
Back to top |
|
 |
kimbert |
Posted: Thu Feb 14, 2008 3:49 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
You have a missing opening quote at column 42.
Code: |
"OutputRoot"."MRM".ns1:"Data_record".ns3:"sap_orders04_cwdata".ns3:"sap_orders04_e2edk03".size = 1;
^ |
|
|
Back to top |
|
 |
2d0 |
Posted: Thu Feb 14, 2008 4:31 am Post subject: |
|
|
 Apprentice
Joined: 08 Mar 2007 Posts: 25
|
Apologies, that was a typo.
The code is correct in the ESQL.
Whatever I try, it keeps giving the same error.
Can it be related with the namespaces?
The error indicates a wrong namespace, cwdata:e2edk03 instead of cwdata:cwdata.
Or how can I correct this? |
|
Back to top |
|
 |
kimbert |
Posted: Thu Feb 14, 2008 4:54 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
Can it be related with the namespaces? |
It is definitely related to the incorrect namespace. All names and namespaces must match the model.
Quote: |
The error indicates a wrong namespace, cwdata:e2edk03 instead of cwdata:cwdata.
Or how can I correct this? |
You may have declared ns3 incorrectly in your ESQL. But you didn't post that, so I'm guessing. |
|
Back to top |
|
 |
2d0 |
Posted: Thu Feb 14, 2008 5:07 am Post subject: |
|
|
 Apprentice
Joined: 08 Mar 2007 Posts: 25
|
That's what I also thought. A false declaration of ns3.
DECLARE ns3 NAMESPACE 'http://www.ibm.com/websphere/crossworlds/BOSchema/sap_orders04_cwdata';
So that doesn't seem the problem. Other namespaces match the model as well, no visual typos there. The ESQL is built like the other flows, so nothing strange there either.
Somehow it won't match the MRM output to the messageset correctly.
Any other ideas? |
|
Back to top |
|
 |
kimbert |
Posted: Thu Feb 14, 2008 6:49 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
- Insert a Trace node and trace ${Root}
- Open the message definition in the Message Definition Editor
- Find the parent element identified in the error message
- Find the corresponding element in the trace output
- Match the child nodes in the tree against the child elements in the message definition
Could take a while, but there is no other way to diagnose this. |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Feb 14, 2008 6:51 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Remember that the order that elements appear in may influence this as well.
*may*. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Feb 14, 2008 7:05 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
jefflowrey wrote: |
Remember that the order that elements appear in may influence this as well.
*may*. |
Not may but will. I would suggest he also enlists the help of somebody from the SAP IDOC team just to make sure his segments are at the right level and conform to the design of the IDOC. Remember that child segments are always the last elements in a parent segment...
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
2d0 |
Posted: Fri Feb 15, 2008 1:14 am Post subject: |
|
|
 Apprentice
Joined: 08 Mar 2007 Posts: 25
|
First of all, thanks you all for the great help.
However it is still not solved. I have a trace output and it seems to match the messageset.
Every field looks fine to me and the output is the same regarding the structure to another working flow.
Seems like a messageset issue, since it is complaining about sap_orders04_cwdata:sap_orders04_e2edk03.
The Idoc itself is generated by the MySAP adapter and other flows are working with this Idoc as well. Only this flow is having problems.
Error message in eventviewer
Last edited by 2d0 on Mon Feb 18, 2008 1:42 am; edited 1 time in total |
|
Back to top |
|
 |
kimbert |
Posted: Fri Feb 15, 2008 2:04 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
I think the following two elements in the message tree have the wrong namespace:
Quote: |
(0x01000000)http://www.ibm.com/websphere/crossworlds/2002/BOSchema/sap_orders04_cwdata:sap_orders04_e2edk03 = (
(0x03000000):size = 1
(0x01000000)http://www.ibm.com/websphere/crossworlds/2002/BOSchema/sap_orders04_e2edk03:sap_orders04_e2edk03 = ( |
Looking ( squinting ) at the message definition, I think the namespace should be the same as for 'Data_record'. So it should be http://www.ibm.com/websphere/crossworlds/2002/BOSchema/sap_orders04
Please check the message definition again. |
|
Back to top |
|
 |
|