Author |
Message
|
redsherif56 |
Posted: Sun Feb 17, 2008 5:26 am Post subject: XML schema error |
|
|
Novice
Joined: 09 Feb 2008 Posts: 10
|
|
Back to top |
|
 |
redsherif56 |
Posted: Sun Feb 17, 2008 5:28 am Post subject: XML schema error |
|
|
Novice
Joined: 09 Feb 2008 Posts: 10
|
Hi all,
I'm using WMB v6.1 on WinXP platform along with WMQ v6.
I have a flow which is supposed to map 2 MSGSETs.
However, I seem to have a problem defining the test message, since the XML I send does not seem to match the structure the MSGSET is expecting.
I have generated the XML schema from my *.mxsd file:
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http :// www .w3.org/2001/XMLSchema">
<xsd:complexType name="Format">
<xsd:sequence>
<xsd:element name="DAY" type="xsd:string">
</xsd:element>
<xsd:element name="MONTH" type="xsd:string">
</xsd:element>
<xsd:element name="YEAR" type="xsd:string">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="EuropeanDate">
<xsd:sequence>
<xsd:element name="TYPE" type="xsd:string">
</xsd:element>
<xsd:element name="FORMAT" type="Format">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="DATE" type="EuropeanDate">
</xsd:element>
</xsd:schema>
The XML file I'm trying to parse and map is the following:
<DATE>
<TYPE>EUROPEAN</TYPE>
<FORMAT>
<DAY>12</DAY>
<MONTH>2</MONTH>
<YEAR>2008</YEAR>
</FORMAT>
</DATE>
Can you please help me understand what I'm doing wrong here?
Thanks ahead!! |
|
Back to top |
|
 |
kimbert |
Posted: Sun Feb 17, 2008 10:24 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
the XML I send does not seem to match the structure the MSGSET is expecting |
How do you know? Please quote ( in full ) any error messages you have seen. If they do not point you at the problem, please take a user trace - it will contain the full text of all parsing exceptions. |
|
Back to top |
|
 |
redsherif56 |
Posted: Tue Feb 19, 2008 1:07 am Post subject: |
|
|
Novice
Joined: 09 Feb 2008 Posts: 10
|
Using the Debugger tool, and selecting the "validate by content" within the mapping node, the following exception list was generated:
XML Writing Errors have occurred.
ParserException A schema validation error has occurred while validating the message tree .
Unexpected end element event. The content of element "NS1:DATE" is not complete.
thanks. |
|
Back to top |
|
 |
kimbert |
Posted: Tue Feb 19, 2008 2:50 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
You are probably building an invalid output message tree in the Mapping node.
- switch off validation in the Mapping node
- insert a Trace node after the Mapping node and set its pattern to ${Root}
You will probably find that something is missing from your output message tree. |
|
Back to top |
|
 |
redsherif56 |
Posted: Tue Feb 19, 2008 5:14 am Post subject: |
|
|
Novice
Joined: 09 Feb 2008 Posts: 10
|
I took your advise and used a trace node, and still my conclusion is the same as it was before:
I'm building the same message tree which i got as input.
What's strange is that only when I choose the LocalEnvironment option in the mapping mode within the mapping node properties, I can see the message tree (tough it remains unchanged).For any other option I choose, the message tree disappears.
Another thing is that after the message goes out of the mapping node, the message format changes from blank to "Binary1".
thanks again  |
|
Back to top |
|
 |
kimbert |
Posted: Tue Feb 19, 2008 5:56 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
I have no idea what you are doing in your flow. Where does the name 'Binary1' come from?
Best way to diagnose this is to use User Trace. ( The debugger is useful, but it should not be your only tool ).
- Change the Destination property of the Trace node to 'User Trace'
- start user trace
- put a message on the input queue
- read and format the user trace
- post the resulting trace output here |
|
Back to top |
|
 |
redsherif56 |
Posted: Tue Feb 19, 2008 7:47 am Post subject: |
|
|
Novice
Joined: 09 Feb 2008 Posts: 10
|
The User Trace Output I've received is:
Timestamps are formatted in local time, 120 minutes past GMT.
Trace written by version ; formatter version 6101
2008-02-19 17:38:09.164333 2640 UserTrace BIP2632I: Message received and propagated to 'out' terminal of MQ input node 'MFlow.MQInput'.
2008-02-19 17:38:09.164634 2640 UserTrace BIP6060I: Parser type ''Properties'' created on behalf of node 'MFlow.MQInput' to handle portion of incoming message
of length 0 bytes beginning at offset '0'.
2008-02-19 17:38:09.164678 2640 UserTrace BIP6061I: Parser type ''MQMD'' created on behalf of node 'MFlow.MQInput' to handle portion of incoming message of length
'364' bytes beginning at offset '0'. Parser type selected based on value ''MQHMD'' from previous parser.
2008-02-19 17:38:09.164774 2640 UserTrace BIP6061I: Parser type ''XMLNSC'' created on behalf of node 'MFlow.MQInput' to handle portion of incoming message of length
'122' bytes beginning at offset '364'. Parser type selected based on value ''XMLNSC'' from previous parser.
2008-02-19 17:38:09.165811 2640 UserTrace BIP4007I: Message propagated to 'out' terminal of node 'MFlow.Compute'.
2008-02-19 17:38:09.165872 2640 UserTrace BIP4241I: Message propagated to target Label node by RouteToLabel node 'MFlow.RouteToLabel'.
A RouteToLabel node has received a message and is propagating it to the appropriate Label node.
No user action required.
2008-02-19 17:38:09.165895 2640 UserTrace BIP4220I: Message propagated to out terminal from node 'MFlow.AmericanDate'.
A label node has received a message and is propagating it to any nodes connected to its out terminal.
No user action required.
2008-02-19 17:38:09.182568 2640 UserTrace BIP4007I: Message propagated to 'out' terminal of node 'MFlow.Convert_to_EuropeanDate.ComIbmCompute'.
2008-02-19 17:38:09.182980 2640 UserTrace BIP2638I: The MQ output node 'MFlow.MQOutput' attempted to write a message to queue ''MQ_RESPONSE'' connected to queue
manager ''''. The MQCC was '0' and the MQRC was '0'.
2008-02-19 17:38:09.183008 2640 UserTrace BIP2622I: Message successfully output by output node 'MFlow.MQOutput' to queue ''MQ_RESPONSE'' on queue manager ''''.
2008-02-19 17:38:09.183162 2640 UserTrace BIP4007I: Message propagated to 'out' terminal of node 'MFlow.Database'.
Threads encountered in this trace:
2640
Everything seems ok' but at least you can get the general idea of my flow.
Thanks. |
|
Back to top |
|
 |
kimbert |
Posted: Tue Feb 19, 2008 9:01 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
OK - thanks for the info.
I'm assuming that you have installed FP1.
I cannot diagnose your problem unless I see the Trace node output. That's why I told you to change the Destination property of the Trace node to 'User Trace'.
And you didn't answer my question about 'Binary1'. |
|
Back to top |
|
 |
|