Problem using put

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem using put

Ryan Puddephatt
All,
    Whilst using the put method for the Exists REST API I got the follow exception, this was with yesterdays build. Is there something I need to activate to use put?
javax.servlet.ServletException: Unsupported HTTP method: PUT
org.orbeon.oxf.servlet.OPSServletDelegate.service(OPSServletDelegate.java:149)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.orbeon.oxf.servlet.OPSServlet.service (OPSServlet.java:75)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

root cause

org.orbeon.oxf.common.OXFException: Unsupported HTTP method: PUT
org.orbeon.oxf.servlet.OPSServletDelegate.service (OPSServletDelegate.java:142)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.orbeon.oxf.servlet.OPSServlet.service(OPSServlet.java:75)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
Ryan
 

Ryan Puddephatt
Software Engineer
 

Teleflex Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotland
EH54 7DP
 
e> [hidden email]
t> +44(0)1506 407 110
f> +44(0)1506 407 108
w> www.teleflex.com


 


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Problem using put

Erik Bruchez
Administrator
Ryan,

By default the OPS servlet only accepts GET, POST, and HEAD. You can add
to this by setting the oxf.http.accept-methods property in web.xml, and
list all accepted methods in a comma-separated list, like:

   get,post,put,head

But your exception tells me that you are trying to do the PUT on the OPS
servlet, not on eXist. So maybe you don't even need to do the above, and
rather target the eXist servlet. It is also possible that you don't
expose this servlet in your web.xml. Check the default OPS web.xml,
which does expose eXist as follows:

<servlet-mapping>
     <servlet-name>exist-rest-servlet</servlet-name>
     <url-pattern>/exist/rest/*</url-pattern>
</servlet-mapping>

<servlet-mapping>
     <servlet-name>exist-webdav-servlet</servlet-name>
     <url-pattern>/exist/webdav/*</url-pattern>
</servlet-mapping>

-Erik

Ryan Puddephatt wrote:

> All,
>     Whilst using the put method for the Exists REST API I got the follow
> exception, this was with yesterdays build. Is there something I need to
> activate to use put?
>
> javax.servlet.ServletException: Unsupported HTTP method: PUT
> org.orbeon.oxf.servlet.OPSServletDelegate.service(OPSServletDelegate.java:149)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> org.orbeon.oxf.servlet.OPSServlet.service
> (OPSServlet.java:75)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>
> *root cause*
>
> org.orbeon.oxf.common.OXFException: Unsupported HTTP method: PUT
> org.orbeon.oxf.servlet.OPSServletDelegate.service
> (OPSServletDelegate.java:142)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> org.orbeon.oxf.servlet.OPSServlet.service(OPSServlet.java:75)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>
> Ryan
>  
>
> Ryan Puddephatt
> Software Engineer
>  
>
> Teleflex Group - IT UK
> 1 Michaelson Square
> Livingston
> West Lothian
> Scotland
> EH54 7DP
>  
> e> [hidden email] <mailto:[hidden email]>
> t> +44(0)1506 407 110
> f> +44(0)1506 407 108
> w> www.teleflex.com <http://www.teleflex.com>
>
>
>  

--
Orbeon - XForms Everywhere:
http://www.orbeon.com/blog/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: Problem using put

Ryan Puddephatt
Thanks Erik, the url was incorrect

Ryan

Ryan Puddephatt
Software Engineer

Teleflex Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotland
EH54 7DP

e> [hidden email]
t> +44(0)1506 407 110
f> +44(0)1506 407 108

 

>-----Original Message-----
>From: Erik Bruchez [mailto:[hidden email]] On Behalf Of
>Erik Bruchez
>Sent: 26 October 2006 17:29
>To: [hidden email]
>Subject: Re: [ops-users] Problem using put
>
>Ryan,
>
>By default the OPS servlet only accepts GET, POST, and HEAD.
>You can add to this by setting the oxf.http.accept-methods
>property in web.xml, and list all accepted methods in a
>comma-separated list, like:
>
>   get,post,put,head
>
>But your exception tells me that you are trying to do the PUT
>on the OPS servlet, not on eXist. So maybe you don't even need
>to do the above, and rather target the eXist servlet. It is
>also possible that you don't expose this servlet in your
>web.xml. Check the default OPS web.xml, which does expose
>eXist as follows:
>
><servlet-mapping>
>     <servlet-name>exist-rest-servlet</servlet-name>
>     <url-pattern>/exist/rest/*</url-pattern>
></servlet-mapping>
>
><servlet-mapping>
>     <servlet-name>exist-webdav-servlet</servlet-name>
>     <url-pattern>/exist/webdav/*</url-pattern>
></servlet-mapping>
>
>-Erik
>
>Ryan Puddephatt wrote:
>> All,
>>     Whilst using the put method for the Exists REST API I got the
>> follow exception, this was with yesterdays build. Is there
>something I
>> need to activate to use put?
>>
>> javax.servlet.ServletException: Unsupported HTTP method: PUT
>>
>org.orbeon.oxf.servlet.OPSServletDelegate.service(OPSServletDel
>egate.java:149)
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>> org.orbeon.oxf.servlet.OPSServlet.service
>> (OPSServlet.java:75)
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>>
>> *root cause*
>>
>> org.orbeon.oxf.common.OXFException: Unsupported HTTP method: PUT
>> org.orbeon.oxf.servlet.OPSServletDelegate.service
>> (OPSServletDelegate.java:142)
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>> org.orbeon.oxf.servlet.OPSServlet.service(OPSServlet.java:75)
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>>
>> Ryan
>>  
>>
>> Ryan Puddephatt
>> Software Engineer
>>  
>>
>> Teleflex Group - IT UK
>> 1 Michaelson Square
>> Livingston
>> West Lothian
>> Scotland
>> EH54 7DP
>>  
>> e> [hidden email] <mailto:[hidden email]>
>> t> +44(0)1506 407 110
>> f> +44(0)1506 407 108
>> w> www.teleflex.com <http://www.teleflex.com>
>>
>>
>>  
>
>
>--
>Orbeon - XForms Everywhere:
>http://www.orbeon.com/blog/
>
>



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws