cancel
Showing results for 
Search instead for 
Did you mean: 

Converting File Content.Unexpected XML format

Former Member
0 Kudos

Hello,

I need to convert file content in File Receiver Adapter.

In my opinion, i have unexpected XML format of a payload message. (At least, the format does not contain a structure element):

That is,

I have the XML message:

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

<ns0:MT_BW ID="123" BirthDay="20/03/1969" Title="consultant" Name="John" LastName="Smith" xmlns:ns0="http://sap.com/xi/BASIS"/>

I need to convert it into plane text format with fieldseparator.

How to convert this xml message into plane text format if it does not contain any structure elements (that is, <struc1> <field1>value</field1> </struc1>) according to help guide?

How should i configure RecordSet in File Adapter?

I am confused.

Thank you

Accepted Solutions (1)

Accepted Solutions (1)

justin_santhanam
Active Contributor
0 Kudos

Igor,

Are u getting the format from the source?

<ns0:MT_BW ID="123" BirthDay="20/03/1969" Title="consultant" Name="John" LastName="Smith" xmlns:ns0="http://sap.com/xi/BASIS"/>

If yes, then create one more data type with structure

<Record>

<ID/>

<BirthDay/>

<Title/>

<Name/>

<LastName/>

</Record>

And do direct mapping. So now you can easily configure the content conversion for the target format isn't it?

Its my thought, I don't know whether its feasible for you or not..

raj.

Former Member
0 Kudos

Thanks,

Yes, the XML message is a source message.

What does it mean "then create one more data type with structure".

Where must i create this data type? You say about creating receiver data type in IBuilder or IConfigurator?

Former Member
0 Kudos

Hi,

Create a data type on outbound side for accepting incoming message structure in XI. This should provide appropriate message structure with tags. Once you have done this, using direct mapping target structure could be obtained.

Bhavish

justin_santhanam
Active Contributor
0 Kudos

Igor,

I gave the structure for Inbound message. Yes create the structure in IR. And map them dicrectly . I mean with your structure and structure I proposed.

raj.

Former Member
0 Kudos

Thanks to all !

Yes, indeed. I was to fulfill a correct procedure of creating inbound message type.

My mistake was uncorrected type for "type" field of main data type name . This field was defined as xsd:string and i cannot create "Subelement" for main data type (it was grey). This field should be blank and then i could create correct structure.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Where are you getting XML source message from?

As Raj pointed out, it looks like a mapping problem and not content conversion problem. Since you need to perform content conversion on receiver side, try to get appropriate structure as output of mapping. That should ease the content conversion task automatically.

Bhavish