Publishing an enocded DT

Hi All,

I has to fetch some record from a database and needs to insert those records in other database using Broker and Trigger, before publishing the records to the broker I have to encode the contents.

In the trigger service I need to decode the contents and then insert it to other database/table.

My question is how to encode the entire document, as far I know we have service to encode a string please let me know whether we have any service to enocode the document or any service to convert the fetched record to bytes so that we can give the bytes as input to encode service.

Please help me ASAP


To encode a document,
----documentToXMLString(set encode paramter to true)
----stringToBytes(set encoding to UTF-8 or whatever)

Now you have the encoded document.

To decode it:
----bytesToString(set encoding to UTF-8 or whatever)
----xmlNodeToDocument(set the documentTypeName to the documentType you have created and makeArrays to false)


Why do you need to encode the data? The results from your DB operation should be an IS document, which you can just map to your publishable document, and just publish that.

Once you have document encoded, then it pretty much becomes gibberish. It’ll become useless to track these in WmMonitor, and you can forget about modify-and-resubmit if you have data problems. Sounds like daily operations will be major headache.