Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

Pass web service credentials from in ajax call

$
0
0

Hi All,

 

I am using below javascript $.ajax call in my app to call a Odata service configured on one of my analytical view in SAP HANA

 

try {

  $.ajax({

  url: "http://X.X.X.X:8000/HW_348671/HW_348671/oppo.xsodata/oppo1?$format=json",

  type: 'get',

  dataType: 'json',

  error: function (XMLHttpRequest, textStatus, errorThrown) {

        alert('Ajax Call Error- ',XMLHttpRequest);

        console.log(JSON.stringify(XMLHttpRequest));

        console.log(JSON.stringify(textStatus));

        console.log(JSON.stringify(errorThrown));

      },

   .

    .

     .

The URL if executed from Browser ask HANA user credentials & then displays data in JSON format.

But, if I executed this script embedded in .html it shows error ( "Ajax Call Error-").

 

How to pass credentials to this web service so that this ajax call will sucess & I can see the data from my app.

 

Please help.

 

Harshawardhan.


Viewing all articles
Browse latest Browse all 6412

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>