cancel
Showing results for 
Search instead for 
Did you mean: 

XML encoding "UTF-8" ignored

0 Kudos

HI all,

we try to post an XML message (cXML invoice) to a receiver but it doesn´t work.

We use a communication channel "http-destination" where we configure content-type "text/xml" together with XML encoding "UTF-8".

The configured URL works fine and can be tested in SM59.

The XML payload itself has a declaration <?xml version="1.0" encoding="UTF-8"?>

but the strange thing that happens is that all these declarations are being ignored and instead US-ASCII is used. Which leads to an error due to some special german characters within the contents of the XML (e.g. ä, ö, etc.).

Does anybody of you know how I can achieve that the pre-set UTF-8 will be used as encoding type???

Many thanky in advance!

Willi Wuerstlin

Accepted Solutions (0)

Answers (4)

Answers (4)

0 Kudos

Hi,

this part of the problem is solved.

Thanks a lot!

Willi

0 Kudos

some more information:

we configured an HTTP receiver adapter on XI 3.0 which calls a connection stored in SM59.

Within the adapter the content type is specified as "text/xml" and payload manipulation as "UTF-8".

As I mentioned within the payload we configured the document as

In the cXML (ARIBA) implementation guide there is a note by IETF

http://www.ietf.org/rfc/rfc2376.txt

where it is stated that the default encoding for media type text/xml is US-ASCII, and not UTF-8.

But I have configured the encoding explicitly in the adapter as UTF-8...

Thanks,

Willi

udo_martens
Active Contributor
0 Kudos

Hi Willi,

what can you do at XI when the receiver is weak? Nothing

May be XSL can help: write a stylesheet with


<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes" encoding="US-ASCII" omit-xml-declaration="yes" />
<xsl:copy-of select="*"/>

Regards,

Udo

Former Member
0 Kudos

Hi.

I am trying to map the standard cXML invoice to SAP's standard idoc INVOIC01 - This is how the file looks like

<?xml version="1.0" ?>

<!DOCTYPE cXML SYSTEM "http://xml.cXML.org/schemas/cXML/1.2.014/InvoiceDetail.dtd">

<cXML version="" payloadID="2008-07-29T04:51:08-06:00.cXML.TEST4101V002" timestamp="2008-07-29T04:51:08-06:00" xml:lang="en-US">

<Header>...</Header>

...</cxml>

I am having problem with the line <!DOCTYPE cXML SYSTEM "http://xml.cXML.org/schemas/cXML/1.2.014/InvoiceDetail.dtd"> - when the payload is having this line XI is not accepting the message.

Please let me know how to address this.

Thanks.

udo_martens
Active Contributor
0 Kudos

Hi Willi,

can u explain:

>>>> instead US-ASCII is used

Who is using that? As i understand u, the adapter gets a xml message coded with UTF-8, what is changed there?

>>>we try to post an XML message (cXML invoice) to a receiver

Do you use http receiver adapter?

Can look to the message after mapping? SXMB_MONI / Request mapping. Which encoding do you have there?

Regards,

Udo

stefan_grube
Active Contributor
0 Kudos

Are you sure, that the receiver is able to deal with UTF-8?

I have no idea, where the US-ASCII comes from, seems to be the default setting of the receiver.

Regards

Stefan