Protocol Errors
Fundamentally, web services are not much more than sockets conveying specific information. A web service request and response involves these parts:
- Client opens a socket to the server
- Client formats an XML document
- Client sends the XML content over the socket
- Server recieves the XML content over the socket
- Server parses the content
- Server formats XML response content
- Server sends the response XML content over the socket
- Client recieves the XML response content over the socket
- Client parses the XML response content
Since the basis of this involves sockets, a wide range of socket errors can occur, all of which prevent successful web service use, all of which must be handled by client programmers.
Examples of these kinds of errors include, but are not limited to:
- Wrong URL endpoint
- SSL errors
- Wrong host name
- Wrong port number
- Certificate errors
- Socket timeout
- Socket creation failure
Your specific platform will dictate how these errors are revealed to the client application, and dictates somewhat how they are to be handled. In some cases, the error is revealed as a return code from a socket function. In other cases the error is revealed through the response buffer, which may or may not contain XML! As a client programmer you are responsible for identifying your particular platform's behavior.