0

There is a setup done by our dba in Marklogic server, and he has uploaded several xml documents.

I am trying to access those documents via oracle apex RESTFUL web service pl/sql code

declare
l_clob       CLOB;
BEGIN

l_clob := apex_web_service.make_rest_request(
p_url => 'http://abcd.efg.com:8011/v1/documents?uri=/C/storage/data/temp.xml',
p_http_method => 'GET',
p_username    => 'temp',
p_password    => 'temp' );
dbms_output.put_line(l_clob);
END;

The dbms_output is printing the below error xml

<rapi:error xmlns:rapi="http://marklogic.com/rest-api">
<rapi:status-code>401</rapi:status-code>
<rapi:status>Failed Auth</rapi:status>  <rapi:message-code/> 
<rapi:message>Unauthenticated</rapi:message></rapi:error>

Any ideas what is the cause of the problem ??

2 Answers 2

3

I think you need to tell Oracle to do digest authentication for the HTTP request or switch your REST server instance to use basic auth.

Sign up to request clarification or add additional context in comments.

1 Comment

I have switched the authentication setting from Digest to Basic in the Marklogic Server. It worked. Thanks for your suggestion.
0

What kind of authentication are you using? basic?

if so, have you given the temp user the correct permissions to save data or use the rest end points.

You might want to try just using the admin user and making the server authentication type application level. just to see if it works. I wouldn't use that in production.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.