I disagree... although it may just be semantics that's in the way.
When most people non-techie people say "call a webservice method" they mean "send whatever the hell is necessary to the server so that the server gives me the information I'm requesting".
Yes you can do this from javascript using a variety of methods, provided you can figure out how to send an xml message to the web server. Webservices speak xml, so if you want to communicate with one you have to send it xml that describes what you're requesting, and of course that xml needs to be in a very specific format.
I did a lot of work recently on an ajax application that used javascript to send ajax messages to a web server to request all kinds of information. We used a psuedo-webservice-like message protocol, and we used a package called prototype.js ( http://www.prototypejs.org/) that I highly recommend. It makes ajax calls about as easy as one or two lines of code - very nice!
You'll also need to get the webservice API from the server you want to communicate with, which will usually come with some example xml messages that you can send them as well as some example xml messages that you can expect to receive/consume.
It could be as simple as building a small xml string in javascript, sending it to the server, and then parsing the xml string that they send back to get the data you were requesting. All of this can easily be done with javascript.
Does that help?
__________________
online-etraining - free online training in Java, J2EE, and MySQL.
rickysays - answers and advice from a geek who knows stuff.
|