Hi
I need to encode special characters like < and > and & and ’ and " in a webMethods service. To test it I have made this simple xml document:
<?xml version="1.0" encoding="utf-8"?>
<main>
<element> here with less than < greater than > ampersant & character simplequote ' dobblequote "</element>
</main>
which I assign to a string variable.
Then I let that string variable be input to the flow service
pub.xml:xmlStringToXMLNode setting encoding = utf-8 and isXML = true
the resulting node is then input to this service
pub.xml:xmlNodeToDocument
where I map the output document to a document Document type.
However in this last step I get this error:
Launch started: 2022-03-02 07:33:34.242
Configuration name: encoding (1)
Configuration location: C:/Users/milun/workspace103/.metadata/.plugins/org.eclipse.debug.core/.launches/encoding (1).launch
com.wm.app.b2b.server.ServiceException: [ISC.0042.9325] Element <element> is missing end tag
at pub.xml.xmlNodeToDocument(xml.java:1037)
Funny thing is, that if I omit the & character from the small XML String value I created so it look like this:
<?xml version="1.0" encoding="utf-8"?>
<main>
<element> here with less than < greater than > ampersant character simplequote ' dobblequote "</element>
</main>
then it works.
Can anyone tell me why and also what to do about it?
Kind regards Mikael
#Integration-Server-and-ESB#webMethods