Process special characters in XML with Flow Service

I have some special characters in item description element in my xml file. This produced an error when processing this xml file in webMethods.

For example:
<ItemDesc xml:lang=“eng”>AmpliWax &#153 PCR Gem 100</ItemDesc>
The error message is: Element <ItemDesc> is missing end tag…

Anyone encoutered similar situation and can advise on this?


To get rid of this exception set (Encode parameter to “true”)which is in the pub.web:recordToDocument (IS4.6 service) or DocumentToXMLString (IS6.0 service).



I have xmlString come into the following service:

it is failing on xmlNodeToDocument. What encoding should I use in xmlStringToXMLNode?

In xmlStringToXMLNode service specify encoding to “UTF-8” and also set
isXML to “true”


Yes. I did…but the same error message produced…

Actually your receving xml should expect like this

<itemdesc>AmpliWax &#153 PCR Gem 100</itemdesc>

Then only webMethods can parse the xml document and get validated.Please make sure the xml should be html encoded for the special characters like (&,>,<) == (& and > and <).Please make sure this.

And similarly while sending the same XML document contains with special characters (&,<,>) to the outside world
set (encode parameter to “true”)which is in the documentToXMLString service which will show (&,<>).


I tried <itemdesc>AmpliWax &#153 PCR Gem 100</itemdesc> this already. The same error message produced.

The special character here to pass is the trademark. While the html encoding works for html client like IE, not for webMethods. When webMethods receives this xml string, & is not & and it stays the same. Trademark html encoded is &#153. If you change that & to & then the original data is altered and in html client the trademark will not be shown but &#153.

The workaround is to use CDATA section to enclose this and make it unparsed. But this doesn’t seeem to be a not good solution to me.


<itemdesc>AmpliWax &#153 PCR Gem 100</itemdesc>.This worked pretty fine.

Thanks … after the service reloaded, it works fine and thanks so much…

it works fine in webMethods…but…

when the data is presented in IE, the trademark is not shown but &#153.
I believe only & is encoded and not all the special characters. Therefore, this html encoding doesn’t solve the problem in the first place.

I’m facing a problem where an external system (third party vendor) is sending in a request XML to our webMethods IS service called ABC. Basically this service receives an object as input and the structure is as follows:

– etc etc etc…

The problem occurs when there is a special character like &, <,>, " within the XML message sent to ABC via HTTP. The third party vendor provided the XML file they generated before passing to webMethods IS (OutputXML.xml) which I used to test ABC with. Using Developer, I used “Send XML File” to test and it passes through the whole service successfully. However, when the external system passes the same XML via HTTP, it fails at the xmlNodeToDocument step above. The content of the saved pipeline file having the special characters (at custName tag) shows that the strange tags </value> <array name=$xmldataList" type=“value” … were added at the point where the HTML-encoded ampersand was. FYI, I have set makeArrays parameter within that xmlNodeToDocument to false, however the arrays parameter have some values.

One thing I would like to know is, does wM IS automatically do parsing when saving the pipeline to file? Other transactions sent in without special characters have not faced this problem. From OutLookXML.xml it seems that the third party provider is doing the right thing by HTML-encoding the ampersand to & which has lead both the third party vendor and I to a deadlock situation.