Author |
Message
|
Valarouthu Ravikumar |
Posted: Mon Jan 28, 2008 9:59 am Post subject: TDS to XML using mapping node |
|
|
Newbie
Joined: 28 Jan 2008 Posts: 9
|
Hi,
I got an issue while iam working with TDS input file.The input file is having multiple delimiters like this
abc*def@ghi#kln$red.
I can able to do with single delimiter but while iam using multiple delimiters iam not getting the pure XML output.
This is my msg file:
inputnode---->mapping node---->outputnode
So anybody can help me. |
|
Back to top |
|
 |
kimbert |
Posted: Tue Jan 29, 2008 2:17 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Hi there,
Parsing problems are very hard to describe - I'm afraid your description leaves a lot to the imagination! Please post some example input messages. For each input message, please describe the message tree you would like to obtain.
And don't even think about the output XML message yet - solve the parsing problem first. |
|
Back to top |
|
 |
Valarouthu Ravikumar |
Posted: Tue Jan 29, 2008 9:34 am Post subject: |
|
|
Newbie
Joined: 28 Jan 2008 Posts: 9
|
hi
This is my
sample input data:
---------------------
ABC123* ORR900* 10/20/2005#Ramarao#Detroit# 31173&Shekhar& Lansing, Ramji, WA@ 00IK90@ 56*ABC* 67889$XYZ$ WA
message tree:
----------------
<?xml version="1.0"?>
<SamplePurchaseOrder>
<PurchaseOrderNumber>ABC123</PurchaseOrderNumber>
<CustomerNumber> ORR900</CustomerNumber>
<Date> 10/20/2005</Date>
<CustomerInfo>
<Name>Ramarao</Name>
<Address> Detroit</Address>
<Phone> 31173</Phone>
</CustomerInfo>
<BillTo>
<Name>Shekhar</Name>
<Address> Lansing</Address>
</BillTo>
<Shipto>
<Name>Ramji</Name>
<Address> WA</Address>
</Shipto>
<OrderInfo>
<ItemNo> 00IK90</ItemNo>
<Quantity> 56</Quantity>
</OrderInfo>
<PurchasingContact>
<Name>ABC</Name>
<Phone> 67889</Phone>
</PurchasingContact>
<TechnicalContact>
<Name>XYZ</Name>
<Address> WA</Address>
</TechnicalContact>
</SamplePurchaseOrder> |
|
Back to top |
|
 |
kimbert |
Posted: Wed Jan 30, 2008 5:12 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Next time please put your XML in [code] tags to preserve the indentation. That takes up your time, not mine
Quote: |
I can able to do with single delimiter but while iam using multiple delimiters iam not getting the pure XML output. |
This is very straightforward. Just set the Group Indicator and the Delimiter to the appropriate value for each inner structure ( CustomerInfo, BillTo etc ). |
|
Back to top |
|
 |
Valarouthu Ravikumar |
Posted: Wed Jan 30, 2008 1:09 pm Post subject: |
|
|
Newbie
Joined: 28 Jan 2008 Posts: 9
|
Hi,
iam trying like this but iam not able to get the output.
My Sample input is
{Ramarao#Detroit}:{Shekhar&Lansing}:{Ramji,WA}:{00IK90,56}:{ABC*6788}
iam set the properties in the TDS complextype as shown in the below:-->
-------------------------------------------------------------------
1)Data element separation:-> All elements delimited
-------------------------------
2)Group Indicator :-> {
-------------------------
3)Group Teriminator :-> }
-------------------------
4)delemiter :-> *
-------------------------
for SAMPLEPURCHASEORDER.Similarly i set the properties to all remaining complextype elements(BILLTO,SHIPTO,ORDERINFO,PURCHASINGCONTACT,TECHNICALCONTACT)with different delimiters.i mentioned the DataSeparator in the properties of Messageset. |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Jan 30, 2008 1:28 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
When trying to debug TDS, I always find it useful to try and create a new message with my model, and compare that against the input message I'm trying to parse.
So try to construct a new message based on your model, that has the data you expect to see. Then see what TDS does when it outputs the message. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
kimbert |
Posted: Thu Jan 31, 2008 1:21 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
iam trying like this but iam not able to get the output. |
That is not a good problem description, Are you getting a parsing exception? Are you getting any output at all? What do you see if you put a Trace node after the input node? |
|
Back to top |
|
 |
