on 08-26-2013 3:40 PM
Hi,
I am trying to consume a sample webservice(Celsisus to Fharenheit Converter) in SAPUI5... Can anyone please help me on providing/explaining --------- How to Consume a webservice in SAPUI5 -- Without using ODATA ??
Please provide a document/Step by step process to acheive this.
Thanks,
NWUser
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vishnu,
Disable web security and try...
For chrome use following procedure....
Close all chrome windows...
Press windows+R(to open Run prompt)
Then type following command in it
Chrome --d -disable-web-security
Then press enter button..
Now chrome window will open with security disabled mode..... Now ur service works without cross domain issue...
Regards,
Sagar M Patil
Hello Vishnu,
Try sending the XCSRF token in the header of the SOAP request. This token will be generated by the respective backend server. to fetch the XCSRF token refer this thread How to fetch X-CSRF-Token | SCN
Hi,
Please use below mentioned Ajax call to consume web service -
var soapMessage = '<?xml version="1.0" encoding="utf-8"?>'
+ '<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">'
+ '<SOAP-ENV:Body>'
+ '</yq1:helloWorld4>'
+ '</SOAP-ENV:Body>'
+ '</SOAP-ENV:Envelope>' ;
$.ajax({
url : url,
type : "POST",
dataType : "xml",
data : soapMessage,
contentType : "text/xml; charset=\"utf-8\"",
success : function(data, textStatus, jqXHR) {
console.log("data"+data);
},
error: function()
{
console.log("ERROR");
}
});
you can call a rest service by changing the soapMessage object to a json object (according to your service).
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Please find the below mentioned tutorial -
First one is very detailed step by step explanation. This should be get you going.
Good Luck
Jeet
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.