ajCallWsSoap function
Description
The ajCallWsSoap function returns data from a SOAP web service on the internet or intranet.
Syntax
ajCallWsSoap(url As String, [http_method], [body], [user_name], [password], [header], [content_type], [run_condition], [run_by_function_point_only])
Argument Name | Description |
---|---|
url (required) | Specify the URL of the web service call. |
http_method (optional) | Specify the HTTP method to call the web service. 0 indicates a POST request. 1 indicates a GET request. If you do not specify anything, the default value will always be “0”. |
body (optional) | Specify the body for HTTP calls from a range of cells. The range of cells can span across multiple rows and columns. Each row represents a broken line and all the columns will be concatenated. If you do not specify anything, the default value will always be an empty string (“”). |
user_name (optional) | Specify the username to access the web service call if applicable. If you do not specify anything, the default value will always be an empty string (“”). |
password (optional) | Specify the password of the username to access the web service call if applicable. If you do not specify anything, the default value will always be an empty string (“”). |
header (optional) | Specify the HTTP header from a range of cells. The first column should contain a header field name. The second column should contain a header field value. If you do not specify anything, the default value will always be an empty string (“”). |
content_type (optional) | Specify the content type of the HTTP request to the web service call. |
run_condition (optional) | The function will run when the value is TRUE. Otherwise will not run. If you do not specify anything, the default value will always be TRUE. |
run_by_function_point_only (optional) | If it equals FALSE, the function can be executed through ‘Excel Calculation’ (can be either Automatic or Manual, Calculate Now or Calculate Sheet) or Run Function Point. If it equals TRUE, the function can be executed with Run Function Point (AlchemyJ toolbar \ Run Function Point) only. If you do not specify anything, the default value will always be TRUE. |
The function will return:
Content type: HTTP response body
Method: Within a cell / cell array
Example
Below is an example of a GET request in Postman.
As you can see from the above example, calling of the ajCallWsSoap function is successful and the result returned is the corresponding HTTP response body (same as in Postman).
#VALUE! will be returned when there is an error in the usage of the function.