Jump to content

Receiving \'Premature end of file.\' when creating a simple file resource


spierepf

Recommended Posts

Greetings,

I am trying to create a simple file resource using the REST API provided by JasperReports Server. Here is the request I am sending, and the response I am receiving:

POST /report/rest/resource/ HTTP/1.1Host: localhost:8080Accept: */*; q=0.5, application/xmlAuthorization: Basic c3VwZXJ1c2VyOnN1cGVydXNlcg==Content-Type: multipart/form-data; boundary=550854Accept-Encoding: gzip, deflateContent-Length: 315--550854Content-Disposition: form-data; name="ResourceDescriptor"<resourceDescriptor name="file_test" uriString="/file_test" wsType="img">  <label>REST created resource</label></resourceDescriptor>--550854Content-Disposition: form-data; name="/file_test"this is the content of the file--550854--

and this is the response:

HTTP/1.1 400 Bad RequestServer: Apache-Coyote/1.1Set-Cookie: JSESSIONID=5DA46D965D0410186DABF835FC7B8BC0; Path=/report/; HttpOnlyContent-Type: text/xml;charset=UTF-8Content-Length: 22Date: Mon, 18 Jun 2012 20:36:27 GMTConnection: closePremature end of file.

Has anyone had any success creating file resources using the REST service?

 

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...