Jump to content
We've recently updated our Privacy Statement, available here ×

chakras

Members
  • Posts

    3
  • Joined

  • Last visited

chakras's Achievements

Newbie

Newbie (1/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. Thanks for this tip manzoor.mubashir. I had the same issue with JSON that had me perplexed, XML works fine. For XML I could figure out that 'file' should not be there from source, and I was trying the same structure for JSON without any luck. Converting it to XML worked like a charm.
  2. I could resolve this. For reference all it needed is the correct content-type.
  3. I am trying to upload a resource to Jasper Server using REST API v2. I am sending (HTTP PUT) the 'type' as 'img' or 'jar' or 'prop' as the case may be with the resource descriptor. The file uploads successfully to the server however, the resource type is lost. I get back 'unspecified' See below. Please advise how I can fix this. I do see 'jar' does add the type properly. img/ prop does not. Also, if the resource already exists on the server, I get back a HTTP response code of 200 instead of 201 as documented. Is this the expected behavior? Request: Apr 23, 2014 2:44:17 PM com.sun.jersey.api.client.filter.LoggingFilter logINFO: 2 * Client out-bound request2 > PUT http://localhost:8081/jasperserver-pro/rest_v2/resources/temp/book.properties?createFolders=true&overwrite=false2 > Cookie: $Version=1;JSESSIONID=76FACBE4D641DAE6F8D5E6F2DD9D8068;$Path=/jasperserver-pro/2 > Content-Type: application/json2 > Accept: application/json2 > Content-Disposition: attachment; filename=book.properties{"content":"<REMOVED>","creationDate":"2014-04-23 14:44:17","permissionMask":"0","label":"book.properties","type":"prop","uri":"/temp/book.properties","updateDate":"2014-04-23 14:44:17","version":"0"}Response: Apr 23, 2014 2:44:17 PM com.sun.jersey.api.client.filter.LoggingFilter logINFO: 2 * Client in-bound response2 < 2002 < Transfer-Encoding: chunked2 < Date: Wed, 23 Apr 2014 18:44:17 GMT2 < P3P: CP="ALL"2 < Expires: Wed, 31 Dec 1969 19:00:00 EST2 < Set-Cookie: userLocale=en_US;Expires=Thu, 24-Apr-2014 18:44:17 GMT;HttpOnly2 < Content-Type: application/json2 < Server: Apache-Coyote/1.12 < Cache-Control: private2 < {"version":1,"permissionMask":1,"creationDate":"2014-04-23 14:24:27","updateDate":"2014-04-23 14:44:17","label":"book.properties","description":null,"uri":"/temp/book.properties","type":"unspecified","content":null}Thanks and appreciate any help.
×
×
  • Create New...