cancel
Showing results for 
Search instead for 
Did you mean: 

Module processing inside Sender File Adapter

Former Member
0 Kudos

Hello,

I am trying to analyze whether I can create a specialized module inside Sender File Adapter. As of right now, the Sender File Adapter and Receiver as well, assume endSeparator character in the end of each record. For files that do not have this field, it is just on continuous string, I assumed I can create an

adapter module

call it BEFORE data in the file is being converted to XML format

Insert 'nl' character (since the record length is fixed)

Call regular adapter processing (converting to/from XML)

However, creating any module inside Sender File Adapter, the payload of the main document is already in XML format. Is there anyway to avoid it?

Thanks for your help,

Dmitriy Mindich

Accepted Solutions (1)

Accepted Solutions (1)

stefan_grube
Active Contributor
0 Kudos

When you want to influence the payload after the conversion to XML, you cannot use the content conversion of the sender file adapter.

Use the content conversion module instead (the same, that you would use in the JMS adapter as well).

Regards

Stefan

Former Member
0 Kudos

Hi Stefan,

But I want to influence the payload before conversion. Assuming my file will look like this

Record1Record2Record3 and etc,

the module will insert new line between each record, thus:

Record1nl

Record2nl

Record3nl

and afterwards the content conversion piece of Sender File Adapter would take over with regular XML parsing!!!!

Is that possible?

stefan_grube
Active Contributor
0 Kudos

It is not possible with the standard functionality.

So maintain the sender file adapter with no conversion, but in the module tab enter following modules:

1. Your module

2. The conversion module (*)

3. The standard module.

(*) for details look here:

Look here:

http://service.sap.com/nw-howtoguides

-> Exchange Infrastructure

-> How To Use the Content Conversion Module in JMS Adapter

Regards

Stefan

Former Member
0 Kudos

Thank you, Stefan.

However, one small question. The API regarding module processing, specifically method getDocument() (concerning main payload of a message) deals only with XMLPayload (reading API).

You dont think it will cause any problems?

Thanks again for your help,

Dmitriy Mindich

stefan_grube
Active Contributor
0 Kudos

> The API regarding module processing, specifically method

> getDocument() (concerning main payload of a message)

> deals only with XMLPayload (reading API).

>

> You dont think it will cause any problems?

No. Look at the sample module. It usually deals with plain text, but uses the class XMLPayload as well.

Regards

Stefan

Answers (0)