09-26-2012 04:52 AM
Hi
can you please help me to call any one method from web service.
using this http://openlandscape.net/2009/09/25/call-soap-xm-w
my url is http://railapps.firstgroup.com/FirstGroupRailApps/
09-26-2012 08:19 AM
Hey ravi,
Not sure if this is for a BB app or not? But this code should get you on your way. It's important that you understand the data you are trying to get from the WSDL. More information can be seen here:
function onError(request, data, status) {
console.log(status);
}
function onSuccess(data, status) {
console.log(data);
}
function loadData() {
var soapMessage = '<?xml version="1.0" encoding="UTF-8" standalone="no"?><SOAP-ENV:Envelope xmlns
OAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://wsendpoints.bbrailapps.firstgroup.com" xmlns:intf="http://wsendpoints.bbrailapps.firstgroup.com" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ><SOAP-ENV:Body><intf:getVersion xmlns:intf="http://wsendpoints.bbrailapps.firstgroup.com"></intf:getVersion></SOAP-ENV:Body></SOAP-ENV:Env
$.ajax({
url: "http://railapps.firstgroup.com/FirstGroupRailApps/
type: "POST",
dataType: "xml",
data: soapMessage,
processData: false,
contentType: "text/xml; charset=\"utf-8\"",
success: onSuccess,
error: onError
});
}
loadData();
09-26-2012 08:50 AM
Thanks
Sir for reply
actually i am getting all xml .
But expected result should be after call get version : 1.3
can you help me getting this
09-26-2012 08:53 AM
After calling getversion method
Expected result should be : 1.3 or 1.4
09-26-2012 09:03 AM
The expected result from a SOAP webservice is always XML. This is the output I get below:
09-26-2012 11:22 AM
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Hello World</title>
<script src="jquery.min.js" type="text/javascript"></script>
<script>
function onError(request, data, status) {
console.log(status);
}
function onSuccess(data, status) {
console.log(data);
}
function loadData() {
var soapMessage = '<?xml version="1.0" encoding="UTF-8" standalone="no"?><SOAP-ENV:Envelope xmlnsOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://wsendpoints.bbrailapps.firstgroup.com" xmlns:intf="http://wsendpoints.bbrailapps.firstgroup.com" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ><SOAP-ENV:Body><intf:getVersion xmlns:intf="http://wsendpoints.bbrailapps.firstgroup.com"></intf:getVersion></SOAP-ENV:Body></SOAP-ENV:Env elope>';
$.ajax({
url: "http://railapps.firstgroup.com/FirstGroupRailApps/ services/RailAppsCAWS?wsdl",
type: "POST",
dataType: "xml",
data: soapMessage,
processData: false,
contentType: "text/xml; charset=\"utf-8\"",
success: onSuccess,
error: onError
});
}
</script>
</head>
<body onload="loadData();"></body>
</html>i used this code and getting error
09-26-2012 11:24 AM
Your output is correct but i am not get this out put please help
09-26-2012 12:32 PM
Error display internal server error..
09-27-2012 06:50 AM
Please help , to solve this issue