Results 1 to 4 of 4

Thread: REST Driver: Regarding POST, status and modify

Threaded View

  1. #1
    Join Date
    Jul 2012
    Buenos Aires, Argentina

    REST Driver: Regarding POST, status and modify

    Hello Everyone,

    I'm currently working on a REST driver for an webservice that uses two resources to handle users, one for Add and Modify events, and one for Delete events. All of these use the POST method and return 200 OK if everything went as expected.

    From what I could test the REST driver doesn't "like" the 200 response and returns status level ERROR. This is not the case with 201 Created, in which the status level returns as Success.

    Now, Is there a way to alter this behavior?

    I tried to go through the Java Extension route to "translate" 200 OK to 201 Created but there is no ByteArrayModifiers interface in the com.novell.nds.dirxml.driver.rest.util package.

    Should I ask the developer to modify the 200 OK to 201 Created?

    On the other hand, as I previously stated the resource used to modify users is the same used to add users but the association is passed as a value inside the JSON string. If I configure the custom resource that way the driver insists that i have to place an association placeholder in the resource extended URL, which is not the way the web service works. Is there any way to circumvent this?

    Finally, there are some cases where the status code in the HTML header for a web service response has a special meaning, is there a way to recover it?

    Thanks in advance
    Last edited by EPedros; 26-May-2016 at 09:41 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts