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
307
votes
6 answers

Guid is all 0's (zeros)?

I'm testing out some WCF services that send objects with Guids back and forth. In my web app test code, I'm doing the following: var responseObject = proxy.CallService(new RequestObject { Data = "misc. data", Guid = new Guid() }); For some…
Didaxis
  • 8,486
  • 7
  • 52
  • 89
300
votes
15 answers

Request format is unrecognized for URL unexpectedly ending in

When consuming a WebService, I got the following error: Request format is unrecognized for URL unexpectedly ending in /myMethodName How can this be solved?
roman m
  • 26,012
  • 31
  • 101
  • 133
298
votes
10 answers

How to call a REST web service API from JavaScript?

I have an HTML page with a button on it. When I click on that button, I need to call a REST Web Service API. I tried searching online everywhere. No clue whatsoever. Can someone give me a lead/Headstart on this? Very much appreciated.
Shaik Syed Ali
  • 3,359
  • 3
  • 17
  • 22
294
votes
12 answers

REST API 404: Bad URI, or Missing Resource?

I'm building a REST API, but I've encountered a problem. It seems that accepted practice in designing a REST API is that if the resource requested doesn't exist, a 404 is returned. However, to me, this adds unnecessary ambiguity. HTTP 404 is more…
Brian Lacy
  • 18,785
  • 10
  • 55
  • 73
294
votes
7 answers

How do I upload a file with metadata using a REST web service?

I have a REST web service that currently exposes this URL: http://server/data/media where users can POST the following JSON: { "Name": "Test", "Latitude": 12.59817, "Longitude": 52.12873 } in order to create a new Media metadata. Now I…
Daniel T.
  • 37,212
  • 36
  • 139
  • 206
288
votes
5 answers

Message Queue vs. Web Services?

Under what conditions would one favor apps talking via a message queue instead of via web services (I just mean XML or JSON or YAML or whatever over HTTP here, not any particular type)? I have to talk between two apps on a local network. One will be…
Dan Rosenstark
  • 68,471
  • 58
  • 283
  • 421
265
votes
5 answers

Jquery Ajax Posting JSON to webservice

I am trying to post a JSON object to a asp.net webservice. My json looks like this: var markers = { "markers": [ { "position": "128.3657142857143", "markerPosition": "7" }, { "position": "235.1944023323615", "markerPosition": "19" }, {…
Code Pharaoh
  • 3,044
  • 2
  • 22
  • 26
261
votes
10 answers

AngularJS $http and $resource

I have some web services that I want to call. $resource or $http, which one should I use? $resource: https://docs.angularjs.org/api/ngResource/service/$resource $http: https://docs.angularjs.org/api/ng/service/$http After I read the two above API…
Tom
  • 15,781
  • 14
  • 69
  • 111
231
votes
11 answers

Restful API service

I'm looking to make a service which I can use to make calls to a web-based REST API. Basically I want to start a service on app init then I want to be able to ask that service to request a url and return the results. In the meantime I want to be…
Martyn
  • 16,432
  • 24
  • 71
  • 104
227
votes
11 answers

Web service differences between REST and RPC

I have a web service that accepts JSON parameters and have specific URLs for methods, e.g.: http://IP:PORT/API/getAllData?p={JSON} This is definitely not REST as it is not stateless. It takes cookies into account and has its own session. Is it…
Mazmart
  • 2,703
  • 4
  • 17
  • 20
225
votes
7 answers

How to access SOAP services from iPhone

I'm planning to develop an app for the iPhone and that app would have to access a couple of SOAP services. While doing some basic checking in the iPhone SDK I was not able to find any support for accessing SOAP services, a bit of Googling lead to…
Gero
  • 2,967
  • 6
  • 22
  • 20
213
votes
9 answers

API vs. Webservice

What is the difference between a webservice and an API? Is the difference more than the protocol used to transfer data? thanks.
chips
  • 2,296
  • 2
  • 16
  • 17
212
votes
14 answers

Setting HttpContext.Current.Session in a unit test

I have a web service I am trying to unit test. In the service it pulls several values from the HttpContext like so: m_password = (string)HttpContext.Current.Session["CustomerId"]; m_userID = (string)HttpContext.Current.Session["CustomerUrl"]; in…
DaveB
  • 2,199
  • 2
  • 14
  • 11
210
votes
8 answers

What is the difference between XSD and WSDL?

What is the difference between an XML Schema and WSDL? The difference I noticed is that WSDL contains XSD and in WSDL we can declare operations, but not in XSD. Is that correct?
make
  • 755
  • 7
  • 21
  • 37
206
votes
8 answers

Difference between OData and REST web services

What is the difference between OData and REST-ful web services?
Scott
  • 11,046
  • 10
  • 51
  • 83