Author |
Message
|
sksharma |
Posted: Tue Jul 08, 2008 10:43 pm Post subject: Out put message is 0 |
|
|
 Apprentice
Joined: 18 Apr 2008 Posts: 28
|
I am trying to convert an XML to a pipe '|' delimited format, i am using two message set one for input XML and one for output TDS, and output will be of different order from the XML
ie for example
...
<customerinfo>
<firstname>Mohan</firstname>
<lastname>Kumar</lastname>
<address>16 lane, west</address>
<cusomerid>12345</customerid>
</customerinfo>
if we use SET OutputRoot = InputRoot; i am getting the output in the same order as XML
but i need to reorder the output and the out put should be as following
12345|Mohan|Kumar|16 lane, west
to acheieve this i used following in the esql
SET OutputRoot.MRM.customerinfo.ID = InputBody.customerinfo.customerid;
SET OutputRoot.MRM.customerinfo.FName = InputBody.customerinfo.firstname;
SET OutputRoot.MRM.customerinfo.LName = InputBody.customerinfo.lastname;
SET OutputRoot.MRM.customerinfo.address = InputBody.customerinfo.address;
then i am getting the data length as 0 and nothing under message data.
i also tried using the single message set with two different physical formats, but still i got the 0.
please let me know how where i am going wrong and how to procedd with this conversion
thanks in advance.
reagrds
Sk  |
|
Back to top |
|
 |
kimbert |
Posted: Wed Jul 09, 2008 12:24 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
sksharma,
What have you tried so far? Any errors in the system log /event viewer? What platform? Which version of the product?
Please take a user trace ( debug level ) and post any errors or warnings that you see in the trace. |
|
Back to top |
|
 |
sksharma |
Posted: Wed Jul 09, 2008 12:56 am Post subject: |
|
|
 Apprentice
Joined: 18 Apr 2008 Posts: 28
|
Hi,
i didnt see any errors either in event log and system log the flow is runnig successfuly, i used trace node to see the properties being set, the trace gives the logical data, i am able to see the output in the debug mode but it is not beeing written in to the queue.
ther are no error in the trace also..
i am using MB 6.0
please  |
|
Back to top |
|
 |
smdavies99 |
Posted: Wed Jul 09, 2008 1:22 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
What is in the Properties Folder?
This may be important to solving your problem
As Kimbert says, the output from a trace of ${Root} would be very useful _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
MrSmith |
Posted: Wed Jul 09, 2008 1:31 am Post subject: |
|
|
 Master
Joined: 20 Mar 2008 Posts: 215
|
Well as a guess unless its just a typo on the forum here that your example message would fail in parsing for a start as you havbe a tag which begins
and ends
and is therefore missing the "t" in the first tag for customer. If you fail your incoming parse why would it generate an outgoing one, have you got your failure terminal connected to check parsing has suceeded, as stated previously a more detailed explanantion of the setup would be good with product info and a trace log.
Just my 2p worth |
|
Back to top |
|
 |
kimbert |
Posted: Wed Jul 09, 2008 1:40 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
i am able to see the output in the debug mode but it is not being written in to the queue |
Take a debug-level user trace and read it carefully. You should already have done that, but if not, do it now. |
|
Back to top |
|
 |
sksharma |
Posted: Wed Jul 09, 2008 2:09 am Post subject: |
|
|
 Apprentice
