on 05-24-2016 8:41 AM
Hi,
In my Idoc ->PI -> JMS RabbitMQ scenario I receive a message in Rabbit MQ with content_type: application/octet-stream.
The receiver party wants an application/xml as content_type.
How can I set the receiver JMS adapter to achieve this.
Message was edited by: Meinhart Lingbeek I succedded to change the header of the JMS message by configure in the ASMA the specific additional : with for example : Content_type : with in the Module tab :
Hi Meinhart,
you can also use the MessageTransformBean in the module processor with the following parameter set: Transform.ContentType - application/xml
Please also read this documentation :
Inserting MessageTransformBean in Module Processor - SAP NetWeaver Process Integration - SAP Library
Best Regards,
Viktor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried that option. the content_type of the document stays application/octet-stream.
The current configuartion is :
I have to use the number 3 and 4. As soon the message turns Binary the content type is transformed to octet.
Question stays: How can I change the property content_type.
Thanks
for your respond.
Hello Meinhart and Viktor,
I don't think it is possible to overwrite or adjust message content_type from adapter / adapter modules level. I looked into JMS library provided for RabbitMQ, and there found a class that is used to generate AMQP/JMS messages (RMQMessageProducer). Having fast look into its implementation, observations drive me to a conclusion content_type is hard-coded and is not propagated from any configuration parameter:
There is a header property 'contentType' (also seen on your screenshot with value assigned 'application/xml' following configuration of the communication channel) that you may make use of in a consumer application when processing the message and verifying what kind of content is contained in it. Will that be feasible for the consumer?
Regards,
Vadim
Hi Meinhart,
If the consumer application needs to check content type, then, in my opinion, solution suggested above would be probably the most straightforward and transparent since the message will contain required content type in its header that can be used by a consumer (and that can be flexibly configured and set in PI). Or do you have any concerns regarding its applicability to your particular scenario?
Regards,
Vadim
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.