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

mala_bond,

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

Now you have the encoded document.

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

HTH
ramesh.

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.