I have a lotusscript agent which has a url address. This agent normally receives a POST with a String value which contains an XML. This string will be converted to a XML, we will parse the XML and eventually send a XML in string back. This is a piece of the code of the Lotusscript agent where we send the response (in XML) back:
Print {content-type:text/xml;charset=utf-8} Print returnXMLWhereby the returnXML has a XML which is built up for example like this:
returnXML = “<?xml version=”“1.0"” encoding=““UTF-8"”?>”
returnXML = returnXML + DTD
returnXML = returnXML + “<cXML timestamp=”“” +cxmlTimestamp + “”" payloadID=“”" + payloadID +“”“>”
returnXML = returnXML + “<Response>”
…
returnXML = returnXML + “</cXML>”
But whenever someone does a Post, instead of the XML they see:
<html>
<head>
</head>
<body text="#000000">
Start goodreceipt agent
Save GR cxml
GR is processed
content-type:text/xml;charset=utf-8
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE cXML SYSTEM 'http://xml.cxml.org/schemas/cXML/1.2.043/cXML.dtd'><cXML timestamp="2020-06-25T02:33:34+05:30" payloadID="24234234"><Response><Status code="200" text="OK" /></Response></cXML>
</body>
</html>
So they see also other print statements and next to that:
Print {content-type:text/xml;charset=utf-8}
Must set the content headers and must not be printed as a print statement.
Any advice how to correct this?