How to get Microsoft Word Mail Merge Template response content type as XML in JAVA using Aspose.Words REST API

We are having Aspose subscription for Cloud API. We use it for creating word and pdf documents based on templates. Since last day we are observing error during executeTemplate API.
On debugging the response we found that the content type sent back is changed from xml to json (earlier it was coming as xml)

Here is our code snippet -

String strURI = " http://api.aspose.com/v1.1"
+ “/words/”
+ templateName
+ “/executeTemplate?withRegions=true&”
+ “cleanup=EmptyParagraphs,UnusedRegions,UnusedFields,ContainingFields&filename=”
+ outputFileName;

// sign URI
String signedURI = Utils.Sign(strURI, appKey, appSid);

InputStream responseStream = Utils.ProcessCommand(signedURI, “POST”,
xmlData, “xml”);
String strJSON = Utils.StreamToString(responseStream);
// The format of strJSON was found to be json whereas the above API call was sent with xml as contentType
InputSource source = new InputSource(new StringReader(strJSON));

// Parse the input document
Document doc = null;
try {
DocumentBuilderFactory factory = DocumentBuilderFactory
.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
doc = builder.parse(source);
} catch (ParserConfigurationException parserConfigurationException) {
LOG.error(
"parserConfigurationException occured while parsing document : ",
parserConfigurationException);
} catch (SAXException sAXException) {
LOG.error("sAXException Exception : ", sAXException);
} catch (IOException iOException) {
LOG.error("IOException Exception : ", iOException);
}

The response is attached - response.txt
As you can see it is not in xml format which was expected and was working till couple of days back.
Is there any change on Aspose side? Are we missing any updates/notifications about this change?
We do not have any communication from Aspose if there is any change in API parameters.

Please guide how to resolve this error.
Account that we use on Aspose - api@risesmart.com

Hi,

We are in communication with our development team and will share more details with you shortly. Sorry for the inconvenience.

Best Regards,

Hi,

Latest changes have been reversed. The issue should be resolved now. Please test at your end and let us know if you still see any issue.

Best Regards,

The issue is still not resolved. I tested it again and found that response still is in json format.
Do we need to download any new SDK or libraries?
Is the change - you mentioned in earlier post - being done and reverted on your cloud application? Please explain how can we resolve this asap.
Not a really nice experience to see things breaking like these on production systems. We chose Aspose from vendors considering it is one of the leaders in this domain and expect high quality and stability of the platform. However thanks for the support so far. Kindly let us know if there is a way to escalate it further in terms of priority.

Hi,

This issue has been logged into our issue tracking system as SAASWEBCORE-2475 and it has highest priority so it will be resolved soon. We will update you as soon as it is resolved. Sorry for the inconvenience.

Best Regards,

The issues you have found earlier (filed as SAASWEBCORE-2475) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

@amujawar

Please note the latest version of the Aspose.Words Cloud API supports to get an API response both in XML and JSON. Secondly, in new version we have further simplified the Mail Merge APIs. Now, same API can be used for both Mail Merge and Mustache templates. Please feel free to contact us for any further assistance in this regard.