cancel
Showing results for 
Search instead for 
Did you mean: 

Change of Content-Type with Module MessageTransformBean

Former Member
0 Kudos

Hello,

I am looking at an efficient way of changing the content-type of a received message (e.g. from application/xml to text/xml) by using the module MessageTransformBean.

I know it would be possible with Java Mapping, but if possible I want to avoid that and use a standard module.

I was thinking of using the parameter Transform.ContentType, however the problem is that the parameter xml.conversionType

has to be set too. I do not want to change the message format from flat to XML but just want to change the content type.

Is there any way to achieve with this standard module (maybe by using a dummy value for the xml.conversionType parameter)?

Thank you for your input!

Accepted Solutions (1)

Accepted Solutions (1)

Shabarish_Nair
Active Contributor
0 Kudos

cant you ignore the parameter - xml.conversionType ?

Former Member
0 Kudos

Unfortunately this is not possible. If I do not set the parameter I get the following:

Error initializing conversion routine: 'conversionType' not set

Former Member
0 Kudos

Hi,

If you are using the SOAP receiver adapter, you can change the content type by these configuration parameters:

Module Configuration Parameter HTTP Header Entry Example

XMBWS.XMLEncoding Content-Type charset iso-8859-1

XMBWS.TransferEncoding Content-Transfer-Encoding base64

without the need for an additional module in the chain.

Hope this helps.

Regards,

S. Gokhan Topcu

Shabarish_Nair
Active Contributor
0 Kudos

remove all other parameters and only give Transform.ContentType

have you configured other parameters also?

Former Member
0 Kudos

Hello,

this is what I tried, however then I get the error message mentioned above. Obviously setting the parameter xml.conversionType is mandatory.

I have not set any other parameters.

stefan_grube
Active Contributor
0 Kudos

> this is what I tried, however then I get the error message mentioned above. Obviously setting the parameter xml.conversionType is mandatory.

This is totally new to me.

Which PI version do you use?

Former Member
0 Kudos

This is totally new to me.

Which PI version do you use?

Hi Stefan,

I use version 7.11. I tried it again by just setting the following paramters:

1 Transform.Class com.sap.aii.messaging.adapter.Conversion

1 Transfort.ContentType text/xml;charset=utf-8

However I still get the following error:

Fehler: com.sap.aii.af.sdk.xi.adapter.trans.TransformException: Error initializing conversion routine: 'conversionType' not set

Former Member
0 Kudos

Typing error ?

> 1 Transfort.ContentType text/xml;charset=utf-8

Transform.ContentType...

CSY

Former Member
0 Kudos

Yes, sorry this was a typing error. Still the error is the same.....

Another question from my side:

Maybe it is possible to set a "dummy value" for paramter xml.conversionType.

Is there any documentation or complete list of allowed paramter values available for this parameter? I have only found some examples but not an exhaustive list.

Edited by: Florian Guppenberger on Apr 14, 2010 4:47 PM

stefan_grube
Active Contributor
0 Kudos

> 1 Transform.Class com.sap.aii.messaging.adapter.Conversion

> 1 Transform.ContentType text/xml;charset=utf-8

Shabarish already told you not to use any other parameters besides Transform.ContentType.

Remove the other parameter, that will help.

Answers (1)

Answers (1)

Former Member
0 Kudos

Sorry, got the first answer wrong. I have removed all other parameters and now it works. Thank you all.

Edited by: Florian Guppenberger on Apr 14, 2010 5:14 PM

Shabarish_Nair
Active Contributor
0 Kudos

Former Member
0 Kudos

Hello,

In the parameters you added first,

The issue comes from parameter Transform.Class

in version PI 7.11 that is com.sap.aii.af.sdk.xi.adapter.Conversion.

Kind Regards.

E. Koralewski