Author |
Message
|
nmahesh4mb |
Posted: Wed Dec 05, 2012 8:19 am Post subject: Transforming the input message to output |
|
|
Novice
Joined: 25 May 2012 Posts: 23
|
Hi I am Receiving message from SAP adapter in dataobject parser I want to create this in pipe delimited format, using the message set is best idea or any way to do using the code itself
output needs like "CUSTOMER_ID|
Custome_Name|
Please giveme any suggestions
thanks and
Regards
Mahesh |
|
Back to top |
|
 |
lancelotlinc |
Posted: Wed Dec 05, 2012 8:22 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
|
Back to top |
|
 |
kimbert |
Posted: Wed Dec 05, 2012 8:23 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
If on v6/v7 use the MRM domain with a TDS format
If on V8, use the DFDL domain |
|
Back to top |
|
 |
nmahesh4mb |
Posted: Wed Dec 05, 2012 8:58 am Post subject: |
|
|
Novice
Joined: 25 May 2012 Posts: 23
|
Thanks for your Valuable reply..
you mean to say without message set it's not possible, using the esql code? |
|
Back to top |
|
 |
kimbert |
Posted: Wed Dec 05, 2012 8:59 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
I did not say that. I was quoting best practice. |
|
Back to top |
|
 |
nmahesh4mb |
Posted: Thu Dec 06, 2012 12:03 am Post subject: |
|
|
Novice
Joined: 25 May 2012 Posts: 23
|
Hi I have created the TDS message set and I have written the code for to change the properties in logical tree structure, and after that while copying the input tree to output it's giving an error stating that unresolved path you're giving. code is as follows please check If any Mistakes I have done
SET OutputRoot.Properties.MessageFormat = 'Text_CSV';
SET OutputRoot.Properties.MessageSet = 'GU5GT2K002001';
SET OutputRoot.Properties.MessageType = 'Root';
CREATE LASTCHILD OF OutputRoot DOMAIN ('MRM');
SET OutputRoot.MRM.Root.Body.Name = InputRoot.XMLNSC.Input.Name;
it's showing at MRM path only.. |
|
Back to top |
|
 |
kimbert |
Posted: Thu Dec 06, 2012 1:10 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
t's giving an error stating that unresolved path you're giving |
I do not understand that sentence. I suspect that nobody else does either.
If you want help, please take the time to quote the error message carefully and accurately. |
|
Back to top |
|
 |
nmahesh4mb |
Posted: Fri Dec 07, 2012 1:15 am Post subject: About CSV format message headers |
|
|
Novice
Joined: 25 May 2012 Posts: 23
|
Hi I'm creating the CSV message set and it's almost done, I'm geting the output in the output I want the headers also
now the output is showing like this
6089|9000001555|2012-11-08|0010266133
6089|9000001557|2012-11-12|0010000244
6089|9000001558|2012-11-13|0011290733
6089|9000001559|2012-11-13|0011290739
but my requirements is to display headers also
C_no|PhoneNo|date|servicerequest
6089|9000001555|2012-11-08|0010266133
6089|9000001557|2012-11-12|0010000244
6089|9000001558|2012-11-13|0011290733
6089|9000001559|2012-11-13|0011290739
the above mentioned is headers which I have created in message set please let me know any option is there to enable header in output message
Thanks in advance |
|
Back to top |
|
 |
kimbert |
Posted: Fri Dec 07, 2012 2:13 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
the above mentioned is headers which I have created in message set please let me know any option is there to enable header in output message |
You have not created any 'headers' in the message set. You have created elements in a message definition file.
If OutputRoot.MRM does not contain the headers then they will not be output. |
|
Back to top |
|
 |
nmahesh4mb |
Posted: Fri Dec 07, 2012 2:38 am Post subject: |
|
|
Novice
Joined: 25 May 2012 Posts: 23
|
what is the option to choose to create headers? please hint me.. |
|
Back to top |
|
 |
kimbert |
Posted: Fri Dec 07, 2012 3:05 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Here's the hint:
Quote: |
If OutputRoot.MRM does not contain the headers then they will not be output. |
|
|
Back to top |
|
 |
nmahesh4mb |
Posted: Fri Dec 07, 2012 3:12 am Post subject: |
|
|
Novice
Joined: 25 May 2012 Posts: 23
|
thanks for your input, It's throwing an error if i write with header like
SET OutputRoot.MRM.CSV_Message.SAPOutput
here CSV_Message is the header and sapoutput is the root tag, this is what I'm writing the code it's trowing error as unresolved path, if I use without CSV_Message it's not throwing exception and I'm getting the output with out header...
any thing wrong going in this plese let me know |
|
Back to top |
|
 |
kimbert |
Posted: Fri Dec 07, 2012 3:36 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
OK - some tips for you:
1. This line can be removed:
Code: |
CREATE LASTCHILD OF OutputRoot DOMAIN ('MRM'); |
You do not need to create the parser for the OutputRoot message tree - WMB will do that automatically, based on the name of node ( 'MRM' in your case ).
2. This line is probably incorrect:
Code: |
SET OutputRoot.MRM.Root.Body.Name = InputRoot.XMLNSC.Input.Name; |
The MRM message tree never contains the root element. Don't ask why - it just doesn't. So it probably should be
Code: |
SET OutputRoot.MRM.Body.Name = InputRoot.XMLNSC.Input.Name; |
Quote: |
if I use without CSV_Message it's not throwing exception and I'm getting the output with out header... |
So 2. explains why your code stops throwing an exception. I do not know why the output does not contain your 'headers'. You would need to describe your message model and post the output from a Trace node. But please do not do that yet - you can debug this yourself using Trace nodes and user trace ( mqsichangetrace, mqsireadlog, mqsiformatlog ). Let me know if you want help with getting the trace. |
|
Back to top |
|
 |
nmahesh4mb |
Posted: Fri Dec 07, 2012 4:47 am Post subject: |
|
|
Novice
Joined: 25 May 2012 Posts: 23
|
Hi thanks for the input, I have tried the code what you have suggested and I have created the message set in CSV format details are
Message: OutCsv
Under this : Heads
Name, Age are elements
I have wrote the code as Outputroot.OutCsv.heads.name = inputroot;
it's showing the error as unresolvable path, even I have deployed it and it's not giving the headers in output message
please correct me if any wrong in code.. |
|
Back to top |
|
 |
kimbert |
Posted: Fri Dec 07, 2012 4:58 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
Hi thanks for the input |
Well, I'm glad you appreciated it. But you don't seem to have *followed* it
I suggest that you re-read what I said, and try out my suggestions. |
|
Back to top |
|
 |
|