Questions tagged [web-services]

A "web service" is a software system designed to support interoperable machine-to-machine interaction over the World Wide Web.

A web service is an application that responds to requests using a protocol built on top of HTTP (see also ), the protocol of the World Wide Web. The term can also designate the application protocol itself.

Some web services follow the REST (representational state transfer - see also ) principle, where communication takes the form of requests from a client and matching responses from the server, and the server does not keep track of successive requests from a client (no sessions).

The W3C standardizes WSDL (see also ) to describe web service protocols and SOAP (see also ) to structure messages encoded in XML (see also ).

60164 questions
205
votes
20 answers

Tracing XML request/responses with JAX-WS

Is there an easy way (aka: not using a proxy) to get access to the raw request/response XML for a webservice published with JAX-WS reference implementation (the one included in JDK 1.5 and better) ? Being able to do that via code is what I need to…
Antonio
  • 3,027
  • 2
  • 18
  • 9
190
votes
7 answers

What is the overhead of creating a new HttpClient per call in a WebAPI client?

What should be the HttpClient lifetime of a WebAPI client? Is it better to have one instance of the HttpClient for multiple calls? What's the overhead of creating and disposing a HttpClient per request, like in example below (taken from…
Bruno Pessanha
  • 2,874
  • 4
  • 24
  • 35
189
votes
21 answers

What is a "web service" in plain English?

I've been reading about "web services" here on SO, on Wikipedia, Google, etc., and I don't quite understand what they are. What is the plain English definition/description? If I make a simple website using PHP that just, say, prints a random…
MrDatabase
  • 43,245
  • 41
  • 111
  • 153
188
votes
12 answers

How can I verify a Google authentication API access token?

How can I verify a Google authentication access token? I need to somehow query Google and ask: Is [given access token] valid for the [example@example.com] Google account? Short version It's clear how an access token supplied through the Google…
Jon Cram
  • 16,609
  • 24
  • 76
  • 107
187
votes
10 answers

What are WSDL, SOAP and REST?

What is WSDL? How is it related to SOAP? Where does REST fit in all of that?
javaguy
  • 4,404
  • 10
  • 32
  • 35
183
votes
11 answers

Secure Web Services: REST over HTTPS vs SOAP + WS-Security. Which is better?

I'm not a security expert by any means, but I favor creating REST-style web services. In creating a new service which needs to have the data it transmits secure. We've entered a debate over which approach is more secure - REST with HTTPS or a…
Vinnie
  • 12,400
  • 15
  • 59
  • 80
180
votes
8 answers

Patterns for handling batch operations in REST web services?

What proven design patterns exist for batch operations on resources within a REST style web service? I'm trying to be strike a balance between ideals and reality in terms of performance and stability. We've got an API right now where all operations…
Mark Renouf
  • 30,697
  • 19
  • 94
  • 123
177
votes
7 answers

EOFError: end of file reached issue with Net::HTTP

I am using ruby-1.8.7-p302/Rails 2.3.11. I am trying to use FQL (Facebook API) to get stats for a link. Here's my code: def stats(fb_post_url) url = BASE_URI + "?query=#{URI.encode("select like_count from link_stat where…
Rahul Singh
  • 2,032
  • 2
  • 16
  • 17
163
votes
8 answers

jQuery Call to WebService returns "No Transport" error

I have the following web service; [WebMethod] public string HelloWorld() { return "Hello World"; } It's stock standard with no alterations to the class decorators. I have this jQuery method; var webMethod =…
griegs
  • 22,624
  • 33
  • 128
  • 205
159
votes
7 answers

Filling a DataSet or a DataTable from a LINQ query result set

How do you expose a LINQ query as an ASMX web service? Usually, from the business tier, I can return a typed DataSet or a DataTable which can be serialized for transport over ASMX. How can I do the same for a LINQ query? Is there a way to populate…
Geoff Dalgas
  • 6,116
  • 6
  • 42
  • 58
156
votes
13 answers

What is the difference between a web API and a web service?

Is there any difference between a web API and a web service ? Or are they one and the same ?
sansh
  • 1,678
  • 2
  • 11
  • 8
153
votes
11 answers

Why would one use REST instead of SOAP based services?

Attended an interesting demo on REST today, however, I couldn't think of a single reason (nor was one presented) why REST is in anyway better or simpler to use and implement than a SOAP based Services stack. What are some of the reasons Why anyone…
AngryHacker
  • 59,598
  • 102
  • 325
  • 594
153
votes
1 answer

SOAP server and client application VCL+indy demo for Delphi XE?

Delphi used to include a demos folder for web Services, but no longer seems to include this. I just tried the Delphi 7 demo projects (SOAPDMServerWAD, a server with almost no UI at all, and SOAPDMClient) and was unable to get them to function, even…
Warren P
  • 65,725
  • 40
  • 181
  • 316
152
votes
7 answers

RESTfully design /login or /register resources?

I was designing a web app and then stopped to think about how my api should be designed as a RESTful web service. For now, most of my URI's are generic and might apply to various web apps: GET /logout // destroys session and redirects to / GET …
Qcom
  • 18,263
  • 29
  • 87
  • 113
151
votes
24 answers

Multiple contexts with the same path error running web service in Eclipse using Tomcat

This is the error that I got when I created my first Axis2 web service using Eclipse. After I wrote the class, I created the web service with Apache Axis2. When I click the start server button in eclipse it gives an error message: Could not publish…
kkk
  • 1,551
  • 2
  • 10
  • 9