Joined: 18 Apr 2008 Posts: 28
|
sorry its just a typo error i have taken all the care in the actual sample.
please find the below trace
(
(0x01000000):Properties = (
(0x03000000):MessageSet = 'A6F19AG002001'
(0x03000000):MessageType = 'Menu'
(0x03000000):MessageFormat = 'TDS'
(0x03000000):Encoding = 273
(0x03000000):CodedCharSetId = 819
(0x03000000):Transactional = TRUE
(0x03000000):Persistence = FALSE
(0x03000000):CreationTime = GMTTIMESTAMP '2008-07-09 09:59:20.340'
(0x03000000):ExpirationTime = -1
(0x03000000):Priority = 0
(0x03000000):ReplyIdentifier = X'000000000000000000000000000000000000000000000000'
(0x03000000):ReplyProtocol = 'MQ'
(0x03000000):Topic = NULL
(0x03000000):ContentType = ''
)
(0x01000000):MQMD = (
(0x03000000):SourceQueue = 'INPUTXML'
(0x03000000):Transactional = TRUE
(0x03000000):Encoding = 273
(0x03000000):CodedCharSetId = 819
(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'414d512042524b514d20202020202020460e6e4820369302'
(0x03000000):CorrelId = X'000000000000000000000000000000000000000000000000'
(0x03000000):BackoutCount = 0
(0x03000000):ReplyToQ = ' '
(0x03000000):ReplyToQMgr = 'BRKQM '
(0x03000000):UserIdentifier = 'MUSR_MQADMIN'
(0x03000000):AccountingToken = X'160105150000004d64492eca06555b07e53b2bef03000000000000000000000b'
(0x03000000):ApplIdentityData = ' '
(0x03000000):PutApplType = 28
(0x03000000):PutApplName = 'Websphere MQ Client for Java'
(0x03000000):PutDate = DATE '2008-07-09'
(0x03000000):PutTime = GMTTIME '09:59:20.340'
(0x03000000):ApplOriginData = ' '
(0x03000000):GroupId = X'000000000000000000000000000000000000000000000000'
(0x03000000):MsgSeqNumber = 1
(0x03000000):Offset = 0
(0x03000000):MsgFlags = 0
(0x03000000):OriginalLength = -1
)
FOLLOWED BY MESSAGE.
but the same is not being populateed into the queue. |
|
Back to top |
|
 |
MrSmith |
Posted: Wed Jul 09, 2008 3:03 am Post subject: |
|
|
 Master
Joined: 20 Mar 2008 Posts: 215
|
sksharma
This shows the Properties and the MQMD of the trace, which altho useful does not show the structure of the message body (your incoming XML). If the message body is not beeing shown in the trace, either because you have not got it running in the right debug level or because it is not being produced, the if former correct and re-run the trace if latter then the parser has not worked hence it can not output the message body hence your initial problem. |
|
Back to top |
|
 |
kimbert |
Posted: Wed Jul 09, 2008 4:12 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Hi sksharma,
Thanks for posting the Trace node output - but that is not what I asked for.
You need to take a user trace. If you don't know how to do that, please follow these steps. Use them whenever you need to diagnose a problem with a message flow.
1. mqsichangetrace BrokerName -e ExecGroupName -u -r -l debug
2. mqsireadlog BrokerName -e ExecGroupName -u -f -o temporaryFileName
3. mqsiformatlog -i temporaryFileName -o userTrace.txt
Then read the contents of userTrace.txt carefully.
The above is for Windows, but I'm sure you can adapt it for Unix if necessary. |
|
Back to top |
|
 |
sksharma |
Posted: Thu Jul 10, 2008 1:03 am Post subject: |
|
|
 Apprentice
Joined: 18 Apr 2008 Posts: 28
|
The user trace is as follows and i didnt see any errors as such
Timestamps are formatted in local time, 330 minutes past GMT.
Trace written by version 6000; formatter version 6000
2008-07-09 20:26:07.999613 4748 UserTrace BIP4040I: The Execution Group ''Order_Transformation'' has processed a configuration message successfully.
A configuration message has been processed successfully. Any configuration changes have been made and stored persistently.
No user action required.
2008-07-09 20:26:07.999613 4748 UserTrace BIP2638I: The MQ output node 'ConfigurationMessageFlow.outputNode' attempted to write a message to queue ''SYSTEM.BROKER.EXECUTIONGROUP.REPLY'' connected to queue manager ''BRKQM''. The MQCC was '0' and the MQRC was '0'.
2008-07-09 20:26:07.999613 4748 UserTrace BIP2622I: Message successfully output by output node 'ConfigurationMessageFlow.outputNode' to queue ''SYSTEM.BROKER.EXECUTIONGROUP.REPLY'' on queue manager ''BRKQM''.
Threads encountered in this trace:
4748
tell me how to proceed further |
|
Back to top |
|
 |
smdavies99 |
Posted: Thu Jul 10, 2008 3:18 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
The steps suggested by kimbert might be slightly (IMHO) confusing and I think you might be as well judgng by the trace output you supplied.
The steps should be
1. mqsichangetrace BrokerName -e ExecGroupName -u -r -l debug
2. Send you message and let the flow process it
3. mqsichangetrace BrokerName -e ExecGroupName -u -l none
4. mqsireadlog BrokerName -e ExecGroupName -u -f -o temporaryFileName
5. mqsiformatlog -i temporaryFileName -o userTrace.txt
This way the tracing operation is stopped before you read the trace log file. If other messages are processed by that EG while tracing is still active (-l debug) understanding the trace file output can be difficult.
I normally create a special Execution Group during development where I deploy any flows I need to get trace output from. I then know that the trace output will contain trace records only for the flow(s) that I want to be traced and not from any other activity that might happen in the EG where the flows are normally deployed.
The steps outlined above can easily be scripted into two shell scripts to save time. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
sksharma |
Posted: Thu Jul 10, 2008 8:17 am Post subject: |
|
|
 Apprentice
Joined: 18 Apr 2008 Posts: 28
|
smdavies
thanks you very much for the detail..
the user trace is giving successful transformation but while writing it to the queue i am seening some warning below is the sample.
2008-07-10 17:33:00.064856 4672 UserTrace BIP4007I: Message propagated to 'out' terminal of node 'Order_Transformation_Flow.Compute1'.
2008-07-10 17:33:00.777876 4672 UserTrace BIP5605W: ***WARNING*** Open or open-defined elemenet ''TSOrder'' has occurred inside a type or group of Data Element separation ''ALL ELEMENTS DELIMITED''.
This Data Element Separation type cannot contain open or open-defined elements.
The data has been discarded, and the message will be written without it.
Confirm that the element matches that in the model, and that it is correctly described in the flow.
2008-07-10 17:33:00.778029 4672 UserTrace BIP5605W: ***WARNING*** Open or open-defined elemenet ''TSOrder'' has occurred inside a type or group of Data Element separation ''ALL ELEMENTS DELIMITED''.
This Data Element Separation type cannot contain open or open-defined elements.
The data has been discarded, and the message will be written without it.
Confirm that the element matches that in the model, and that it is correctly described in the flow.
2008-07-10 17:33:00.778356 4672 UserTrace BIP5605W: ***WARNING*** Open or open-defined elemenet ''TSOrder'' has occurred inside a type or group of Data Element separation ''ALL ELEMENTS DELIMITED''.
This Data Element Separation type cannot contain open or open-defined elements.
The data has been discarded, and the message will be written without it.
please help in understanding this.
i am using ALL Elements Delimited and mentioning | as dilimiter, should i set it to some thing else? - i also tried setting it to "Tagged Delimited" and i got the out put but the tag is also coming in the output which is not required.
please bring me out of this, please help |
|
Back to top |
|
 |
kimbert |
Posted: Thu Jul 10, 2008 1:15 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Hmmm. I can't help observing that user trace has finally allowed you to diagnose the problem... . All readers of this thread please take note : user trace is provided for a good reason!
BIP5605W is telling you that your message tree does not match up with your message definition. Although it is reported as a warning, in *your* message flow it is a serious problem which you need to fix.
Next step is to find out where the mismatch is. You have two choices:
a) Compare the Trace node output with the message definition. Start at the root of the message definition, and check that the name and namespace match with the root element of the message body. Then do the same for every other element in the message tree until you find the difference.
b) Or, read the user trace , looking for the BIP5564 messages which tell you how the MRM parser matched the tree against the message definition. As soon as you see the string 'SELF-DEFINING' in the path you know that the parser could not match that tree element against the message definition. |
|
Back to top |
|
 |
|