on 01-29-2015 10:24 AM
Dear All
I have created a odata service and registered it in Gateway.
http://myname:8000/sap/opu/odata/sap/ZGL2_SRV/GLListSet
I am able to get the output in browser.
But when I call this service from the .net application, I am getting 401 Authentication error.
Can someone help me ?
1. Any specific thing that I should supply in the request header..?
Or
2. Any server side authentication to be provided?
my .netcode is like this.
$.ajax({
url: q,
type: "GET",
dataType: "xml",
beforeSend: function (req) {
req.setRequestHeader("Authorization", "Basic dmVua2F0OjEwMDNNYXJjaCQ=");
},
Regards,
Venkat
Problem might be with HTTP/HTTPS or with credentials itself.
Code seems to be simple javascript.
$.ajax
({
type: "GET",
url: "XXXXX",
dataType: 'xml',
headers: {
"Authorization": "Basic " + btoa(USERNAME + ":" + PASSWORD)
},
success: function (){
alert('Success');
}
});
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.