This discussion is archived
2 Replies Latest reply: Jan 16, 2013 12:00 PM by Nilesh RSS

Restful webservice Internal Server Error PUT POST DELETE

941738 Newbie
Currently Being Moderated
Hi ,

When I make a RESTful webservice on the Oracle Cloud with a PUT,POST or DELETE method, the test results is always the same error: "500 - Internal Server Error".
The GET method causes no problems and gives me the value in JSON format.

Can anyone help me because I can't find an Oracle example with one of these methods?
  • 1. Re: Restful webservice Internal Server Error PUT POST DELETE
    984550 Newbie
    Currently Being Moderated
    Oracle Cloud uses Weblogic 10.3.6. Per Weblogic 10.3.6: "JAX-WS implementation, the set of supported HTTP methods is limited to GET and POST. DELETE, PUT, and HEAD are not supported. Any HTTP requests containing these methods will be rejected with a 405 Method Not Allowed error." So you should be able to do GET and POST, but not PUT, DELETE or HEAD.

    http://docs.oracle.com/cd/E23943_01/web.1111/e13734/rest.htm#i265597
  • 2. Re: Restful webservice Internal Server Error PUT POST DELETE
    Nilesh Newbie
    Currently Being Moderated
    Java Cloud Service does support RESTful WebServices based on JAX-RS 1.1 specification & Jersey 1.9 implementation.

    Please follow the documentation for http://docs.oracle.com/cd/E23943_01/web.1111/e13734/rest.htm#CHDCGFCH (Section Using the Jersey JAX-RS Reference Implementation)
    The required Jersey 1.9 shared library is pre-deployed in all the Java Cloud Service instances , you only need to add the reference of this shared lib in your weblogic.xml.

    The following example shows how to update the weblogic.xml file to use the Jersey JAX-RS RI Version 1.9.

    <library-ref>
    <library-name>jax-rs</library-name>
    <specification-version>1.1</specification-version>
    <implementation-version>1.9</implementation-version>
    <exact-match>false</exact-match>
    </library-ref>

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points