Content conversion in Sender JMS channel
Hello All,
My scenario is JMS to Proxy. SAP PI receives a flat file from JMS application.
Can any one please help us on converting flat file to XML conversion within sender JMS adapter
Thanks&Regards,
Moorthy
Hi
Check this
conversion type StructPlain2XML
conversion type SimplePlain2XML
Similar Messages
-
Content conversion in Sender JMS Adapter
Hi,
Scenario is file to IDoc
My source file is ' ; ' separated file coming from MQ via JMS adapter. now I need to convert this to XI.
Source DT looks like
Root
HEADER (Occurance 1)
Field 1
ISOCURCD
TRANKODE
IDENTIFIER
DATO
TIME
DETAIL(Occurance 1 to unbounded)
ISOCURCD
TRANKODE
EFFDATE
COMMDATE
DKKVAL1
USDVAL1
TRAILER(Occurance 1)
ISOCURCD
TRANKODE
TRANCOUNT
According to How to use content conversion in JMS guide from SDN i have configured the content conversion parameters in the module of JMS sender adapter.
In the processing sequence given the module name as localejbs/AF_Modules/MessageTransformBean and module Key as Plain2XML.
And in module configuration
Parameter Name Parameter Value
Transform.Class com.sap.aii.messaging.adapter.Conversion
Transform.ContentType text/xml;charset=utf-8
xml.keyFieldName TRANKODE
xml.keyFieldType CaseSensitiveString
xml.recordsetName Root
xml.documentName MT_ROOT
xml.documentNamespace http://XXX.XXX.XX/xi/XXXXX
xml.processFieldNames fromConfiguration
xml.conversionType StructPlain2XML
xml.recordsetStructure HEADER,1,DETAIL,*,TRAILER,1
xml.HEADER.fieldNames Field1,ISOCURCD,TRANKODE,IDENTIFIER,DATO,TIME
xml.HEADER.fieldSeparator ";"
xml.HEADER.keyFieldValue H
xml.fieldSeparator ";"(if i don't use this then the file is not being picked and getting an error in the CC monitoring of RWB saying xml.field separator missing.)
Similarily for Detail and Trailer records as well.
But when I run the scenario, the file is being picked up but I am not getting any payload into the inbound message.
Can you please help me where I have configured wrongly. And one more thing will this configuration help for ; separated file .
Thanks & Regards,
Kumar
Edited by: Kumar on Dec 19, 2007 11:11 AM
Edited by: Kumar on Dec 19, 2007 11:15 AMHI,
Have you gone through the below pdf i think it will help to find ur mistake.
How to use conversion modules in JMS - https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f02d12a7-0201-0010-5780-8bfc7d12f891
Thnx
Chiarg -
Content conversion in Sender JMS adapter-document
Hi,
I am tring to read fixed length flat file from MQ-series Queue using JMS adapter.
I want to use content converstion to convert the flat file to XML.
I am not able to open the PDF link provided in SDN.
if anyone has a copy of the pdf document on JMS content conversion, could you please enmil it to me
at [email protected]
Edited by: ashok sri on May 27, 2008 5:25 PMplease go through the document
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/50061bd9-e56e-2910-3495-c5faa652b710 -
Content Conversion for Sending Communication Channel using File Protocol
I have a file as follows:
CUSC,CRCA,OBAL,DATE
10197,0111,15250094.05,20071008
10758,0111,8131440.17,20071008
12939,0111,8212006.53,20071008
13129,0111,6953749.77,20071008
13331,0111,8607294.15,20071008
13579,0111,11972774.95,20071008
13676,0111,6636698.47,20071008
What is the content conversion that I can proceed with so that I can go with the mapping. I have to use File Adapter?
Please HelpHi,
Check below links for Content conversion.
/people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
/people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
/people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter
/people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
/people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
/people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30
/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
/people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter
/people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns
/people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem
/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter
/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm
Regards,
Phani
Reward points if Helpful -
Regarding file content conversion in Sender File channel
Hi all,
In one of my requirement, one file contains several details records as given below,
101,india,1001,albert,517193
101,india,1002,hilbert,517193
101,india,1003,robert,517193
102,nepal,1004,kiran,9234334
102,nepal,1008,kiran,9234334
102,nepal,1003,kiran,9234334
103,nepal,1004,kiran,9234334
103,nepal,1008,kiran,9234334
103,nepal,1003,kiran,9234334
i want to send all the records which starts with 101 to one function module and all records which starts with 102 to another function module and all records which start with 103 to some other function module. In my sender channel i am planning to use
101, 102, 103 as key field values to read them into 3 different structures.
like Recordsset structure = detail1,, detail2,,detail3,*.
Details1.keyfieldvalue = 101
Details2.keyfieldvalue = 102
Details3.keyfieldvalue = 103
Will this idea work out??
Thanks,
BaluHi Balu,
Yes u r correct, u can access the records by setting the key field value as u mentioned.
But other way is also by,
access the all records as similar one, so no key field value.
the whole record as a single element.In the mapping u have a string function called StartsWith.
In mapping u can specify if the incoming record starts with 101 then map it to FM1(Fumction Module 1).
If the record starts with 102 map it to FM2......
This will be very simpler i feel...
If i am nt clear pl do post the problem in detail.
Babu -
Content Conversion - JDBC and JMS
Can we use File Content Conversion with JDBC and JMS ?
Hi,
How To Use the Content Conversion Module in JMS Adapter - https://websmp106.sap-ag.de/~form/sapnet?_SHORTKEY=01100035870000582377&
check this for JMS content conversion:
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f02d12a7-0201-0010-5780-8bfc7d12f891
Check the how to guide provided by prabhu and also this link on the XMl To TeXtCoversion Module,
http://help.sap.com/saphelp_nw04/helpdata/en/44/748d595dab6fb5e10000000a155369/content.htm
Ref How To Use the Content Conversion Module in JMS Adapter -
https://websmp106.sap-ag.de/~form/sapnet?_SHORTKEY=01100035870000582377&
See this weblogs which was shown with examples:
How to use SAP's WebAS J2EE's JMS Queue in Exchange Infrastructure
Sync/Async communication in JMS adapter without BPM (SP19)
Async/Sync Communication using JMS adapter without BPM (SP 19)
Exploring JMS and SAP-XI JMS Adaper
Configuring the sender JMS adapter
http://help.sap.com/saphelp_nw2004s/helpdata/en/f4/2d6189f0e27a4894ad517961762db7/content.htm
Configuring the receiver JMS adapter
http://help.sap.com/saphelp_nw2004s/helpdata/en/10/b1b4c8575a6e47954ad63438d303e4/content.htm
Check JMS Adapter section of this blog by Sravya:
Aspirant to learn SAP XI...You won the Jackpot if you read this!-Part III
Also information related to Provider-specific settings are available
http://help.sap.com/saphelp_nw2004s/helpdata/en/cd/d85a9d6fab7d4dbb7ae421f710626c/frameset.htm
Plz do refer the following threads:
JMS Content Conversion - no CR/LF
Message (Data) getting lost after JMS Content Conversion(Sender)
Message (Data) getting lost after JMS Content Conversion(Sender)
Message (Data) getting lost after JMS Content Conversion(Sender)
Regards,
Vinod. -
I need this file "How to Use the Content Conversion Module in JMS Adapter"
Can someone send me this file:
"How to Use the Content Conversion Module in JMS Adapter"
I am not able to find it.
Thanks
Antonellopls refer guide
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi-adapters/how%20to%20use%20the%20content%20conversion%20module%20with%20xi%203.0%20j2ee%20jms%20adapter.pdf
Regards,
Swetha. -
Content conversion in sender adapter.
Hi,
I have a problem with the content conversion in sender adapter.
I need only process the csv file with the exact number of columns containing the structure, if the csv file contains more o less columns in the csv file, I want that this files are not relayed by the adapter and remain on the server.
Thank you very much for your help.@ Hareen
This can be achieved at mapping level. You need to check the number of columns that are comming in the file using Count function. If the number of count is equal to the value specified then will process the message else raises a mapping exception.
Are you talking about "count" function in the message mapping? that function won't count the number of fields / columns, but would count the number of occurrence of a particular field. -
Zip or unzip a payload in sender JMS channel
Hi,
My scenario is to unzip a payload in sender JMS channel and I have configured the sender JMS module in the below format,
Processing sequence
AF_Modules/PayloadZipBean Local Enterprise Bean Local Enterprise Bean zip
SAP XI JMS Adapter/ConvertJMSMessageToBinary Local Enterprise Bean convert_JMS2Bin
SAP XI JMS Adapter/ConvertBinaryToXMBMessage Local Enterprise Bean convert_Bin2XI
CallSapAdapter Local Enterprise Bean call_AF_MS
Module Configuration
Modulekey Parameter Name Parameter Value
zip zip.mode unzip
I have tried this format also,but it is not working
SAP XI JMS Adapter/ConvertJMSMessageToBinary Local Enterprise Bean convert_JMS2Bin
SAP XI JMS Adapter/ConvertBinaryToXMBMessage Local Enterprise Bean convert_Bin2XI
AF_Modules/PayloadZipBean Local Enterprise Bean Local Enterprise Bean zip
CallSapAdapter Local Enterprise Bean call_AF_MS
(or)
SAP XI JMS Adapter/ConvertJMSMessageToBinary Local Enterprise Bean convert_JMS2Bin
AF_Modules/PayloadZipBean Local Enterprise Bean Local Enterprise Bean zip
SAP XI JMS Adapter/ConvertBinaryToXMBMessage Local Enterprise Bean convert_Bin2XI
CallSapAdapter Local Enterprise Bean call_AF_MS
While performing testing,it throws the below error in sender JMS channel,
The detailed error (if any) is : com.sap.aii.adapter.jms.api.channel.filter.MessageFilterException: while trying to invoke the method java.lang.String.length() of a null object loaded from local variable pattern: NullPointerException: while trying to invoke the method java.lang.String.length() of a null object loaded from local variable 'pattern'at com.sap.aii.adapter.jms.core.channel.filter.TxManagerFilter.filterSend(TxManagerFilter.java:185)
Can someone help me on how to extract a payload in sender JMS channel.
Also please guide me on how to extract a multiple payloads in one zip file in sender JMS channel.Hi,
Your module sequence seems to be incorrect.
Try like this,
SAP XI JMS Adapter/ConvertJMSMessageToBinary Local Enterprise Bean convert_JMS2Bin
SAP XI JMS Adapter/ConvertBinaryToXMBMessage Local Enterprise Bean convert_Bin2XI
AF_Modules/PayloadZipBean Local Enterprise Bean Local Enterprise Bean zip
CallSapAdapter Local Enterprise Bean call_AF_MS
(or)
SAP XI JMS Adapter/ConvertJMSMessageToBinary Local Enterprise Bean convert_JMS2Bin
AF_Modules/PayloadZipBean Local Enterprise Bean Local Enterprise Bean zip
SAP XI JMS Adapter/ConvertBinaryToXMBMessage Local Enterprise Bean convert_Bin2XI
CallSapAdapter Local Enterprise Bean call_AF_MS
Regards,
Praveen Gujjeti -
Unzip a payload in sender JMS channel
Hi,
My scenario is to unzip a payload in sender JMS channel and I have configured the sender JMS module in the below format,
Processing sequence
AF_Modules/PayloadZipBean Local Enterprise Bean Local Enterprise Bean zip
SAP XI JMS Adapter/ConvertJMSMessageToBinary Local Enterprise Bean convert_JMS2Bin
SAP XI JMS Adapter/ConvertBinaryToXMBMessage Local Enterprise Bean convert_Bin2XI
CallSapAdapter Local Enterprise Bean call_AF_MS
Module Configuration
Modulekey Parameter Name Parameter Value
zip zip.mode unzip
While performing testing,it throws the below error in sender JMS channel,
The detailed error (if any) is : com.sap.aii.adapter.jms.api.channel.filter.MessageFilterException: while trying to invoke the method java.lang.String.length() of a null object loaded from local variable pattern: NullPointerException: while trying to invoke the method java.lang.String.length() of a null object loaded from local variable 'pattern'at com.sap.aii.adapter.jms.core.channel.filter.TxManagerFilter.filterSend(TxManagerFilter.java:185)
Can someone help me on how to extract a payload in sender JMS channel.
Also please guide me on how to extract a multiple payloads in one zip file in sender JMS channel.Hi,
Your module sequence seems to be incorrect.
Try like this,
SAP XI JMS Adapter/ConvertJMSMessageToBinary Local Enterprise Bean convert_JMS2Bin
SAP XI JMS Adapter/ConvertBinaryToXMBMessage Local Enterprise Bean convert_Bin2XI
AF_Modules/PayloadZipBean Local Enterprise Bean Local Enterprise Bean zip
CallSapAdapter Local Enterprise Bean call_AF_MS
(or)
SAP XI JMS Adapter/ConvertJMSMessageToBinary Local Enterprise Bean convert_JMS2Bin
AF_Modules/PayloadZipBean Local Enterprise Bean Local Enterprise Bean zip
SAP XI JMS Adapter/ConvertBinaryToXMBMessage Local Enterprise Bean convert_Bin2XI
CallSapAdapter Local Enterprise Bean call_AF_MS
Regards,
Praveen Gujjeti -
File content conversion on Sender Side
Hi,
I am doing file content conversion on sender side.when i am executing the scenario,i am getting the following error in sxmb_moni:
Invalid at the top level of the document. Error processing resource 'file:///D:/Documents and Settings/...............
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?><!-- Inbound Message --> DOC_HEADER ...
when i right click on the pyaload and select view source
its displaying the whole flat file with the following line at the beginning:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?><!-- Inbound Message -->
i have given all the parameters correctly....
in sxmb_moni.....the error category is Mapping and the error id id EXCEPTION_DURING_EXECUTE
Please help me with this error.
thanks n regards,
anuradhaHi !!
The best way to debug would be to add TRACE statements in your mappigs. In both Graphical and java Mapping.
Trace out the entire output of java mapping and see if this is the input that the next mapping expects.
For trace , http://help.sap.com/saphelp_nw04/helpdata/en/c8/98e7d5c1620642973565ea3dd319d1/content.htm
refr this links also
Fatal Error: com.sap.engine.lib.xml.parser.ParserException: Name expected
unsported character error in message mapping
Re: HTTP to RFC Mapping error:com.sap.aii.utilxi.misc.api.BaseRuntimeException:
Exception com.sap.aii.utilxi.misc.api.BaseRuntimeException
Re: Outbound error
Re: mapping error
error in file to file
have a look at this weblog on how to test your mapping
/people/michal.krawczyk2/blog/2005/09/16/xi-how-to-test-your-mapping-in-real-life-scenarios
Thanks !!! -
Hi all,
I have been facing with this problem with sender JMS channel, any pointers as to where can be the solution for it
The error details are as follows
JMS and XI identifiers for the message are ID:414d512056515933444e41575445202048aa8802235bad01 and a2d32e30-7aae-11dd-ae1c-001125cc0c0c respectively. The JMS adapter will rollback the database and JMS session transactions. If the session is transacted, the message is not lost and will be retried later. The exception stack trace is java.lang.Exception
at com.sap.aii.af.service.jms.WorkerJMSReceiver.onMessage(WorkerJMSReceiver.java:963)
at com.ibm.mq.jms.MQMessageConsumer.receiveAsyncQ(MQMessageConsumer.java:2539)
at com.ibm.mq.jms.MQMessageConsumer.receiveAsync(MQMessageConsumer.java:4262)
Messages are not being placed in the Queue. the Queues are newly created is there something which has been missed out during the creation of the Queues
Rgds
AdityaHi Aditya
Try this way:
1. uncheck JMS transactional session check box in JMS sender communication channel.
2. Once it is done, insert new message in JMS queue.
Thanks
Sai -
Content conversion by using sender JMS channel
Hi All,
I have developed a scenario from JMS to Idoc. I need to read flat files by using sender jms adapter. I have configured message transform bean in module tab and respective content conversion parameters as well. My flat files contains different structures. So I need to use conversion type as StructPlain2XML. Based on keyField value I am diffentiating flat file records. My requirement is I have to give two spaces in <xml.keyFieldValue> parameter. fixed Length of keyFieldValue is 6, Actual value getting from source file is DEST. I need to pass two spaces as per fixed length specification. I have passed two spaces, but after activating spaces are removed by system bydefault. Because of this an empty file is processed by PI. Source file contains two spaces after DEST. I need to read two spaces along with DEST value as keyFieldValue. How to achieve this..
Thanks in advance.
Best Regards,
Ashok.Hi Ashok
You can resolve this by splitting the field into two fields - and actual key field and a dummy/temp field.
I've just blogged about this technique, you can refer to it here
Content Conversion for fixed length files with key field value shorter than key field length
Rgds
Eng Swee -
Content Conversion in sender channel
Hi,
I am having file to proxy scenario. Input file is a .txt file, which is having this type of data
111111 0000000 AAAAAAAA BBBBBBBBBBBBBBBBBBBB
222222222222222 CCCCCCCCCCCC 1111111111111111111112222
I want to pick this file from FTP and put all the content of txt file in one single field of data type.What content conversion parameters needs to be set in this case.
Thanks.Hi Pothana,
Thanks for your efforts.I have one doubt here.As you said that we can do this in mapping.but if I want to try this in mapping, the input payload tags must have the spaces at the start of the tag.But my problem is I am not able to read that spaces from text file itself.e.g. if my i/p txt file is
AAAAA BBBBBBBBBBBB
CCCCCCCCCCCC DDDDDD
1111111111111111 22222
the i/p payload in moni looks like this
<Record>
<Content>AAAAA BBBBBBBBBBBB</Content>
</Record>
<Record>
<Content>CCCCCCCCCCCC DDDDDD</Content>
</Record>
<Record>
<Content>1111111111111111 22222</Content>
</Record>
It ignores that line gap. neither its giving me a empty content tag for each line gap, nor it is appending the spaces at the start of second and third tag value.
Please provide your inputs.
Thanks. -
IgnoreRecordsetName not working in Sender JMS channel- PI 7.1
Hello All,
In Sender JMS content conversion I have used xml.ignoreRecordsetName=true
ignoreRecordsetName=TRUE
But still I am getting "Recordset" in the XML due to which message mapping is getting failed.
Can you please tell me what is the correct syntax for this parameter in JMS channel
Regards,
MoorthyHi
ignorerecordset parameter dont support using the message transform bean.
Maybe you are looking for
-
CPU usage for Image acquiring by using Imaq1411
Hello, Running the IMAQ program makes the CPU usage almost 100%. I tested it out with my own program and the example program you provided. So far I haven't have any clue about this. I've tried to set the ROI as the help said (Left, Top, Right, Bottom
-
Web service php file: unable to change "inStock" number with "Product_UpdateInsert"
I am new to php and can't figure out how to change the in stock number through the eCommerce api. Here is what I am trying: I'm sure this example looks stupid to all the pros out there. If someone could just point me in the right direction for resour
-
OBIEE 11g Session Management on a Scaled Out Implementation
Hi, We have a scaled out environment of OBIEE 11.1.1.7, and noticed that Manage Sessions does not show all of the Sessions and queries. For example, User1 is Admin User2, 3 and 4 are normal users logged it to OBIEE. When I logged in as admin first ti
-
Animation vid is loosing quality...urgent help!
I am trying to put together an animation with a separate music clip. When I put the video clip into final cut-it looks fine on the viewer(just by clicking on it in the playlist, viewing on left preview monitor) but when I add it to the sequence below
-
Widget Browser Issues...
I am a student at SCAD and downloaded the Adobe Creative Suite from the school. I am trying to launch my widget browser but always get an error message. I also noticed that I was unable to access any adobe site no matter what browser I used.I am havi