cancel
Showing results for 
Search instead for 
Did you mean: 

Change encoding from utf-8 to iso-8859-1 in JMS receiver!

Former Member
0 Kudos

Hi.

I have some problems regarding encoding.

The simple setup: dummy datatype as input, XSLT mapping and standard XI output(to JMS).

Are there any way to tell the JMS adapter to deliver the message in iso-8859-1 and not utf-8?

Regards Peter

Accepted Solutions (0)

Answers (2)

Answers (2)

bhavesh_kantilal
Active Contributor
0 Kudos

Peter,

Refer to the Page 9 in this doc.

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f02d12a7-0201-0010-5780-8bf...

<b>XML2Plain Transform.ContentType text/plain;charset=iso-8859-1</b>

Try this in your JMS adapter.

Regards,,

Bhavesh

henrique_pinto
Active Contributor
0 Kudos

It's strange because JMS treats the message as binary. It should not convert it's content (differently of Soap adapter, which converts to UTF-8 per default, but you can use iso-8859-1 instead). That's why JMS adapter doesn't have an explicit way of setting the encoding.

Try XSLT a mapping with MessageTransformBean in JMS module processor tabs (it must be between a "convert binary to message" and a "convert message to binary" modules.

Regards,

Henrique.

Former Member
0 Kudos

Hi Henrique.

This sounds like an idea. Can you guide me to some documentation, that describes adding mapping in the jms adapter module?

Regards Peter

Former Member
0 Kudos

Hi Bhavesh.

Im not trying to make a plain message, but a regular in XML. The problem is the special characters!

Regards Peter

bhavesh_kantilal
Active Contributor
0 Kudos

Peter,

I had not tried using these modules , but , I thought using the module only to change the Encoding schema should be possible.

Did you try to use the Module to just change the encoding schema by using that paramter? Does it not work?

Regards,

Bhavesh

Former Member
0 Kudos

Bhavesh.

Unfortunately all parameters are mandatory (referring to page 9 in the howto use...). You are not able to change the encoding by using just the one parameter!

Regards Peter

bhavesh_kantilal
Active Contributor
0 Kudos

Peter,

If using XSLT is not working, then one more option you can try is to develop a custome module and then change the encoding schema in this module,

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/02706f11-0d01-0010-e5ae-ac2...

Also, when you are using XSLT , and you have changed the encoding, did you check the payload in MONI.. what is the Encoding? Also, did you check the SOAP payload in the MDT . What is the encoding?

Regards,

Bhavesh

henrique_pinto
Active Contributor
0 Kudos

> Hi Henrique.

>

> This sounds like an idea. Can you guide me to some

> documentation, that describes adding mapping in the

> jms adapter module?

>

> Regards Peter

To use modules in JMS adapter: http://help.sap.com/saphelp_nw2004s/helpdata/en/0f/80243b4a66ae0ce10000000a11402f/frameset.htm

Now, you add the MessageTransforBean module, to use the XSLT mapping. Check the end of this blog to learn how to use XSLT mapping on MessageTransformBean: /people/michal.krawczyk2/blog/2005/11/01/xi-xml-node-into-a-string-with-graphical-mapping

Regards,

Henrique.

Former Member
0 Kudos

Hi Henrique.

Thanks for your very helpfull answer. I can use this for alot more than just this problem

Regards Peter

henrique_pinto
Active Contributor
0 Kudos

Peter,

glad I could help.

Regards,

Henrique.

former_member206604
Active Contributor
0 Kudos

Hi,

You can change the encoding format in the XSLT mapping.

Thanks,

Prakash

Former Member
0 Kudos

Hi Prakash.

I did that allready, with no success.:

<xsl:stylesheet version="1.0" ......>

<xsl:output method="xml" encoding="iso-8859-1" indent="yes"/>

............

............

............

</xsl:stylesheet>

When reading the message on MQ, it still refers to utf-8, and the special characters are not correct!

Regards...

Peter