JMS Adapter - data conversion xml- structured data has extra characters

Further to [Using MQ / JMS adapter with legacy system to talk to SAP;, I am using the Module tab on my receiver JMS Adapter to convert the xml payload to a structured format. It converts to the mainframe ebcdic code set.  I am on PI 7.11, and the MQ Series (which JMS interacts with) is 6.0.  The code I have is comparable to the wiki:[http://wiki.sdn.sap.com/wiki/display/XI/HowTo...ContentconversionmodulewithJ2EEJMS+adapter], i.e. the example at the very bottom of that article.
The issue we are having is that an extra character gets inserted at the end of each structure (within the message), i.e. our message contains 4 structures, but when we view the structured data on our mainframe system (that arrives from PI), the entire message is shifted by 4 characters... by 1 after the end of each structure.  On the mainframe, this extra character appears as '.'. It must be an end-of-line or something...
Has anyone had the same issue?  If so, were you able to resolve? I could probably set up my message data type to just be one big declare (thus eliminating the use of structures within it), but that is something I'd rather not do.
We are in the process of reviewing Note 856346, #6 but not sure if it applies.
Regards,
Keith

Hi,
check localejbs/SAP XI JMS Adapter/ConvertMessageToBinary Local Enterprise Bean convert_XI2Bin
this is not CallJMSService.
And also check the receiver Structure, if it is falt structure its ok, else
see the below link if it has the complex structure , how to handle..
See the below links
/people/alessandro.guarneri/blog/2006/01/04/jms-sender-adapter-handling-too-short-lines
/people/william.li/blog/2006/11/13/how-to-use-saps-webas-j2ees-jms-queue-in-exchange-infrastructure
content conversion
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f02d12a7-0201-0010-5780-8bfc7d12f891
Regards
Chilla..

Similar Messages

  • JMS Adapter binary conversion error

    I am getting an MQ message. The message has / embedded when it is picked by JMS Adapter. Because the message content has /, JMS is stripping the message. Is there anyway to get the whole message into XI from JMS without the message getting stripped.
    the error message is below
    Error while processing message '3c698d81-983c-4d3c-2272-cb505bbd3e4a';  detailed error description: com.sap.aii.adapter.jms.api.channel.filter.MessageFilterException: Error in converting Binary message 1193200ST20080509110023912134297100239120000DI2SAPDVDIROUTI7080509110023912 EDI00000        INITAREQDI2SAPDVBNSF           EBSTMNT 120886882PNCBANK        I N01                                      Y 01,043000096,FORTE,080422,0830,01,80,80,2/                                       02,RCVR,043000096,1,080422,0830,USD,/                                           03,1019283631,USD,030,28192752,,,060,28192752,,,072,000,,,074,000,,/
    Edited by: developer on Jul 1, 2008 9:55 PM

    hi folks i have resolved that issue it was mapping change...
    Now i'm facing another problem .. I m gettin only header record but i don see me items...
    my structure is like this field fixed length
    HEADER ( 1 )
    OrderDetail(Min - 1 and Max - Unbounded)
    Trailer(Min - 1 and Max - Unbounded)
    configuration of  my  JMS adapter :
    Transform.Class                              :com.sap.aii.messaging.adapter.Conversion
    Transform.ContentType                 :text/xml;charset=utf-8
    xml.conversionType                      :StructPlain2XML
    xml.processFieldNames                :fromConfiguration
    xml.documentName                     : MyDocument
    xml.documentNamespace           : http://xi.com/test
    xml.recordsetStructure               : Header,1,OrderDetail,,Trailer,
    xml.recordsetName                     : Dataset
    xml.Header.keyFieldName            :abc
    xml.Header.keyFieldValue            :x1
    XML xml.keyFieldType                 :CaseSensitiveString
    xml.Header.fieldFixedLengths     :1,2,3..
    xml.Header.fieldNames                :abc,cde,fgh...
    Similarly for order and trailer
    Kindly help in this regard.. i was not able to find in search

  • JMS Adapter and Conversion Agent

    Hi,
    Has anyone worked on JMS adapter and Conversion module? JMS adapter is working fine without the conversion agent module.
    processing sequence is as follows
    1 SAP XI JMS Adapter/ConvertJMSMessageToBinary Local Enterprise Bean convert_JMS2Bin
    2 SAP XI JMS Adapter/ConvertBinaryToXMBMessage Locl Enterprise Bean convert_Bin2XI
    3 sap.com/com.sap.nw.cm.xi/CMTransformBean Local Enterprise Bean 0
    4 CallSapAdapter Local Enterprise Bean call_AF_MS
    Also I have given the Parameter Name and value.
    Let me know if i am missing something.

    I have done the configuration in sender JMS channel. I even created file sender and it is not working.
    when i went and checked the initialization events in http://xxxx:50000/CMViewer, I can see some errors under service Initialization.

  • Complex XML to Plain in JMS adapter "Content conversion module"

    Hi!
    I have read the document on "How To… use the content conversion module with XI3.0 J2EE JMS Adapter", and it says only SimpleXML can be converted in the receiver channel.
    I had hoped for a solution at least as good as in the File/ftp adapter, where complex XML can be transformed to files.
    Are there plans to include complex XML conversion in the JMS adapter?
    I can not use the file adapter as I need to change the file name and destination, and that can not be done by adding own module to its single module.
    Any idea how I can achieve what I want?
    To only way I can find, is to create a file using the file/ftp adapter, and then pick it up again and treat all the lines as the same structure (one row = one xml field). Then output this new xml message to file, using the JMS adapter and add any modules with name and destination determination.
    Appreciate any help!
    Regards,
    Oeystein Emhjellen

    Hello,
    Have you tried to use an XSLT mapping within the IE?
    I have, at one customer site, created a XSLT message mapping which converts the  XML to a fixed length ASCII file format. I than added the XSLT message mapping as a second mapping step on the interface mapping.
    In this case I was able to publish a fairly complex fixed length file format to MQ Series via the JMS adapter.
    /Johan

  • Receiver JMS Adapter Content Conversion issue

    Scenario :
    R/3 -->XI -->MQ(XML2Plain)
    Hi
    We are using Receiver JMS Adapter to send the Message from XI to MQ.
    The XML has to be converted to plain file. And Content conversion is
    being done.
    With the new development, the message type defined consist of 8 fields
    with fixed length. The XML message goes successfully from XI to MQ
    without any content conversion. But once simple content conversion is
    being done for Receiver JMS adapter, even though the message is
    received but it’s empty (without any data records). The adapter
    monitoring everything seems fine and it gives the status that message
    converted to binary and the message is delivered to MQ. Though on
    checking the messages there is no data records.
    Below is my content conversion configuration done in Module tab. Kindly
    revert back what can be the problem as have done exactly the same way
    as described in Content Conversion How to Guide for receiver JMS.
    localejbs/AF_Modules/MessageTransformBean Local Enterprise Bean  XML2Plain
    localejbs/SAP XI JMS Adapter/ConvertMessageToBinary Local Enterprise Bean convert_XI2Bin
    localejbs/SAP XI JMS Adapter/SendBinarytoXIJMSService Local Enterprise Bean exit
    XML2Plain Transform.Class com.sap.aii.messaging.adapter.Conversion
    XML2Plain TransformContentType text/plain;charset=utf-8
    XML2Plain xml.addHeaderLine 0
    XML2Plain xml.addHeaderLine SimpleXML2Plain
    XML2Plain xml.fieldFixedLengths 8,10,10,20,40,40,8,8
    XML2Plain xml.fixedLengthTooShortHandling Cut
    regards.
    santosh.

    Hi,
    check localejbs/SAP XI JMS Adapter/ConvertMessageToBinary Local Enterprise Bean convert_XI2Bin
    this is not CallJMSService.
    And also check the receiver Structure, if it is falt structure its ok, else
    see the below link if it has the complex structure , how to handle..
    See the below links
    /people/alessandro.guarneri/blog/2006/01/04/jms-sender-adapter-handling-too-short-lines
    /people/william.li/blog/2006/11/13/how-to-use-saps-webas-j2ees-jms-queue-in-exchange-infrastructure
    content conversion
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f02d12a7-0201-0010-5780-8bfc7d12f891
    Regards
    Chilla..

  • File Adapter with Conversion - XML with Hierarchy?

    XI 3.0 (SP9)
    We are using the inbound file adapter with conversion to convert a flat file that has header and line items.  I would have thought that the data type should have been setup something like this:
    <data type>
    <header>
      <item>1</item>
      <item>2</item>
    </header>
    </data type>
    Our flat file looks like this:
    H12345
    I12345
    We have only been able to configure the file adapter to bring in the data like this:
    <data type>
    <header></header>
    <item>1</item>
    <item>2</item>
    </data type>
    What is the proper way to inbound data through a file adapter that has structure conversion like this?
    Do all of the elements get put under the root node, or is there a way to build structure?
    Do we need to build the data type to correspond with the exact way that the data will come in from the file adapter?
    Thanks
    Peter

    Not quite sure what you want to get, as the flatfile and xml structure does not contain the same values.
    However, I will try to give you an example:
    Your flat file looks like this:
    H12345
    I12345
    If the first row is header and the next is a line, then you need to specify the fila adapter with the following:
    Document name = datatype
    Recordset name = recordset
    Recordset structure = header,1,item,*
    Recordsets per message = *
    Recordset sequence = Ascending (need SP10 for this, but you do not need it for this)
    Keyfieldname = id
    header.fieldFixedLengths = 1,5
    header.fieldNames = id,number
    header.keyFieldValue = H
    header.lastFieldsOptional = Yes
    item.fieldFixedLengths = 1,5
    item.fieldNames = id,number
    item.keyFieldValue = H
    item.lastFieldsOptional = Yes
    This will create something like this:
    <datatype>
    <recordset>
    <header>
    <id>H</id>
    <number>12345</number>
    </header>
    <item>
    <id>I</id>
    <number>12345</number>
    </item>
    </recordset>
    </datatype>
    Hoever, if both rows are "item" rows , then you need to specify the file adapter with the following:
    Document name = datatype
    Recordset name = header
    Recordset structure = item,*
    Recordsets per message = *
    Recordset sequence = Ascending (need SP10 for this, but you do not need it for this)
    item.fieldFixedLengths = 1,5
    item.fieldNames = id,number
    item.lastFieldsOptional = Yes
    This will create something like this:
    <datatype>
    <header>
    <item>
    <id>H</id>
    <number>12345</number>
    </item>
    <item>
    <id>I</id>
    <number>12345</number>
    </item>
    </header>
    </datatype>
    Q: Do we need to build the data type to correspond with the exact way that the data will come in from the file adapter?
    A: Yes!
    Good luck!

  • JMS Adapter Content conversion using Webspear MQ

    Hi All,
    I have a scenario  where I have to pick a flat file from WebSpear JMS Q.In turn I should convert flat structure into xml structure to parse to the RFC structure(YOTCS_I090_INV_S) and map to the traget structure.
    Below is the Source structure:
    Messages
    ->Message1
    -->YOTCI_I090_INV_SYNC
    --->YOTCS_I090_INV_SYNC
    >item
    >ZDATE
    >TIME
    >TZONE
    >WERKS
    >MATNR
    >LGORT
    >CHARG
    >SOBKZ
    >INSMK
    >LIFNR
    >ZMENGE
    >ZMEINS
    >LOT_NUMBER
    >CODE_DATE
    Source file look's as below:
    YOTCS_I090_INV_S                                                                                4928
    YOTCS_I090_INV_S                                                                                3
    YOTCS_I090_INV_S                                                                                3
    YOTCS_I090_INV_S                                                                                1
    I am doing the file contact conversion as below in JMS Adapter:
    Module Key      ParameterName                           ParameterValue
    Plain2XML        Transform.Class                           com.sap.aii.messaging.adapter.Conversion
    Plain2XML        Transform.ContentType                 text/xml;charset=utf-8
    Plain2XML        xml.conversionType                      StructPlain2XML
    Plain2XML        xml.documentName                      YOTCI_I090_INV_SYNC
    Plain2XML        xml.documentNamespace            urn:sap-com:document:sap:rfc:functions
    Plain2XML        xml.item.fieldFixedLengths           8,8,6,4,18,4,10,1,1,10,13,3,10,8
    Plain2XML        xml.item.fieldNames ZDATE,TIME,TZONE,WERKS,MATNR,LGORT,CHARG,SOBKZ,INSMK,LIFNR,ZMENGE,ZMEINS,LOT_NUMBER,CODE_DATE
    Plain2XML        xml.processFieldNames             fromConfiguration
    Plain2XML        xml.recordsetStructure               item,*
    Can any one help me in configuring the Content conversion? Hope you got my issue.
    Thanks in Advance.
    Best Regards,
    Jose

    Joseph,
    Go thru the Below Link
    http://help.sap.com/saphelp_nw04/helpdata/en/24/4cad3baabd4737bab64d0201bc0c6c/content.htm
    Cheers
    Agasthuri Doss

  • JMS Adapter Content Conversion

    Hi,
    I am looking for some help on JMS Receiver content conversion, to put a delimited file on MQ series queue.
    I tried the below link, but not able to access the document.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/3.0/how to use the content conversion module with the xi 3 j2ee jms adapter
    If anyone has a copy of the pdf document on JMS content conversion, could you please email it to me at my id : [email protected]
    Rgds
    R Chandrasekhar

    I had send the required PDF
    Regards
    Arpit seth

  • Receiver JMS adapter content conversion

    Hi All,
    Can anyone provide me guidelines on how to do content conversion for the receiver JMS adapter??
    Thx
    Navin

    Hi,
    Based on your structure , you need to configure the JMS CC parameters.
    see the below link
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f02d12a7-0201-0010-5780-8bfc7d12f891
    regards
    Chilla

  • Factory-class in data-sources.xml managed-data-source

    OracleAS_1\j2ee\home\config has
    data-sources.xml
    Using managed-data-source.
    For connection-pool, connection-factory factory-class If I use OracleDriver instead of OracleDataSource, what difference would it have? In terms of performance?
    Thanks.

    Oops, a case issue...
    class="oracle.jdbc.pool.Oracle[b]OCIConnectionPool"

  • OC4J data-source.xml other data base like postgresql

    Hi i need to use a DataSource in OC4J with other database (any), i am setting the data-source.xml like:
    <\datasource
    class="com.evermind.sql.DriverManagerDataSource"
    name="DSPropiedades" location="jdbc/DSPropiedadesCoreDS"
    xa-location="jdbc/xa/DSPropiedadesXADS"
    ejb-location="jdbc/DSPropiedades"
    connection-driver="com.borland.datastore.jdbc.DataStore"
    username="sample"
    password="sample"
    url="jdbc:borland:dslocal:D:/seguridaddb/seguridad.jds"
    inactivity-timeout="300"
    />
    and i had put the database.jar in the OC4j directory's
    D:\ora10i\jdbc\lib
    D:\ora10i\j2ee\home\lib
    D:\ora10i\lib
    but i always obtain the same error
    Error initializing data-source 'jdbc/DSPropiedadesCoreDS': DriverManagerDataSource Driver 'com.borland.datastore.jdbc.DataStore' not found

    Liliana,
    From the [lack of] information you have posted, I am assuming you are using OC4J stand-alone version 10g -- but I'm not sure because I couldn't find any of those details in your post. It always helps to include version and platform information.
    If my assumption is correct, then the default location for third-party JAR files (including your JDBC driver) is the
    "j2ee/home/applib"
    subdirectory of the OC4J installation. For example, on my Windows XP machine (again, I couldn't see what platform you are using, so I am assuming it is also Windows), the actual path is:
    C:\OC4J_10_0_3\j2ee\home\applib
    If you want to see other examples of "data-sources.xml" files (apart from the one that comes with OC4J), try searching the following Web sites:
    http://www.orionserver.com
    http://www.orionsupport.com
    http://kb.atlassian.com
    Good Luck,
    Avi.

  • How do i convert the data to xml structure

    Hi
    I have a set of records. I need to create an xml document from that. Can you please let me know how can i proceed for this problem ?
    TIA
    Rajkumar.

    OTN has a sample app, the XML Flight Finder, that demonstrates one approach using Oracle XSQL Servlet. Because it is built on the Oracle8i platform and leverages the Oracle XSQL Servlet, this sample application can submit SQL queries and define output formats using XML, XSL, and XSQL text files -- no Java programming is required, and there's no code to compile. The application is easy to build, customize, and maintain.
    You can download documentation and source code from here: http://otn.oracle.com/sample_code/tech/xml/xsql_servlet/files/ffhome.html
    Regards,
    -rh

  • SQL Server Date Conversion to Oracle Date

    I am new to ODI and am trying to figured out how to move a SQL Server date datatype value to an Oracle date.
    Thanks in advance.

    SQLServer datetime datatype is moved to an Oracle TIMESTAMP datatype via the technology's data type mapping. That particular LKM 'SQL to SQL' is written in java so reads from SQLServer into java datatypes then writes back out to Oracle.
    Cheers
    David

  • JMS Adapter setting the header data of MQ message

    Hi All,
    I need to set the properties in JMS adapter for setting the header data of MQ message.
    JMS_IBM_MQMD_Format = MQFMT_NONE.
    Thanks in advance
    Ravijeet

    Hi All,
    I am stuck in a typical XI issue.......I have a scenario where my input to XI is IDoc and output is xml message going to IBM MQ.
    The IDoc is sending some chineese character which is fine is SXMB_MONI Integration server and also fine in the payload of message monitoring, so feel the message is going fine from XI to MQ.
    But the receiver EDI system which is picking the message from MQ queue says the chinese characters are getting corrupted. They say that you need to set the additional properties in MQ header data
    JMS_IBM_MQMD_Format = MQFMT_NONE.
    How do I do this in communication channel for jms adapter ? How to I set the MQ header data in jms communication channel ?
    Thanks in advance
    Ravijeet
    Edited by: RAVIJEET DAS on May 12, 2009 8:27 AM
    Edited by: RAVIJEET DAS on May 12, 2009 8:27 AM

  • JMS Adapter module content conversion

    Hi,
    I'm developing a module for the jms adapter(sender). My requirement is to parse the XI message(text) using some XML parsing api and do some formatting, logic etc and to make the jms adapter create a xml file with the processed information. Jms File Content Conversion does not suit our requirement and thats the reason we are trying this option.
    My understanding is: Access the  payload in the "process" method of the local ejb, apply XML parsing using JDOM etc, make a xml which should be the output of the jms adapter. This xml will be the xml with my user defined tag elements after content conversion. Can i form this xml and assign to the inputModuleData? Will the jms adapter use this string to create the xml and send to IS? Are there any other parameters to be set or processes to be done?
    Also in which sequence should I put my adapter module in communication channel.
    ================================================
    My code snippet:
    public ModuleData process(ModuleContext moduleContext, ModuleData inputModuleData)
            throws ModuleException
              Object obj = null; // Handler to get Principle data
              Message msg = null; // Handler to get Message object
            try
                   obj = inputModuleData.getPrincipalData();
                   msg = (Message)obj;
                   AuditMessageKey amk = new AuditMessageKey(msg.getMessageId(),AuditDirection.INBOUND);
                   Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS,"sample: Inside sample Module---efore reading payload");
                   try
                        XMLPayload xmlpayload = msg.getDocument();
                        String messageStr = xmlpayload.getText();
                        String inputStr = null;
                        String tags[] = new String[2];
                        String values[] = new String[2];
                        Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS,"sample: Inside sample Module---before content conversion");
    String tagvalue1 = messageStr.substring(messageStr.indexOf("BEGIN+"), messageStr.indexOf("'");
    String tagvalue2 = messageStr.substring(messageStr.indexOf("'"), messageStr.lastindexOf("ENDING");
                             tags[0] = "tag1";
                             tags[1] = "tag2";
                             values[0] = tagvalue1 ;
                             values[1] = tagvalue2 ;
                             Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS,"sample: Inside sample Module---after content conversion");
                             Document xmldoc = null;
                             DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
                             DocumentBuilder builder = factory.newDocumentBuilder();
                             DOMImplementation impl = builder.getDOMImplementation();
                             org.w3c.dom.Element e = null;
                             Node n = null;
                             xmldoc = impl.createDocument(null, "MT940", null);
                             org.w3c.dom.Element root = xmldoc.getDocumentElement();
                             for(int i = 0; i < tags.length; i++)
                                  e = xmldoc.createElementNS(null, tags<i>);
                                  n = xmldoc.createTextNode(values<i>);
                                  e.appendChild(n);
                                  root.appendChild(e);
                             Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS,"sample: Inside sample Module---before dom creation");
                             DOMSource domSource = new DOMSource(xmldoc);
                             ByteArrayOutputStream myBytes = new ByteArrayOutputStream();
                             Result dest = new StreamResult(myBytes);                         
                             TransformerFactory tf = TransformerFactory.newInstance();
                             Transformer serializer = tf.newTransformer();
                             serializer.setOutputProperty("indent", "yes");
                             serializer.transform(domSource, dest);
                             Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS,"sample: Inside sample Module---before setting principal data");
                             byte[] docContent = myBytes.toByteArray();
                             if (docContent != null) {
                             xmlpayload.setContent(docContent);
                             inputModuleData.setPrincipalData(msg);
                             Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS,"sample: Inside sample Module---after setting principal data");
                   catch(ArrayIndexOutOfBoundsException e)
                        e.printStackTrace();
                   catch(StringIndexOutOfBoundsException e)
                        e.printStackTrace();
                   catch(TransformerException e)
                        e.printStackTrace();
                   catch(Exception e)
                        e.printStackTrace();
            catch(Exception e)
                ModuleException me = new ModuleException(e);
                throw me;
            return inputModuleData;

    This is for sender channel. The doubt in adapter module is in the process block how will I get the main data being read by the jms adapter from the text file.As I am reading text file from websphere MQ, the content of the text file can be obtained thru xmlpayload.getText() or is there any other way.
    obj = inputModuleData.getPrincipalData();
    msg = (Message)obj;
    XMLPayload xmlpayload = msg.getDocument();
    String messageStr = xmlpayload.getText();
    At present I am using my adapter module before call sap adapter, but before sap adapter there are two other modules(toBinary and to Xmb), so shld I place it before both or after both the modules.
    Thanx in advance
    Rachit

Maybe you are looking for

  • Get full path

    I'm sure this one has been asked a million times before, but a search of the forums hasn't proved particularly positive - so, apologies if this is a duplicate post, but... How on earth does one get the full path of a file??? I mean, starting from the

  • Split XML files with XSL result document

    Hi All, I have below xml file... <?xml version="1.0" encoding="ISO-8859-1"?> <T0020 xsi:schemaLocation="http://www.safersys.org/namespaces/T0020V1 T0020V1.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.safersys.org/names

  • How do I charge my MBP on airplane using their USB outlets?

    Hello everyone, I have to make a lot of work-related trips mostly flying within Asia or from Asia to Africa (and return). While I am aware of the MagSafe Airline Adapter, I have actually never seen the required outlet anywhere close to my seat (well,

  • I chat...no video

    Hey everyone. I currently have a powerbook G4 with an apple I sight. I have used it to I chat in the past but recently have not been able to I chat or even receive one way video chats. I can IM fine just no video. I am using wireless internet in my d

  • What date 1. year warranty starts? 5 months gap between purchasing n activation

    Purchased iPod touch in May for Oct birthday.  iPod touch is not going to be opened until Oct.  But for one year warranty, it starts counting from purchasing Date or until Oct. Activating ?