Jump to content
We've recently updated our Privacy Statement, available here ×
  • How to: upload Domain to JasperReports Server with RestClient by utilizing Multipart body approach and POST request


    akonkin
    • Features: Domains, JasperReports Server, Web Services Version: v5.6.1 Product: JasperReports® Server

    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:

    MethodTab.jpg.8656c7e852ab2a9accbd311725d7eb08.jpg

    Body tab:

    BodyTab.jpg.d3155790cf28fc826294d95c17f68884.jpg

    Auth tab:

    AuthTab.jpg.73144a1f86e2b254aba1cf1e880cc30d.jpg

    You also need to add meta information (resource) which describes your domain resource:

    resource.jpg.43671d8ceda1f01a569cb6c3ed2347ca.jpg

     

     

    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

     

     

     

    MethodTab.jpg.1fe9b7e892ae1809b2d89cd281cbbe74.jpg

    BodyTab.jpg.36f1616f63724e6424fb935320a7e6e0.jpg

    AuthTab.jpg.16b55502ecc343c7ac6dbd8ff7d84c8c.jpg

    resource.jpg.e8f2d8a7cc074c80a822bbb0d4789ce3.jpg

    schema_0.xml

    securityfile.xml


    User Feedback

    Recommended Comments

    There are no comments to display.



    Guest
    This is now closed for further comments

×
×
  • Create New...