cancel
Showing results for 
Search instead for 
Did you mean: 

JMS Adapter: Problem with sending data from XI to MQ

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

former_member187339
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Thanks for your quick replies so far.

@Suraj: I'll try this approach but could you please kindly confirm, that the xml.conversionType should still be SimpleXML2Plain and not be changed to StructPlain2XML?

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi ,

it should be xml.conversionType should still be SimpleXML2Plain only,still u struck with same prob??

cheers,

raj

former_member187339
Active Contributor
0 Kudos

Hi Nicholas,

oops i overlooked it at first place it should be StructPlain2XML

XML2Plain xml.conversionType StructXML2Plain

Regards

Suraj

Former Member
0 Kudos

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

Answers (2)

Answers (2)

Former Member
0 Kudos

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

rajasekhar_reddy14
Active Contributor
0 Kudos

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