wm.tn:receive error due to special char

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.


use a substitute for you special character which webMethods does not refer to as a special character while you are sending you data to the TN Receive service. Also check advantage there should be a service pack available as well to get you around this issue.

Hi Pauly,

This malformed exception/error normally happens if the XML document contains special character, in this case ‘&’ (this is also true in Java handling of XML document).

Below might give you an idea:

1: you may want to include a call to stringToDocument with encoding = true to encode all ‘&’.
2: or write a java service to replace the ‘&’ with ‘&’ and other related XML special characters.

Hope this helps.

Kind Regards,

Request your partner to send HTML encoded for spl chars in the xmldata field
values …

to name some:

& to &
to <

The same where you set documentToXMLString (encode=true)