Hi all, I'm trying to work with the REST API with wget.
 All time I try GET HTTP all is right but when I try the HTTP POST, I get
ERROR 415: Unsupported Media Type.
 One example:
 #wget -v --post-data="namespace=Work"
http://localhost:8080/fedora/objects/Work:25

 and I get:
--12:18:47--  http://localhost:8080/fedora/objects/Work:25
           => `Work:25'
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:8080... connected.
HTTP request sent, awaiting response... 415 Unsupported Media Type
12:18:47 ERROR 415  Unsupported Media Type.

I also tried Open Poster Firefox Plugin, and the result is the same:
The server refused this request because the request entity is in a format
not supported by the requested resource for the requested method ()

Other examples with another functions fail too, I always get an ERROR 415
I used Fedora 3.1 with Tomcat and I had to add to web.xml:
    <servlet-mapping>
      <servlet-name>RestServlet</servlet-name>
      <url-pattern>/objects/*</url-pattern>
    </servlet-mapping>

To make REST API work. ¿what I'm doing wrong?
Thanks.
------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Fedora-commons-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users

Reply via email to