You probably need to add some additional information to help us help you.
Which kind of web service do you have on the server? (SOAP, RESTful, etc)
In both cases you're leveraging XMLHttpRequest.
If you can choose, having a RESTful web service that can comunicate using JSON is way more easy.