SAXParseException while making a POST call in thingworx
Hi,
I am new to Thingworx. I am trying to make a post rest call from thingworx. Here is the script that I have written in the service of a thing.
var result = null;
var params = {
//proxyScheme: undefined /* STRING */,
//headers: undefined /* JSON */,
//ignoreSSLErrors: undefined /* BOOLEAN */,
//useNTLM: undefined /* BOOLEAN */,
//workstation: undefined /* STRING */,
//useProxy: undefined /* BOOLEAN */,
//withCookies: undefined /* BOOLEAN */,
//proxyHost: undefined /* STRING */,
url: Things["Windchilldemo1"].getRestUrl() + "/bac/import" /* STRING */,
content: "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><BACSpec xmlns=\"http://www.ptc.com/bac\"><Profile><name>newProfile</name></Profile></BACSpec>",
//timeout: 60 /* NUMBER */,
//proxyPort: undefined /* INTEGER */,
//password: undefined /* STRING */,
//domain: undefined /* STRING */,
//username: undefined /* STRING */
};
result = Resources["ContentLoaderFunctions"].PostXML(params);
At server side I have jaxb implementation for the XML structure. But it does not hit the url.
I am getting the following error.
Wrapped org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 10; DOCTYPE is disallowed when the feature "http://apache.org/xml/features/disallow-doctype-decl" set to true. Cause: DOCTYPE is disallowed when the feature "http://apache.org/xml/features/disallow-doctype-decl" set to true.
Is the value for "content" converted to JAVA object on server side?
Please guide me to resolve this issue.
Thanks in advance.

