Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Javascript jQuery
Hi
 
can any body help me for getting web service respone..i am not getting wen service respone..?
here i getting response
http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/why-it-goes-to-if-condiation/m-p/1911581#M29196
 
var divToBeWorkedOn = '#AjaxPlaceHolder';
    var webMethod = 'http://184.106.159.143:8080/FirstGroupRailApps/services/RailAppsCAWS/getDestinationStationDashboard'
    var parameters = "{'crsCode':'AAP'}";
 
    $.ajax({
        type: "GET",
        url: webMethod,
        data: parameters,
        contentType: "application/xml; charset=utf-8",
        dataType: "xml",
        success: function(msg,xml) {
alert("Hi")
        var responseXML = xml.documentElement;
        alert(responseXML);
alert(msg.stationName);
            $(divToBeWorkedOn).html(msg.d);
        },
        error: function(e){
        alert("p")
        alert(e);
            $(divToBeWorkedOn).html("Unavailable");
        }
    });
}
Posted 21-Sep-12 6:01am
Comments
Marcus Kramer at 21-Sep-12 12:04pm
   
It could be any number of things. Your "not getting web service response" isn't very descriptive to us on what is happening.
What happens when you paste your webMethod variable value into a browser to hit the service? If you can't hit the service that way, then your issue will be with this webMethod definition.
ravi1989h at 21-Sep-12 12:07pm
   
sir can you please check..this i am getting response
http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/why-it-goes-to-if-condiation/m-p/1911581#M29196
ravi1989h at 21-Sep-12 12:08pm
   
HERE i am calling same web service but in differnt way
Zoltán Zörgő at 21-Sep-12 12:14pm
   
Is the service yours? If so, please post the class and the method definition. Please post only significant code including any attributes you have added to your class and method.
ravi1989h at 21-Sep-12 12:18pm
   
yes....method name :getDestinationStationDashboard
parameter :crsCode:AAP
URL: http://184.106.159.143:8080/FirstGroupRailApps/services/RailAppsCAWS/getDestinationStationDashboard?wsdl
Marcus Kramer at 21-Sep-12 14:41pm
   
You are not getting a response because you are probably hitting the login page. You have to find out how credentials are supposed to be sent to this service and make sure that the authentication is valid first.
ravi1989h at 21-Sep-12 19:48pm
   
there is no authentication required you check this link i am getting response here.
http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/why-it-goes-to-if-condiation/m-p/1911581#M29196
i am calling same web service different way so i am not able to call...
 
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Hello World</title>
<script src="jquery.min.js" type="text/javascript"></script>
<script src="sencha-touch-all.js" type="text/javascript"></script>

<link href="sencha-touch.css" rel="stylesheet" type="text/css" />
<script>
console.log('Hi');
Ext.application({
launch: function () {
console.log("Hi");
 
//var type = "test&data";
var divToBeWorkedOn = '#AjaxPlaceHolder';
var webMethod = 'http://184.106.159.143:8080/FirstGroupRailApps/services/RailAppsCAWS?wsdl/getDestinationStationDashboard'

var parameters = '" + AAP + "';
$.ajax({
type: "POST",
url: webMethod,
data: parameters,
contentType: "application/XML; charset=utf-8",
dataType: "XML",
success: function(msg,xml) {
alert("Hi")
var responseXML = xml.documentElement;
alert(responseXML);
alert(msg.stationName);
$(divToBeWorkedOn).html(msg.d);
},
error: function(e){
alert("p")
alert(e);
console.log(e);
$(divToBeWorkedOn).html("Unavailable");
}
});
}
});

</script>

</head>
<body></body>
</html>

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 235
1 Sergey Alexandrovich Kryukov 144
2 Rob Philpott 100
3 Peter Leow 70
4 CHill60 70
0 OriginalGriff 6,902
1 Sergey Alexandrovich Kryukov 5,623
2 Maciej Los 3,479
3 Peter Leow 3,373
4 DamithSL 2,505


Advertise | Privacy | Mobile
Web03 | 2.8.140721.1 | Last Updated 21 Sep 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100