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

WebServicees


gr33nhat
Go to solution Solved by marianol,

Recommended Posts

Hey everybody,

right now I'm trying to use the webservice functions from jasperserver (ce).

but if I try to use this http string :

http://localhost:8082/jasperserver/rest/login?j_username=jasperadmin&j_password=jasperadmin

I get this failure message:

The XML page cannot be displayed
Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.

--------------------------------------------------------------------------------

XML document must have a top level element. Error processing resource 'http://localhost:8082/jasperserver/rest/login?j_user...

 

and if I wanna use

http://localhost:8082/jasperserver/rest_v2/reports/samples/AllAccounts/inputControls/

I get this one.

  <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
-
  resource.not.found
  Resource URI:/samples/AllAccounts Type:com.jaspersoft.jasperserver.api.metadata.common.domain.InputControlsContainer not found
-
  URI:/samples/AllAccounts Type:com.jaspersoft.jasperserver.api.metadata.common.domain.InputControlsContainer
 
 

 

could anyone hel me, please?

greetings benedikt

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

  • Solution

1) The fist one is not an error is just your browser telling you that it cannot display the XML response for the REST web service.

2) the second one is also not an error is just the response from the web servie, you are actually asking for an Input Controls (IC) of a report that does not have any ICs , try requesting for the Employee Accounts report that one has ICs to show. Also if you ask for the report resource descriptor it will actually tell you if the report does indeed have ICs

REST web services are ment to be use from another application which can handle the requests and act acordingly, there are really good browser plugins that help you doing this tests, try this one for Firefox or this one for Chrome. 

Link to comment
Share on other sites

  • 1 year later...

I'm using Jasperreport server 5.5.0 community edition. I'm sending thi data 

<resourceDescriptor name="Employees" wsType="reportUnit" uriString="/reports/Samples/Employees" isNew="false"><label>Employees</label><description>Employees Report</description><creationDate>1302268918000</creationDate><resourceproperty name="PROP_PARENT_FOLDER"><value>/reports/samples</value></resourceproperty><resourceproperty name="PROP_VERSION"><value>2</value></resourceproperty><resourceproperty name="PROP_RESOURCE_TYPE"><value>com.jaspersoft.jasperserver.api.metadata.jasperreports.domain.ReportUnit</value></resourceproperty><resourceproperty name="PROP_RU_ALWAYS_PROPMT_CONTROLS"><value>false</value></resourceproperty><resourceproperty name="PROP_RU_CONTROLS_LAYOUT"><value>0</value></resourceproperty></resourceDescriptor>[/code]

to server with rest api. I'm gettin error Resource /reports/Samples/Employees of type com.jaspersoft.jasperserver.api.metadata.common.domain.InputControlsContainer not found.

what can i do

code : c#

string requestAllResult = httpclient.UploadString("http://localhost.:8080/jasperserver/rest/report/reports/samples/Employees?RUN_OUTPUT_FORMAT=PDF", "PUT", requestXml.ToString());

 

Link to comment
Share on other sites

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...