cancel
Showing results for 
Search instead for 
Did you mean: 

XML version encodin gin xml file

Former Member
0 Kudos

Hi All,

This might be a very simple doubt, but I dont have a clue abt it

I have a simple file to file scenario with input xml file as below

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

<Root>

<Field>value</Field>

</Root>

This works fine, but the next few files expected are in a different fashion..as in the encoding is

<?xml version="1.0" encoding="iso-8859-1"?>

<Root>

<Field>value</Field>

</Root>

and another one without any encoding like

<?xml version="1.0"?>

<Root>

<Field>value</Field>

</Root>

Is it possible to process it in PI?..what are the ways to make sure these dont fail at the mapping level?

Pls help me on the above...

Regards,

Teja

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Have u tried with XMLAnonymizer bean in adapter module?

Regards,

Ganesh

Former Member
0 Kudos

Hi Ganesh,

Can u kindly let me know more info on this?

Is it possible to use anonymizer.encoding in sender adapter module tab?

Regards,

Teja

Edited by: Ravindra Teja on Sep 28, 2009 10:29 AM

Former Member
0 Kudos

Hi,

U can have more info : http://help.sap.com/saphelp_nwpi71/helpdata/EN/45/d169186a29570ae10000000a114a6b/content.htm

Also if u r on Pi 7.1 you can try using TextCodepageConversionBean (http://help.sap.com/saphelp_nwpi71/helpdata/EN/45/da2deb47812e98e10000000a155369/content.htm).

Regards,

Ganesh

Answers (3)

Answers (3)

Former Member
0 Kudos

Is the the same for iso-8859-1??

Im unable to see the message in the sxmb_moni under inbound message..it sez xml page cannot be displayed

ne idea on this guys?...

do we always have to provide a namespace , mt and the encoding format in the input xml file?

pls help me out on this

Edited by: Ravindra Teja on Sep 28, 2009 1:12 PM

Former Member
0 Kudos

Hi Guys,

can ne one pls help m eout on this?????

Im still stuck...

I copied the payload from the message mapping and pasted it in the source folder..it runs fine and i get the output xml too..

but the actual xml file comin into XI/PI is of the format

<?xml version="1.0"?>

<Root>

<Field>value</Field>

</Root>

and fails in sxmb_moni...

what should i do now?

Regards,

Teja

Edited by: Ravindra Teja on Sep 28, 2009 7:05 PM

Former Member
0 Kudos

Hi Teja,

Remove the namespace in your message type as mentioned in this blog, then you should get the payload as expected:

/people/sameer.shadab/blog/2005/12/05/how-to-remove-namespaces-in-mapping--xi

Regards,

---Satish

Former Member
0 Kudos

Hi Satish,

Thanks...

what do if the input xml contains encodin gin a format other than utf-8, or if ther eis no encoding specified??

Former Member
0 Kudos

Hi Teja,

The encoding is basically how you read the xml file. Here you asked to remove the namespace in the xml file then I have suggested this. But I think you should not have any issues if you take care with the communication cahnnels.

Regards,

---Satish

Former Member
0 Kudos

hello Satish,

Can u pls let me know..how i can handle it in communication channel??

Thank u

Former Member
0 Kudos

Hi,

you need to use XMLAnonymizerBean in sender channel for the same

and use the parameters available for the same i.e

anonymizer.acceptNameSpace and check the sample provided in the help for the same

http://help.sap.com/saphelp_nw70/helpdata/en/c9/775b3b82646c3ae10000000a114084/frameset.htm

Rajesh

Former Member
0 Kudos

Im on PI 7.1...

Is it possible to use the same bean in 7.1???

as in 7.1 we dont prefix locsl ejb s in the module tab right??

Also, more than the name space..Im skeptical abt the encoding...

Regards,

teja

Former Member
0 Kudos

Thanks guys

Former Member
0 Kudos

Hello,

PI will process that without problem, if the encoding fits to the XMLdata. If no encoding is given, UTF is assumed (UTF-8 or other, depeding on byte order mask)

CSY