wm.tn:receive Error

I am using IS_6-5_SP3, TN 6.5.

When there is ‘&’ in the xml input data to TN, I am getting below error.

Service Name:wm.tn:receive

Error Message
com.wm.app.tn.err.EXMLException: wm.tn.doc:recognize com.wm.app.tn.doc.BizDocTypeException Couldnt get document bytes (0) com.wm.lang.flow.WattEvaluationException: com.wm.lang.xml.WMDocumentException: [ISC.0042.9332] Malformed entity reference:…

Is there a way to set the encoding in TN to avoid this error.

-Pauly

Pauly,

You should be receiving encoded XML in TN, if this is not an option you can always create a gateway service and encode the XML yourself before sending it to TN.

An XML document with an unencoded & in the data is not valid XML. This should be corrected at the source.

A gateway service that tries to fix this error is not a good option. Replacing all & with another character or with & will break properly encoded entities. The right approach is to get the system that is creating the XML to do so correctly.

Hi Pauly,

You didn’t mention whether IS is posting to TN or some other client is posting. FYI, When I got the similar error I followed the below approach (from IS to TN):

documentToXMLString (With encode = true)
wm.tn.doc.xml:recordToBizdoc (with htmlEncode = true)
wm.tn.route:routeBizdoc

And it solved the problem.
Cheers
Guna

Thank you so much for your responses.
“This should be corrected at the source itself.” But the issue here is that we are receiving the xml from a different application which needs an enhancement to do this change which is time consuming and also costs money.

-Pauly

But it is a bug in the source system and creating invalid XML. Working around this bug will also be time consuming and cost money.