Valarouthu Ravikumar |
Posted: Thu Jan 31, 2008 9:28 am Post subject: |
|
|
Newbie
Joined: 28 Jan 2008 Posts: 9
|
Hi
When iam trying to put the input in Mqinput node i got this exception at the MRM parser.
MRM-->ImbRecoverableException caught from worker->parseNext. |
|
Back to top |
|
 |
kimbert |
Posted: Thu Jan 31, 2008 3:04 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Please take a user trace - that message is one of at least 3 error messages which describe the problem. Please post the full text of the BIP messages from the user trace, |
|
Back to top |
|
 |
Valarouthu Ravikumar |
Posted: Fri Feb 01, 2008 7:17 am Post subject: |
|
|
Newbie
Joined: 28 Jan 2008 Posts: 9
|
<?xml version="1.0" encoding="UTF-8" ?><UserTraceLog uuid="UserTraceLog" userTraceLevel="none" traceLevel="none"
userTraceFilter="none" traceFilter="none" fileSize="4194304" bufferSize="0" fileMode="safe"><UserTrace timestamp='2008-02-02
00:36:16.631946' thread='4272' function='ImbTraceNode::writeToLog' type='ComIbmTraceNode'
name='TDS_XML_MSGFLOW#FCMComposite_1_5' label='TDS_XML_MSGFLOW.Trace' text=''Application trace output from
TraceNode'' catalog='BIPv600' number='4060' file='F:\build\S000_P\src\DataFlowEngine\ImbTraceNode.cpp'
line='451'><Insert type='string'>'(
(0x01000000):Properties = (
(0x03000000):MessageSet = 'KJQ5MJC002001'
(0x03000000):MessageType = 'SAMPLEPURCHASEORDER'
(0x03000000):MessageFormat = 'TDS1'
(0x03000000):Encoding = 546
(0x03000000):CodedCharSetId = 437
(0x03000000):Transactional = TRUE
(0x03000000):Persistence = FALSE
(0x03000000):CreationTime = GMTTIMESTAMP '2008-02-02 00:36:05.670'
(0x03000000):ExpirationTime = -1
(0x03000000):Priority = 0
(0x03000000):ReplyIdentifier = X'000000000000000000000000000000000000000000000000'
(0x03000000):ReplyProtocol = 'MQ'
(0x03000000):Topic = NULL
(0x03000000):ContentType = ''
)
(0x01000000):MQMD = (
(0x03000000):SourceQueue = 'in'
(0x03000000):Transactional = TRUE
(0x03000000):Encoding = 546
(0x03000000):CodedCharSetId = 437
(0x03000000):Format = ' '
(0x03000000):Version = 2
(0x03000000):Report = 0
(0x03000000):MsgType = 8
(0x03000000):Expiry = -1
(0x03000000):Feedback = 0
(0x03000000):Priority = 0
(0x03000000):Persistence = 0
(0x03000000):MsgId = X'414d51205742524b365f44454641554cffb2a34720006304'
(0x03000000):CorrelId = X'000000000000000000000000000000000000000000000000'
(0x03000000):BackoutCount = 0
(0x03000000):ReplyToQ = ' '
(0x03000000):ReplyToQMgr = 'WBRK6_DEFAULT_QUEUE_MANAGER '
(0x03000000):UserIdentifier = 'miracle '
(0x03000000):AccountingToken = X'16010515000000dde8e41c37da950f43170a32e903000000000000000000000b'
(0x03000000):ApplIdentityData = ' '
(0x03000000):PutApplType = 11
(0x03000000):PutApplName = 'D:\MyData\rfhutil.exe '
(0x03000000):PutDate = DATE '2008-02-02'
(0x03000000):PutTime = GMTTIME '00:36:05.670'
(0x03000000):ApplOriginData = ' '
(0x03000000):GroupId = X'000000000000000000000000000000000000000000000000'
(0x03000000):MsgSeqNumber = 1
(0x03000000):Offset = 0
(0x03000000):MsgFlags = 0
(0x03000000):OriginalLength = -1
)
(0x0100001B):MRM = (
(0x0300000B):ORDERNO = '1'
(0x0300000B):ORDERNAME = 'Material'
(0x0300000B):POINFORMATION = 'Vzg'
)
)
'</Insert><Insert type='string'>TDS_XML_MSGFLOW.Trace</Insert></UserTrace><UserTrace timestamp='2008-02-02
01:40:33.998474' thread='4272' function='ImbTraceNode::writeToLog' type='ComIbmTraceNode'
name='TDS_XML_MSGFLOW#FCMComposite_1_5' label='TDS_XML_MSGFLOW.Trace' text=''Application trace output from
TraceNode'' catalog='BIPv600' number='4060' file='F:\build\S000_P\src\DataFlowEngine\ImbTraceNode.cpp'
line='451'><Insert type='string'>'(
(0x01000000):Properties = (
(0x03000000):MessageSet = 'KJQ5MJC002001'
(0x03000000):MessageType = 'SAMPLEPURCHASEORDER'
(0x03000000):MessageFormat = 'TDS1'
(0x03000000):Encoding = 546
(0x03000000):CodedCharSetId = 437
(0x03000000):Transactional = TRUE
(0x03000000):Persistence = FALSE
(0x03000000):CreationTime = GMTTIMESTAMP '2008-02-02 01:40:30.700'
(0x03000000):ExpirationTime = -1
(0x03000000):Priority = 0
(0x03000000):ReplyIdentifier = X'000000000000000000000000000000000000000000000000'
(0x03000000):ReplyProtocol = 'MQ'
(0x03000000):Topic = NULL
(0x03000000):ContentType = ''
)
(0x01000000):MQMD = (
(0x03000000):SourceQueue = 'in'
(0x03000000):Transactional = TRUE
(0x03000000):Encoding = 546
(0x03000000):CodedCharSetId = 437
(0x03000000):Format = ' '
(0x03000000):Version = 2
(0x03000000):Report = 0
(0x03000000):MsgType = 8
(0x03000000):Expiry = -1
(0x03000000):Feedback = 0
(0x03000000):Priority = 0
(0x03000000):Persistence = 0
(0x03000000):MsgId = X'414d51205742524b365f44454641554cffb2a34720006307'
(0x03000000):CorrelId = X'000000000000000000000000000000000000000000000000'
(0x03000000):BackoutCount = 0
(0x03000000):ReplyToQ = ' '
(0x03000000):ReplyToQMgr = 'WBRK6_DEFAULT_QUEUE_MANAGER '
(0x03000000):UserIdentifier = 'miracle '
(0x03000000):AccountingToken = X'16010515000000dde8e41c37da950f43170a32e903000000000000000000000b'
(0x03000000):ApplIdentityData = ' '
(0x03000000):PutApplType = 11
(0x03000000):PutApplName = 'D:\MyData\rfhutil.exe '
(0x03000000):PutDate = DATE '2008-02-02'
(0x03000000):PutTime = GMTTIME '01:40:30.700'
(0x03000000):ApplOriginData = ' '
(0x03000000):GroupId = X'000000000000000000000000000000000000000000000000'
(0x03000000):MsgSeqNumber = 1
(0x03000000):Offset = 0
(0x03000000):MsgFlags = 0
(0x03000000):OriginalLength = -1
)
(0x0100001B):MRM = (
(0x0300000B):ORDERNO = '1'
(0x0300000B):ORDERNAME = 'Material'
(0x0300000B):POINFORMATION = 'Vzg'
)
)
'</Insert><Insert type='string'>TDS_XML_MSGFLOW.Trace</Insert></UserTrace></UserTraceLog> |
|
Back to top |
|
 |
