After that, we create instances of the Sql Parameter objects to add parameters to the stored procedure.
Finally, we execute the stored procedure by using the Execute Non Query method of the Sql Command object.
An exception is any error condition or unexpected behavior encountered by an executing program.
To accomplish this, you need to make sure that the exceptions raised from the Web services are compliant with the SOAP specification.
If the Validate Xml method returns false, we throw Soap Exception by using a helper method named Raise Exception, which we will discuss in a moment.
The Raise Exception method is basically a helper method that encapsulates the code required for raising Soap Exception from the Web service.
Clients access these services through a programmable interface.
When there is an exception during the execution of the Web service, the Web service should not only capture the exceptions, but also communicate the exception back to the consumers of the Web service.
While your application can recover from some of these conditions, most of the runtime exceptions are irrecoverable.