-
1. Re: Rest api: unable to unpublish node
rhauch Sep 5, 2012 10:01 AM (in response to gkalabin)1 of 1 people found this helpfulThe "File" object is an instance of java.io.File, which means it should represent a file on the client's file system. Currently having the local file is required.
-
2. Re: Rest api: unable to unpublish node
gkalabin Sep 5, 2012 10:20 AM (in response to rhauch)I tried to create file (and it have been created) and call unpublish of existent file, but result is the same.
-
3. Re: Rest api: unable to unpublish node
rhauch Sep 5, 2012 10:23 AM (in response to gkalabin)Does the Status returned from the 'unpublish' method contain an exception?
-
4. Re: Rest api: unable to unpublish node
gkalabin Sep 5, 2012 10:30 AM (in response to rhauch)Yes, it does. The exception is the same as mentioned in question:
12:53:26,163 ERROR [org.modeshape.web.jcr.rest.client.json.JsonRestClient] (http--127.0.0.1-8080-1) response code=405 method=unpublish
12:53:26,166 ERROR [com.demo.app.Controller](http--127.0.0.1-8080-1) The file "C:\jboss-as-7.1.1.Final\bin\file" could not be unpublished in workspace "workspace1" at path "/repo".: java.lang.RuntimeException: The file "file" could not be unpublished in workspace "workspace1" at path "/repo". -
5. Re: Rest api: unable to unpublish node
rhauch Sep 5, 2012 10:41 AM (in response to gkalabin)1 of 1 people found this helpfulI'm not sure what's going on without more investigation. Can you log a bug in our JIRA system?
Note that the REST Client is merely a (very) simple client-side library for working with the RESTful service, and the REST Client only exposes a subset of the RESTful service functionality. You might consider having your code directly use the RESTful API directly.
-
-
7. Re: Rest api: unable to unpublish node
rhauch Sep 5, 2012 11:12 AM (in response to gkalabin)Thanks for creating the issue. We'll look at it soon.
-
8. Re: Rest api: unable to unpublish node
hchiorean Sep 11, 2012 9:58 AM (in response to gkalabin)Grigory Kalabin wrote:
12:53:26,163 ERROR [org.modeshape.web.jcr.rest.client.json.JsonRestClient] (http--127.0.0.1-8080-1) response code=405 method=unpublish
12:53:26,166 ERROR [com.demo.app.Controller](http--127.0.0.1-8080-1) The file "C:\jboss-as-7.1.1.Final\bin\file" could not be unpublished in workspace "workspace1" at path "/repo".: java.lang.RuntimeException: The file "file" could not be unpublished in workspace "workspace1" at path "/repo".Are you sure HTTP DELETE is enabled on the web server ? (unpublish issues a http delete and the 405 code seems to indicate that http delete is not enabled)
-
9. Re: Rest api: unable to unpublish node
gkalabin Sep 11, 2012 10:03 AM (in response to hchiorean)I'm sure that it's enabled because I can delete a node using http clients (for example, Fiddler)