Reputation: 13855
I am trying to call the webservice to get a simple list of tasks, from a windows 7 gadget.
Now, basically its a html page, with Javascript if need be. Ive looked at Simplest SOAP example, but had no luck. (My button doesnt do anything)
There is a button on my html page. The procedure would be.
Click the button.
Sends request to web service.
Recieve response from webservice
display the response below the button.
Any example code, as complete as possible would be much appreciated. Or at worst, some detailed instructions following my 4 steps, and how I achieve it.
Ive never fully understood javascript, but think I did it correctly. (Note, it works fine connecting via the URL, to the REST service).
<html>
<head>
<script type="text/javascript" src="jquery-1.6.4.min.js"></script>
<script>
function getTasks() {
$.get("https://localhost/TEST.TestService.svc/rest/Services?CostCentreNo=1&Filter=0",
function(data){
alert("Data Loaded: " + data);
});
}
</script>
</head>
<body>
<button onclick="javascript:getTasks();">Show Match</button>
</body>
</html>
Upvotes: 4
Views: 41194
Reputation: 4278
did you read this How do i get access to SOAP response property? and the answer, if you get stuck i might abeable to help
for REST JavaScript REST client Library
Upvotes: 2