On 8/14/12 2:26 PM, AlanCota wrote:
>
> Hi folks! How are you doing?
>
> I'm trying to figure out where I can configure the encoding of the
> message sent by IDM via Subscriber to a JMS queue. Of course it is a JMS
> driver and I've tried to do this configuration using some custom
> subscriber channel configuration, but didn't work as well. I also have
> tried to force the UTF-8 encoding inside my XSLT in output channel as
> well, but still didn't work.
>
> This is the XML received in TIBCO JMS queue:
>
> <?xml version="1.0"?>
> <event_message xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:noNamespaceSchemaLocation="WB_PhoneChange.xsd" >
> <event_header>
> <eventCode>EVENT1</eventCode>
> <eventReasonCode>Phone
> Change</eventReasonCode>
> </event_header>
> <event_data>
> <employee_identification>
> <cn>user001</cn>
> </employee_identification>
> <telephoneNumber>99999999</telephoneNumber>
> </event_data>
> </event_message>
>
> I'm supposed to delivery this message, with encoding:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <event_message xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:noNamespaceSchemaLocation="WB_PhoneChange.xsd" >
> <event_header>
> <eventCode>EVENT1</eventCode>
> <eventReasonCode>Phone
> Change</eventReasonCode>
> </event_header>
> <event_data>
> <employee_identification>
> <cn>user001</cn>
> </employee_identification>
> <telephoneNumber>99999999</telephoneNumber>
> </event_data>
> </event_message>
>
> Nothing I've tried get it working... Could you help me sharing any idea
> or thoughts here, please?
>


In IDM XSLT always just outputs directly to DOM, not by serializing, so
the xslutput parameters are pretty much ignored.

Anything to control the encoding would either have to be part of the
driver, (e.g. a driver parameter) which doesn't currently exist, or
explicitly serialized in policy to bytes and wrapped in a jms:message
envelope as base64 encoded data.

But before you go doing that - consider carefully whether you really
need to. If you messages are text, then because actual encoding is
controlled by the messaging system the client on the other end would
have to get that information from the message or the MQ system. If you
message is binary, then per the XML specification the encoding is
assumed to be UTF-8 unless otherwise specified in the XML declaration,
so the explicit declaration is redundant.

--
Shon