Create a Thing that accepts XML
To work with a third party system I'd like to implement a Thing that allow XML to be POSTed to a service that I define
For example id like the URL to be .../Thingworx/Things/workGateway/Services/workOrder
And to be able to call the service using the content loader
var request = <request>
<workorder>
<WOEXTID>123</WOEXTID>
</workorder>
</request>;
var params = {
url: '.../Thingworx/Things/workGateway/Services/workOrder' /* STRING */,
content: request /* XML */
};
var responce = Resources["ContentLoaderFunctions"].PostXML(params);
result = responce..*::status;
Now I could implement this as:
.../Thingworx/Things/workGateway/Services/workOrder?method=POST&value= <request><workorder><WOEXTID>123</WOEXTID></workorder></request>
And this superficially works for the trivial case above if I use the actual XML from the third party system then I get a 400 Bad Request error when creating a URL in chrome or the PostMan REST plugin for chrome.
If does work however if I use the Thingworks built in test function. I have tried Linarizing the XML and appling HTML escaping the XML
Does anyone have any suggestions on how the call the method using a non-trivial amount of XML (the actual XML is >6kloc) or how to accept a XML content.
Message was edited by: Graham Allan Changed 400 Bad Gateway to 400 Bad Request - The correct message

