Getting ORA-29269 error while calling utl_http.begin_request - oracle

I have been trying to send request to a Web Service by issuing UTL_HTTP.BEGIN_REQUEST, but I get the error "ORA-29269: HTTP server error 500 - Server Error" if I call it like this:
v_request_pri := UTL_HTTP.BEGIN_REQUEST(v_ws_url_pri, 'POST', 'HTTP/1.1');
where v_ws_url_pri is the URL of the web service.
What surprises is, when I call UTL_HTTP.BEGIN_REQUEST with only the URL as the parameter (in which case, the second parameter is the 'GET' method by default, and the HTTP version is checked as latest), there is no error and the call is through.
Please if somebody may guide on the error, it would be a great help to me.
Thanks,
Gaurav

Related

slash command "dispatch_failed"

I have went through creating the custom slash command configuration via slack and installed it on workspace. However when I run it I get this
/testing failed with the error "dispatch_failed"
I tried multiple workspaces but same issue. Anyone experienced this?
So after a few tests, I found out that this is just a generic message of anything that fails at slack at this point. I have first my endpoint that was unreachable. So it was returning this message. I fixed that, used ngrok for tunnel so that I could debug and that is how I found this issue.
Also, this error can occur due to the following reasons as well.
Errors in code
Unreachable backend or Invalidly configured slash command in the app
While the documentation tells you:
"use the Request URL is your base server link + "/slashcommand" after it"
This is incorrect. The request URL should be: "/slack/events"
Of course the command needs to match whats in the 'edit command' window and in the method '.command' in your app.js:
app.command('/flash-card', async ({ ack, body, client })
If you're using ngrok http <port> to test in your localhost, be aware that a new ngrok public URL is created every time you run this command. So in https://api.slack.com/apps, in your app's Features, you may have to update your Slash Command' request URL with the current ngrok URL generated for you.
You need to set the Method in the Integration Settings to GET, is default to POST
This is also the error for a 404 Not Found.
If you're developing offline with ngrok, the 404 error can be seen in the terminal.
If you're deploying with serverless, ensure that you're handling the new endpoint /slack/command. One solution is to create a separate handler, i.e. /command.js
functions:
slack:
handler: app.handler
events:
- http:
path: slack/events
method: post
command:
handler: command.handler
events:
- http:
path: slack/command
method: post
[If your code is executing and u still have this error]
In my case using Slackbolt with js I forgot to add
await ack();
in called function so Slack api throw error.

Accessing API layer

I am trying to access an api function, for example I want to access the login function, I get the following error:
"message": "An internal error occurred during your request!",
Looking in the log file, the following log is there:
ERROR 2017-10-09 17:01:37,296 [11 ]
nHandling.AbpApiExceptionFilterAttribute - Processing of the HTTP
request resulted in an exception. Please see the HTTP response
returned by the 'Response' property of this exception for details.
System.Web.Http.HttpResponseException: Processing of the HTTP request
resulted in an exception. Please see the HTTP response returned by the
'Response' property of this exception for details.
I am using Postman to test. My URL is https://localhost:44347/api/Account/Authenticate. My header has Context-Type as "application/json" and in my Body I have the loginModel formatted as
{
"tenancyName": "tenantname",
"userNameOrEmailAddress": "admin",
"password": "123qwe"
}
Am not sure how else to proceed on this. Any ideas please? I have swagger installed as well.
I am using MVC + AngularJS template. I have not changed anything, just the default project.
Appreciate the assistance.
I have tested with Fiddler and it works correctly.
Note: make sure you type Content-Type correctly, on the question you typed Context-Type
Make a POST request! You may be missing this.

Windows HTTP server API, UrlPrefix failing with Error 5, on HttpAddUrl

Good afternoon,
I'm following the example on Windows Http Server Api, found here:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa364640(v=vs.85).aspx
I get my project to compile and work when I enter http://localhost:8080/test as the URl into HttpAddUrl function, and point my browser to http://localhost:8080/test on the same machine as I run the http server in the above example.
The webpage shows the response and everything works well.
here is my call to HttpAddUrl
retCode = HttpAddUrl(
hReqQueue, // Req Queue
L"http://localhost:8080/test/", // Fully qualified URL
NULL // Reserved
);
My problem, however is sending the request from another machine on the same LAN.
I tried pointing the browser to http://192.168.1.2:8080/test/ but I got a 404 error,
Then I tried changing the HttpAddUrl function to
retCode = HttpAddUrl(
hReqQueue, // Req Queue
L"http://192.168.1.2:8080/test/", // Fully qualified URL
NULL // Reserved
)
This only returned retCode = 5 (which I also cannot determine the meaning of, if somebody can help me determine the enumeration for this error variable)
Does anybody know what I am supposed to enter into the HttpAddUrl function if I want to sen an HTTP request from another machine to the local server.
Thanks,
-D
Resolved, it turns out I was not running Visual Studio with Admin privileges, error 5 was system error "Access Denied"
http://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx
The URL of L"http://192.168.1.2:8080/test/" was corrent

REST API from Javascript - Invalid HTTP status code 405

new Parse developer here looking for some help.
I'm trying to call the REST API from my app to log custom analytics, but for some reason the XMLHttpRequest I'm making fails with the error message:
XMLHttpRequest cannot load https://api.parse.com/1/events/marker. Invalid HTTP status code 405
Here is the code I am using to make the request:
xmlhttp.open("POST", "https://api.parse.com/1/events/marker", true);
xmlhttp.setRequestHeader("X-Parse-Application-Id","appidhere");
xmlhttp.setRequestHeader("X-Parse-REST-API-Key","apikeyhere");
xmlhttp.setRequestHeader("Content-Type","application/json");
xmlhttp.send('{"dimensions":{"action":"showDetails"}}');
This is the console output:
OPTIONS https://api.parse.com/1/events/marker (index):3639(anonymous function) (index):3639S.trigger main.js:15(anonymous function) VM625:31(anonymous function) VM623:11S.trigger main.js:15L.zc VM622:132L.nn VM622:132(anonymous function) main.js:13S.trigger main.js:15L.kl VM622:116(anonymous function) main.js:16
XMLHttpRequest cannot load https://api.parse.com/1/events/marker. Invalid HTTP status code 405`
The strangest thing though is that when I make the request using the curl example in the documentation it works perfectly fine. :/ Any ideas what I'm doing wrong? Hoping it's something simple that I'm overlooking. Thanks!
An HTTP 405 error is Method Not Allowed. The resource you're trying to hit does not accept the POST method.
Be certain that the resource you're trying to hit supports POST; if it doesn't, you'll have to change your XMLHttpRequest accordingly.

xhrPost : from an http view to an https url

using Dojo, is it possible to make an Ajax call using xhrPost from an HTTP view to a HTTPS url ?
The url must be HTTPS (as defined in Struts).
If I simply set "MyCommand" as the 'url' parameter of the xhrGet, I get a 302 error code.
If I transform "MyCommand" using javascript to something like "https://......./servlet/MyCommand" I see the following error in Firebug : "uncaught exception: Permission denied to call method XMLHttpRequest.open".
I'm stuck using both approaches, the only solution I found is to remove the "https" clause in the struts configuration file, and of course this is not a correct solution :)
Thanks for any help.
Best regards,
Nils
connection to https from http involves a different port of the target. This violates the same-origin policy which should be enforced by the browser to the running javascript code.
It should work with an iframe..
dojo.io.iframe encapsulates this behaviour for you
http://docs.dojocampus.org/dojo/io/iframe
If your server responds with a redirect to a non-ssl (correctly to same-origin) page you should be able to read the response (because the iframe is now in the same-origin).

Resources