July 2002
Beginner
720 pages
14h 35m
English
To communicate with web services, we can use HTTP-GET, HTTP-POST or SOAP protocols. HTTP-GET and HTTP-POST use HTTP as an underlying protocol and encode parameters as name/value pairs in the HTTP request. The GET method appends data to the URL of the server-side script, while POST methods encode name/value pairs in the body of the HTTP request message. The following examples show HTTP-GET and HTTP-POST requests and responses for the web service (for a description of this service see under Creating a web service later in this chapter). First is HTTP-GET:
GET /WebServices/wsdemo.asmx/GreetUser?Name=string HTTP/1.1 Host: localhost HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" ...
Read now
Unlock full access