cancel
Showing results for 
Search instead for 
Did you mean: 

problems with MessageTransformBean SimpleXML2Plain

Former Member
0 Kudos

Hi folks!

We have a PI 7.31 SP6 and I try to use the MessageTransformBean in a File Receiver Adapter (Metadata as of 7.11) to transform XML to flat data.

XML looks like this:

Root tag and then ...

onlz one Tag franz that contains: 123456789abcdefghijklmnopqrstuvwxyz

Expected Result in receiver file is:

123456789abcdefghijklmnopqrstuvwxyz

Module Configuration is as follows:

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.endSeparator 'nl'

XML2Plain xml.fieldSeparator ;

Real result is an empty file of length 1.

Part of Message Protocol:

Zustellung an Kanal: SAPERP100_PoC_MQ_PI_201312_File_Receiver

Transform: using Transform.Class: com.sap.aii.messaging.adapter.Conversion

MP: processing local module localejbs/AF_Modules/MessageTransformBean

Transform: transforming the payload ...

Transform: successfully transformed

File-Adapter-Empfänger eingegeben. Verarbeitung gestartet. Benötigte QoS: ExactlyOnce

MP: processing local module localejbs/CallSapAdapter

Empfängerkanal SAPERP100_PoC_MQ_PI_201312_File_Receiver des File-Adapters: Verarbeitung beginnt; Partner " " / Service "SAPERP100Dev"

Schreiben in Datei "/FTPSAP/EX1/001/PI/000_TRAIN/PoCMQPI_201312_OUTPUT/mq20131212-164535-398.xml" als binär, Größe 1 Bytes

Dateiverarbeitung beendet

Message wurde erfolgreich zum Endpunkt  übertragen über JMS_http://sap.com/xi/XI/System

Message-Status auf DLVD gesetzt

What's going wrong here?

Thanx!

Regards,

Volker

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

>>Root tag and then ...onlz one Tag franz

Ur MTB parameters looks OK to me, but I think the problem is with ur structure. Try with below structure and then test?

<MT_Name>

<row>

<franz>ABC</franz>

</row>

</MT_Name>

Thanks

Amit Srivastava

Former Member
0 Kudos

HI Amit!

SOunds good. I'll try it on Tuesday, when I'm back again.

Regards,

Volker

Former Member
0 Kudos

Hi Amit!

Thanx very much. It worked just by adding an intermediate tag:

<mt_name>

    <data>

          <franz>hello world</franz>

    </data>

</mt_name>


Regards,

Volker

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Volker,

The target structure that you have is a simple one. I think you are missing some of the parameters during module configuration.

1. xml.documentName

2. xml.fieldNames

3. xml.processFieldNames

4. xml.structureTitle


Pls visit the link below for reference:

Examples of Content Conversion Using MessageTransformBean (SAP Library - SAP Exchange Infrastructure...



Regards,

Partha

Former Member
0 Kudos

LIke already mentioned ... these additional parameters are eligible for a sender channel but not for a receiver channel. See your own link and then scroll down to the description of scenario SimpleXML2Plain ...

Former Member
0 Kudos

Hi Volker,

Yes, you are correct. Can you pls check the value of the parameter 'xml.fieldSeparator'.

Thanks

Partha

Former Member
0 Kudos

HI Partha!

Thanx for ASAP reply. The parameter is set to ";" without any quotes.

Regards,

Volker

Former Member
0 Kudos

Hi Volker,

You mentioned its file receiver channel but error log says JMS.

"Message was successfully transferred to the endpoint over JMS_http 😕 / sap.com / xi / XI / System"

Check if you are referring to correct channel log. Pass an xml with two tags and test it once.

Regards,

Pranav

Former Member
0 Kudos

HI Pranav!

The JMS is the sender channel. JMs works fine, but the file receiver makes the trouble I described. The scenario works perfectly fine without the MessageTransformBean creating a correct XML file in the receiver channel's target directory, but that's not what I need. I need a plain target file without any XML around the payload.

Sorry!

;-((((((

Regards,

Volker

Former Member
0 Kudos

Hi,


I think parameter recordsetStructure is missing...


Regards,


Carme.

Former Member
0 Kudos

HI Carme!

Did already try it ... and several other combinations also.

Dispite from this we are talking about a receiver channel and not a sender channel. That is the PI knows the structure of the XML file very well. And all samples I found in the internet - including official SAP documentation - say, the parameters I've provided should be sufficient.

;-(((((

Regards,

Volker