Java script and web services( help )

what are the the options available for accessing web services from within web client applications using JavaScript. i need to come up with advantages and disadvantages if using java script ?

Considering most web services just expose XML or JSON data, using them from Javascript is perfectly fine. Remember that all clients need to do is consume the data using AJAX or some such. I think you are getting confused between serving web services and consuming them.

Using Javascript is easy to consume most types of web services especially when using something like jQuery.

I believe this is a formidable undertaking. The reason most web services are server based is because you need some type of controller on one computer executing a lot of different things on another computer. In server side technologies a lot of this code has been written for you and you can take advantage of preexisting classes and managers.

In Javascript that runs on the client browser, you would need to build this as a application and all the code would be downloaded to your visitor. This is likely to be a LOT of code, especially since I’m not familiar with any library that includes prebuilt functionality of this kind precisely because Javascript is an inefficient technology for doing this.

That said, I’ve never tried it so maybe someone has some ideas, though you can tell why I’ve never tried it this way. .NET, PHP, and probably Java are all better avenues to work with web services, IMO.