kimbert |
Posted: Fri Feb 01, 2008 2:59 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
So...where are the exceptions? You said you were getting ImbRecoverableException?? |
|
Back to top |
|
 |
Valarouthu Ravikumar |
Posted: Mon Feb 04, 2008 11:13 am Post subject: |
|
|
Newbie
Joined: 28 Jan 2008 Posts: 9
|
Hi Kimbert,
Sorry for distrub you once again. Iam having a problem in the message definition that is when iam trying to parse the message the parser is identifing only local elements of root element samplepurchaseorder but it is unable to identify the complextype of the root element.It means the parser delimites the only local elements of the root element for single delimiter.It's not working for the multiple delimiters and also iam having a problem regarding the Recoverable exception.i.e iam getting the exception before the trace node it showing in the debug prespective. |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Feb 04, 2008 12:08 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You need to use the information in the Exceptions - the same information that you haven't given here - to determine how to fix your problem. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
kimbert |
Posted: Mon Feb 04, 2008 2:26 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Earlier in this thread, I said
Quote: |
Please take a user trace - that message is one of at least 3 error messages which describe the problem. Please post the full text of the BIP messages from the user trace, |
Please
- enable user trace ( and use the -r option to reset the trace )
- put your message through the message flow
- read and format the trace
- Look through the trace output and read all of the exceptions - there will be more than one. |
|
Back to top |
|
 |
|