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

about REST service from C#.Net


wuyuwei

Recommended Posts

hello guys,

 

I reference below


 

my server is jasperreports-server-cp-5.6.0

my report name is "ttt"

it  path is "root/reports/"

 

                            WebClient httpclient = new WebClient();

                            //Basic Auth

                            httpclient.Credentials = new NetworkCredential("jasperadmin", "jasperadmin");

                            httpclient.Headers.Add("Content-Type", "application/x-www-form-urlencoded");

                            // Build resourceDescriptor

                            string requestXml = "";

                            requestXml += "<resourceDescriptor name="ttt" wsType="reportUnit" uriString="/reports/ttt"";

                            requestXml += " isNew="false">";

                            requestXml += "</resourceDescriptor>";

                            // Send PUT

                            string requestAllResult = httpclient.UploadString("http://localhost:8080/jasperserver/rest_v2/reports/reports/ttt.HTML", "PUT", requestXml);

                           

when execute the   string requestAllResult = httpclient.UploadString(".....

I get error Message is 405 UnsupportedHttpVerb

how should  I do to solve it?

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

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