SOAP Web Service Tutorials - Herong's Tutorial Examples - v5.13, by Herong Yang
Examples of HTTP 1.0 Requests and Responses
This section provides some tutorial examples of HTTP 1.0 requests and responses. Google and Wikipedia are still supporting HTTP 1.0 protocols.
Let's continue to try my Perl socket test program to send a simple HTTP 1.0 request to some other Web servers.
www.wikipedia.org used to accept my HTTP 1.0 request in 2009. But now it returns the 400 error too:
herong> perl SocketRequestResponse.pl www.wikipedia.org 80 \ http_get.req http_get.res herong> more http_get.res HTTP/1.1 400 Server: Varnish X-Varnish: 1060976594 X-Cache: cp1079 int X-Cache-Status: int-front Set-Cookie: WMF-Last-Access=... Set-Cookie: WMF-Last-Access-Global=... X-Client-IP: Content-Type: text/html; charset=utf-8 Content-Length: 1789 Connection: close <!DOCTYPE html> <html lang=en> <meta charset=utf-8> <title>Wikimedia Error</title> ...
www.apache.org used to accept my HTTP 1.0 request in 2009. But it also returns the 400 error now:
herong> perl SocketRequestResponse.pl www.apache.org 80 \ http_get.req http_get.res herong> more http_get.res HTTP/1.1 400 Bad Request Server: Apache/2.4.18 (Ubuntu) Content-Length: 226 Connection: close Content-Type: text/html; charset=iso-8859-1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>400 Bad Request</title> </head><body> <h1>Bad Request</h1> <p>Your browser sent a request that this server could not understand.<br /> </p> </body></html>
My HTTP 1.0 request worked nicely on www.google.com since 2009 and until 2018:
herong> perl SocketRequestResponse.pl www.google.com 80 \ http_get.req http_get.res herong> more http_get.res HTTP/1.0 200 OK Expires: -1 Cache-Control: private, max-age=0 Content-Type: text/html; charset=ISO-8859-1 P3P: CP="This is not a P3P policy! See g.co/p3phelp for more info." Server: gws X-XSS-Protection: 1; mode=block X-Frame-Options: SAMEORIGIN Set-Cookie: 1P_JAR=... Set-Cookie: NID=... Accept-Ranges: none Vary: Accept-Encoding <!doctype html> <html itemscope="" itemtype="http://schema.org/WebPage" lang="en"> <head> <meta content="Search the world's information, including webpages, ...> <meta content="noodp" name="robots"> ...
Table of Contents
Introduction to SOAP (Simple Object Access Protocol)
SOAP Message Transmission and Processing
SOAP MEP (Message Exchange Patterns)
PHP SOAP Extension Client Programs
PHP SOAP Extension Server Programs
PHP SOAP Web Service Example - getTemp
Perl SOAP::Lite - SOAP Server-Client Communication Module
►Perl Socket Test Program for HTTP and SOAP
SocketRequestResponse.pl - Socket Level Testing Program
►Examples of HTTP 1.0 Requests and Responses
Examples of HTTP 1.1 Requests and Responses
SOAP 1.1 Request - Content-Length Too Small
SOAP 1.1 Request - Content-Length Too Large
SOAP 1.1 Request and Response of GetTemp
SOAP 1.2 Request and Response of GetTemp
Perl SOAP::Lite for NumberToWords SOAP 1.1 Web Service
Perl SOAP::Lite for SOAP 1.2 Web Services
Java Socket and HttpURLConnection for SOAP
SAAJ - SOAP with Attachments API for Java
SoapUI - SOAP Web Service Testing Tool
WS-Security - SOAP Message Security Extension
WS-Security X.509 Certificate Token
Perl SOAP::Lite for GetSpeech SOAP 1.1 Web Service
Perl SOAP::Lite 0.710 for SOAP 1.2 Web Services
Perl SOAP::Lite 0.710 for WSDL