| 4D v13.4SOAP SEND FAULT | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|  | 
    4D v13.4
 SOAP SEND FAULT 
         | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| SOAP SEND FAULT ( faultType ; description ) | ||||||||
| Parameter | Type | Description | ||||||
| faultType | Longint |   | 1 = Client fault, 2 = Server fault | |||||
| description | String |   | Description of error to be sent to SOAP client | |||||
The SOAP SEND FAULT command returns an error to a SOAP client indicating the origin of the fault: client or server. Using this command lets you indicate an error to a client without having to return a result.
For instance, a fault on the client side may be detected when you publish a “Square_root” Web Service and a client sends a request with a negative number; you can use this command to indicate to the client that a positive value is required.
A possible fault on the server side may be, for instance, a lack of memory occurring during method execution.
Pass the origin of the error in faultType. You can use the following predefined constants, located in the Web Services (Server) theme:
| Constant | Type | Value | 
| SOAP Client Fault | Longint | 1 | 
| SOAP Server Fault | Longint | 2 | 
Pass a description of the error in description. If the client implementation is in conformity, the error can be processed.
To go back to the example of the “Square_root” Web Service provided in the command description, the following command can be used to process requests with negative numbers:
 SEND SOAP FAULT(SOAP Client Fault;"Positive values required")
	Product:  4D
	Theme:  Web Services (Server)
	Number:  
        781
        
        
        
	

	Created:  4D 2003
	Renamed: 4D v13
SOAP DECLARATION
SOAP Get info