Consuming web service in HTML
html, javascript, web-services
Solution
You definitly should get familiar with AJAX. You could use the ajax functionalities provided by jQuery. That's the easiest way, I assume. Take a look at http://api.jquery.com/jQuery.ajax/
You can use this like
$.ajax({
url: "urltoyourservice.xml"
dataType: "xml",
}).done(function(data) {
console.log(data);
});
HTML itself cannot consume a webservice. Javascript ist definitely needed. The existence of your WSDL File looks like you are probably using a XML format as the return of the web service. You have to deal with XML in javascript. Therefore take a look at Tim Downs explanation.
But keep in mind, that your web service URL must be available under the same domain as your consumption HTML-File. Otherwise you'll receive a cross-site-scripting error.
Problem
I have created a web service and saved its .wsdl file. I want to consume this service in my HTML file by providing its URL. Can anybody tell me how to call the URL in HTML and use it? Like its done here. http://www.codeproject.com/Articles/14610/Calling-Web-Services-from-HTML-Pages-using-JavaScr/ The only difference is my web service does not have an extention like "asmx?wsdl". Does that makes any difference. I followed that tutorial too but it does not produce any output. Thank You////