POST method not working

I am developing an android app which accesses my Oracle database in the cloud through RESTful services , Oracle APEX provided the interface for creating REST services , On the client side i am able to invoke a GET request through JAVA HttpClient API and the response is Just fine in JSON format.. the problem is when a invoke a POST request i am not getting the appropriate response.i did everything as instructed by the documentation, (also defined the outbound parameters) Please have a look at this pic ad tell if i am doing anything wrong http://i58.tinypic.com/2gt5bb5.png

The code on the client side is like this:

HttpPost post = new HttpPost(url);
JSONObject json = new JSONObject();
json.put("MNUM", "234564");
StringEntity se = new StringEntity( json.toString());
post.setEntity(se);
HttpResponse response = httpClient.execute(post);
HttpEntity entity = response.getEntity();
text = getASCIIContentFromEntity(entity); // this function converts response to string

the PL/SQL in the source is:

DECLARE
id USER_INFO.m_number%type; //user_info is a table and m_number is its primary key (which i am trying to post from my app)
BEGIN
INSERT into USER_INFO(m_number)
values(:MNUM)
returning m_number into id;
:status := 201;
:location := id;
commit;
END;

can anybody tell me why i am unable to POST after all this , any help will be much appreciated , i am stuck at this part from days. The Error i receive is Service not available.

Answers


Use the Postman app (chrome webstore) to test your API calls and see if they're valid. If that doesn't help you resolve the issue paste the input and output.


Need Your Help

Popup onclick Javascript doesn't work

javascript popup popupwindow

I am building a form which will be loaded in popup by clicking on a text/image. This is my code and it is not working! Any ideas

Get Child categories magento

php magento

Trying to get child of a specific category which is active. Please help. I am having trouble doing it. I'm currently able to show them all but not specifically. Would appreciate any help.