Free Support Forum - aspose.cloud

Clouds words api is giving 403 error

I am having problem in clouds words api
in cleanup parameter
cleanup=UnusedRegions,UnusedFields
this is giving 403 error

http://api.aspose.com/v1.1/words/modern.doc/executeTemplate?cleanup=UnusedRegions%2CUnusedFields......

This message was posted using Email2Forum by Tahir Manzoor.

Hi Shridhar,


Thanks for your inquiry. I suggest you please read the following documentation link for your kind reference.
http://www.aspose.com/docs/display/wordscloud/executeTemplate+Resource
http://www.aspose.com/docs/display/wordscloud/Execute+Mail+Merge+Template

The cleanup parameter should be separated by “,”.
http://api.aspose.com/v1.1/words/modern.doc/executeTemplate?cleanup=ContainingFields,UnusedFields

Please make sure that you have generated the request URL correctly.

If you still face problem, please share your document along with XML data here for testing. I will investigate the issue and provide you more information.


hi thanks for quick replay. But I am still facing problem. I am posting my java code and xml data here.

private static void restMerge() throws Exception
{
String appSID = APP_SID;
String appKey = APP_KEY;
String fileName = “modern.doc”;
String outputPath = “C:\Users\Shridhar\Desktop\ResumeBulder\testMergeOutputLatest.doc”;

//Use the following line to use API version 1.1
//ContainingFields,UnusedRegions

String strURI = “http://api.aspose.com/v1.1/words/” + fileName +
“/executeTemplate?cleanup=ContainingFields,UnusedRegions&filename=myOutputFile.doc”;

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


String strXML = FileUtils.readFileToString(new
File(“C:\Users\Shridhar\Desktop\ResumeBulder\resumeDataset.xml”));
InputStream responseStream = Utils.ProcessCommand(signedURI, “POST”, strXML, “xml”);
String strJSON = Utils.StreamToString(responseStream);
System.out.println("json: " + strJSON);
InputSource source = new InputSource(new StringReader(strJSON));

//Parse the input document
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
javax.xml.parsers.DocumentBuilder builder = factory.newDocumentBuilder();
org.w3c.dom.Document doc = builder.parse(source);
NodeList nodes = doc.getElementsByTagName(“FileName”);
String DocName = nodes.item( 0 ).getChildNodes().item(0).getNodeValue();
System.out.println("DocName: " + DocName);
//build URI
strURI = “http://api.aspose.com/v1.1/words/” + DocName + “?format=doc”;
//sign URI
signedURI = Utils.Sign(strURI, appKey, appSID);
//get response stream
responseStream = Utils.ProcessCommand(signedURI, “GET”);
Folder.SaveStreamToFile(outputPath, responseStream);
responseStream.close();
}


<?xml version="1.0" encoding="utf-8"?>



23
Nelson Street
Howick
Auckland

543 1234
03/01/2010
14.00

BBQ Chicken Pizza
6.00
1
6.00


1.5 Litre Coke
4.00
2
8.00




10
Parkville Avenue
Pakuranga
Auckland

548 7342
05/03/2010
6.00

Hawaiian Pizza
4.00
1
4.00


Fries
1.00
2
2.00



Shridhar


Hi Shridhar,


Thanks for sharing the detail. Could you please also send your App SID and Key to me by following the instructions at http://www.aspose.com/corporate/purchase/faqs/send-license-to-aspose-staff.aspx to analyze this issue?

Hi Shridhar,


Thanks for sharing the detail. I have tested the scenario and have found that you are using URL-encoding for comma (,) which is %2C. The cleanup parameter should be separated by “,”. Please use comma (,) instead of %2C.

Please let us know if you have any more queries.

Hi Shridhar,


Shridhar1:
… … …

//build URI
strURI = “http://api.aspose.com/v1.1/words/” + DocName + “?format=doc”;
Further to my last post, I have noticed that you are using ‘convert’ Resource to download the output document. If you do not want to convert the ‘myOutputFile.doc’, please do not use ‘convert’ Resource. I suggest you please use the code shared here to download a particular file from the Aspose cloud Storage.

Hi Shridhar,

Thanks for your inquiry via email.

I have tested the scenario and have managed to reproduce the same issue at my side. For the sake of correction, I have logged this problem in our issue tracking system as SAWEB-39. We will update you via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Any update on this??

Hi Shridhar,

Thanks for your inquiry. I would like to share with you that issues are addressed and resolved based on first come first serve basis. Currently, your issues is pending for analysis and is in the queue. We will update you via this forum thread once there is any update available on your issue.

Thank you for your patience.

Hi Shridhar,

Thanks for your patience.

We have fixed the SAWEB-39 and have updated the Java SDK of Aspose Cloud. Please download the SDK from here and let us know how it goes on your side. Hope this helps you.

Thanks for fixing this. Its working fine now.