Skip to Content
author's profile photo Former Member
Former Member

JMS Adapter: Problem with sending data from XI to MQ

Hello Experts,

I am coming across with an issue while sending data to MQ through JMS Receiver Adapter. I'm receiving an XML file in XI from a 3rd party system with different elements, e.g.:

<?xml version="1.0" encoding="UTF-8"?>

<response>

<element1>aaa</element1>

<element2>bbb</element2>

<row>

<element3>ccc</element3>

<element4>ddd</element4>

</row>

</response>

I'm doing an ABAP mapping of this XML with following result:

<?xml version="1.0" encoding="utf-8" ?>

<MT_Response>

<row>

<result>@@aaa@fff@@ddd</result>

</row>

</MT_Response>

This structure is always the same and does never change. I want to send only the value of the element 'result' to MQ - no XML elements etc. shall be contained:

@@aaa@bbb@@ddd

I have used the below modules and respective module keys in the sequence:

AF_Modules/MessageTransformBean XML2Plain

SAP XI JMS Adapter/ConvertMessageToBinary convert_XI2Bin

SAP XI JMS Adapter/SendBinarytoXIJMSService exit

Module Configuration:

XML2Plain Transform.Class com.sap.aii.messaging.adapter.Conversion

XML2Plain Transform.ContentType text/plain;charset=UTF-8

XML2Plain xml.addHeaderLine 0

XML2Plain xml.conversionType SimpleXML2Plain

XML2Plain xml.fieldFixedLengths 86

XML2Plain xml.fixedLengthTooShortHandling Cut

The Audit Log at cc monitoring looks good, everything was done successfully. However the MQ-Admins tell me that the message in the queue doesn't have any content and can not be further processed (XI Setting at JMS Adapter set to Message Payload = JMS Payload). Can anyone help me on resolving this problem?

Thanks in advance,

Nicolas

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Sep 17, 2009 at 08:13 AM

    Hi Nicolas,

    Try this

    XML2Plain Transform.Class com.sap.aii.messaging.adapter.Conversion

    XML2Plain Transform.ContentType text/plain;charset=UTF-8

    XML2Plain xml.addHeaderLine 0

    XML2Plain xml.conversionType SimpleXML2Plain

    XML2Plain xml.recordsetStructure row

    XML2Plain xml.row.fieldFixedLengths 86

    XML2Plain fixedLengthTooShortHandling Cut

    Regards

    Suraj

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hello all,

      thanks a lot for all these helpful posts. Surajs approach worked now, however there was also another problem with MQSeries which has been solved by an MQSeries-Admin (I am not aware of what he did exactly).

      Thanks again,

      Nicolas

  • Posted on Sep 17, 2009 at 08:56 AM

    Hi,

    R u using JMS Content Conversion in Receiver JMS Channel?? if Yes then you need to use messageTransformation bean for to convet Plain to XML and some thind need to be added in JMS CC,refer help.sap.doc.

    cheers,

    raj

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 17, 2009 at 10:03 AM

    Hi,

    Rest everything seems correct except the module key convert_XI2Bin which you have used.

    >SAP XI JMS Adapter/ConvertMessageToBinary convert_XI2Bin

    As per the documentation it should be CallJMSService

    Regards,

    Sarvesh

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.