cancel
Showing results for 
Search instead for 
Did you mean: 

Authorization error - Accessing HTTPDest File

former_member187794
Participant
0 Kudos

Hi Friends

I am trying to access a external webservice, from HANA. But, I am getting an error when accessing the HttpDest file. Error: "User is not authorized to use destination"

I have the required HttpDestViewer role. And also the xsjs and HttpDest file are in the same package.

We are on HANA 2.0. Any thoughts??

Regards

Giri

pfefferf
Active Contributor
0 Kudos

Can you share the package structure and the piece of code which reads the destination?

former_member187794
Participant
0 Kudos

var rootProjectPath = 'proj.inv';

var jdaPackagePath = rootProjectPath + '.services.v1_0.external';

try {

var dest = $.net.http.readDestination(jdaPackagePath, "jdaApi");

var client = new $.net.http.Client();

This is called from a xsjslib file, which is in proj.inv.services.v1_0.libs folder

Accepted Solutions (1)

Accepted Solutions (1)

pfefferf
Active Contributor

The xsjs coding and the destination used by the xsjs coding are not in the same package (proj.inv.services.v1_0.external <> proj.inv.services.v1_0.libs). This is one issue.

Please try to save the destination file in the same package (or in a sub package) in which the xsjs coding is saved.

Regards,
Florian

former_member187794
Participant
0 Kudos

i was in a understanding that, it should be in same package. But, it seems it should be in the same subpackage/folder as well.

Thank you, Florian

Regards

Giri

Answers (0)