In this article I would like to provide you with the sample of actions that should be done to upload Domain to JasperReports Server with restclient by utilizing Multipart body approach and POST request.
To illustrate my example I will use Restclient.
Restclient is a free, third party tool which can be downloaded from: https://code.google.com/p/rest-client/
In the test environment I use version 3.2.1 of the WizTools REST Client: https://code.google.com/p/rest-client/downloads/detail?name=restclient-ui-3.2.1-jar-with-dependencies.jar&can=1&q=
Note: I have found that later versions of the REST Client (such as 3.4.2) have an issue setting the content types in multi-part requests. The error message will read, "The value 'text/plain' for parameter 'resource Media-Type' is invalid." Please use an earlier version if you encounter this. I have confirmed that 3.2.1 and 3.2.2 correctly set the content-type.
In this acticle I will provide you with the screenshots which can help you to test this approach in your environment.
Information that should be filled in:
Method tab:
Body tab:
Auth tab:
You also need to add meta information (resource) which describes your domain resource:
Please find in the attachment to the article:
schema.xml - xml definition of the Domain that is described in this article
securityFile.xml - security schema that is used in this domain to grant and restrict access to information in the test domain
Best regards,
Alex
Recommended Comments
There are no comments to display.