For partners that build or integrate commercially available applications and service solutions with the Oracle Cloud Platform
For partners that provide implementation or managed services around Oracle Cloud Applications
I've defined my REST endpoint under Service Connections which is pointing to an Auto-REST enabled table. I can GET, POST, PUT and DELETE records using the service.
When I try to add a table to a page and select the GET endpoint as the data source, the wizard warns that the endpoint "Does not contain any suitable Objects". When I add it anyway, the table shows the attributes from the table but no data (although there is data in the table).
At runtime the console log shows the error:
TypeError: Failed to fetch
The FetchEvent for "https://<redacted>/ords/pdb1/vb_app/po_request/" resulted in a network error response: the promise was rejected.
Promise.then (async)
(anonymous) @ vbServiceWorker.js?jetPath=https://static.oracle.com/cdn/jet/v6.1.2/&modulePath=https://static.oracle.com/cdn/vb/v19.1.3.7/&nonce=xkrr3nzmy:145
vbServiceWorker.js?jetPath=https://static.oracle.com/cdn/jet/v6.1.2/&modulePath=https://static.oracle.com/cdn/vb/v19.1.3.7/&nonce=xkrr3nzmy:1 Uncaught (in promise) TypeError: Failed to fetch
Comment
Which security/authentication did you set on the service?
Did it work when you did the test step in the endpoint definition?
Do you have a sample of the data structure returned in the test step?
Be the first to rate this
|
Sign in to rate this
Hi Shay,
No authentication has been applied.
It works in the test step when defining the endpoint.
Yes, it returns an array of items, it's an autorest enabled table. I can put a sample here tomorrow when I go to the office.
Thanks,
Jeff
Be the first to rate this
|
Sign in to rate this
Try setting the authentication setting of the service to enable -> None (Use Proxy) and see if it helps.
Be the first to rate this
|
Sign in to rate this
Strange thing - first time I opened the page this morning it worked. I hadn't changed anything.
After a short time building a page, the problem re-occurred - "no data to display".
I tried switching authentication to enabled - None (Use Proxy) but that resulted in authentication failures.
I tried switching it off, and now even the Test mode doesn't work, resulting in Network Error (ERR_CERT_AUTHORITY_INVALID).
So I've returned it all to the original configuration and now nothing works in VB...
Postman still works regardless.
Be the first to rate this
|
Sign in to rate this
Be the first to rate this
|
Sign in to rate this
I was getting the ERR_CERT_AUTHORITY_INVALID error.
I disabled REST for the table and the schema, and re-enabled with a different alias for both. I've created a whole new application and added a new Service Connection, and the Test of the "get" works. Response attached.
I've added an application page with a table based on the rest endpoint, and it still shows "No data to display" with the following error in the console:
TypeError: Failed to fetch
The FetchEvent for "https://<redacted>/ords/pdb1/vbapp/porequest/" resulted in a network error response: the promise was rejected.
Promise.then (async)
(anonymous) @ vbServiceWorker.js?jetPath=https://static.oracle.com/cdn/jet/v6.1.2/&modulePath=https://static.oracle.com/cdn/vb/v19.1.3.7/&nonce=y1nvkxgir:145
vbServiceWorker.js?jetPath=https://static.oracle.com/cdn/jet/v6.1.2/&modulePath=https://static.oracle.com/cdn/vb/v19.1.3.7/&nonce=y1nvkxgir:1 Uncaught (in promise) TypeError: Failed to fetch
rest.js:327 GET https://<redacted>/ords/pdb1/vbapp/porequest/ net::ERR_FAILED
(anonymous) @ rest.js:327
Be the first to rate this
|
Sign in to rate this
I tried again after an hour or so, and it worked. Once.
On refreshing the page, it's failing again.
Be the first to rate this
|
Sign in to rate this
Looks like your SSL certificate is not a valid one. (You can check this by trying to access the https address of your service from your browser - you'll see it will warn you.
Here is the solution for this:
https://blogs.oracle.com/vbcs/connecting-vbcs-to-ords-with-self-signed-certificates-for-development
Be the first to rate this
|
Sign in to rate this
Strange that it worked, intermittently, without requiring me to upload any certificate.
Be the first to rate this
|
Sign in to rate this
I wonder if this is because you sometime use http and sometime https when referring to the service.
Be the first to rate this
|
Sign in to rate this
No, I don't get any response to http. When it works it's always via https.
Be the first to rate this
|
Sign in to rate this