Rest V1 API - Update Dashboard - Premature End of file

0

I am trying to update existing dashboard using rest v1 api. I am doing a post to my - http://localhost:8080/jasperserver-pro/rest/resource/public/dashboard2Test. My request using Jasper Server 5.5

I am getting an exception:

org.xml.sax.SAXParseException; Premature end of file.
        at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
        at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
        at com.jaspersoft.jasperserver.rest.services.RESTResource.doPost(RESTResource.java:294)
        at com.jaspersoft.jasperserver.rest.RESTAbstractService.execute(RESTAbstractService.java:109)
        at com.jaspersoft.jasperserver.rest.RESTAbstractService$$FastClassByCGLIB$$c9596599.invoke(<generated>

I also posting my complete request

POST /jasperserver-pro/rest/resource/public/dashboard2Test HTTP/1.1
      Content-Length: 3111
      Content-Type: multipart/form-data; boundary=KUgHr-vCecPKOeg-JjLCwzpRbgpW-Xx9V
      Host: samsh06-w7:8080
      Connection: Keep-Alive
      User-Agent: Apache-HttpClient/4.2.1 (java 1.5)
      Cookie: JSESSIONID=1499F00459E70986E89DDF4AC67AF832
      Cookie2: $Version=1
     --
     KUgHr-vCecPKOeg-JjLCwzpRbgpW-Xx9V
 
     Content-Disposition:form-data; name=ResourceDescriptor
 
     Content-Type:text/plain; charset=UTF-8
 
     Content-Transfer-Encoding:8bit
 
 
     <resourceDescriptor name=dashboard2Test wsType=dashboard uriString=/public/dashboard2Test isNew=false>[\n]
        <label><![CDATA[dashboard2Test]]></label>[\n]
        <creationDate>1391681861000</creationDate>[\n]
        <resourceProperty name=PROP_RESOURCE_TYPE>[\n]
           <value><![CDATA[com.jaspersoft.ji.adhoc.DashboardResource]]></value>[\n]
        </resourceProperty>[\n]
        <resourceProperty name=PROP_PARENT_FOLDER>[\n]
           <value><![CDATA[/public]]></value>[\n]
        </resourceProperty>[\n]
        <resourceProperty name=PROP_VERSION>[\n]
           <value><![CDATA[0]]></value>[\n]
        </resourceProperty>[\n]
        <resourceProperty name=PROP_SECURITY_PERMISSION_MASK>[\n]
           <value><![CDATA[1]]></value>[\n]
        </resourceProperty>[\n]
        <resourceProperty name=PROP_HAS_DATA>[\n]
           <value><![CDATA[false]]></value>[\n]
        </resourceProperty>[\n]
        <resourceDescriptor wsType=dashboardState isNew=false>[\n]
           <creationDate>1391681861000</creationDate>[\n]
           <resourceProperty name=PROP_RESOURCE_TYPE>[\n]
              <value><![CDATA[dashboardState]]></value>[\n]
           </resourceProperty>[\n]
           <resourceProperty name=PROP_PARENT_FOLDER>[\n]
              <value><![CDATA[/public/dashboard2Test]]></value>[\n]
           </resourceProperty>[\n]
           <resourceProperty name=ADHOC_THEME>[\n]
              <value><![CDATA[default]]></value>[\n]
           </resourceProperty>[\n]
           <resourceProperty name=ADHOC_PAPER_SIZE>[\n]
              <value><![CDATA[content]]></value>[\n]
           </resourceProperty>[\n]
           <resourceProperty name=ADHOC_FRAMES>[\n]
              <value><![CDATA[frame_1,com.jaspersoft.ji.adhoc.DashboardContentFrame,dashFrameLeft=40; frame_1,com.jaspersoft.ji.adhoc.DashboardContentFrame,dashFrameTop=33; frame_1,com.jaspersoft.ji.adhoc.DashboardContentFrame,dashFrameWidth=564; frame_1,com.jaspersoft.ji.adhoc.DashboardContentFrame,dashFrameHeight=393; frame_1,com.jaspersoft.ji.adhoc.DashboardContentFrame,dashFrameResourceType=com.jaspersoft.jasperserver.api.metadata.jasperreports.domain.ReportUnit; frame_1,com.jaspersoft.ji.adhoc.DashboardContentFrame,dashFrameResourceName=Test3Report; frame_1,com.jaspersoft.ji.adhoc.DashboardContentFrame,dashFrameSource=%2Fflow.html%3F_flowId%3DviewReportFlow%26viewAsDashboardFrame%3Dtrue%26dashboardViewer%3Dtrue%26reportUnit%3D; frame_1,com.jaspersoft.ji.adhoc.DashboardContentFrame,dashFrameScrollBars=true; frame_1,com.jaspersoft.ji.adhoc.DashboardContentFrame,dashResourceIndex=0;]]></value>[\n]
           </resourceProperty>[\n]
           <resourceProperty name=ADHOC_PROPERTIES>[\n]
              <value><![CDATA[useAbsoluteSizing=true; paperSize=content; dashboardName=dashboard2Test; localDatePattern=yyyy-MM-dd;]]></value>[\n]
           </resourceProperty>[\n]
        </resourceDescriptor>[\n]
        <resourceDescriptor wsType=reference referenceType=reportUnit uriString=/public/Test3Report isNew=false>[\n]
           <resourceProperty name=PROP_REFERENCE_URI>[\n]
              <value><![CDATA[/public/Test3Report]]></value>[\n]
           </resourceProperty>[\n]
        </resourceDescriptor>[\n]
     </resourceDescriptor>
 
     --
     KUgHr-vCecPKOeg-JjLCwzpRbgpW-Xx9V
     --
 
      HTTP/1.1 400 Bad Request
      Server: Apache-Coyote/1.1
      P3P: CP=ALL
      Content-Type: text/xml;charset=UTF-8
      Content-Length: 22
      Date: Fri, 07 Feb 2014 05:44:45 GMT
      Connection: close
 
 
      HTTP/1.1 400 Bad Request
      Server: Apache-Coyote/1.1
      P3P: CP=ALL
      Content-Type: text/xml;charset=UTF-8
      Content-Length: 22
      Date: Fri, 07 Feb 2014 05:44:45 GMT
      Connection: close


Attachments: 
shirish.nist's picture
Joined: Jan 28 2014 - 6:03am
Last seen: 1 year 1 week ago

0 Answers:

No answers yet
Feedback
randomness