WsUploadDataEx
Upload data to a WebService endpoint using a POST request.
Syntax
bool WsUploadDataEx (string url, string uploadData, string sessionkeys, string format, string method, string responsefile)
Parameters
- string url
- Required: the URL of the web service.
- string uploadData
- Required: the data to upload.
- string sessionkeys
- Optional: comma-separated list of session key names.
- string format
- Optional: return format type. The default is xml.
- string method
- Optional: the file upload method. By default, 'POST','PUT' is used for http and 'STOR' for ftp.
- string responsefile
- Optional: save the response results to this file for later use.
Returns:
True, if the action succeeds. Otherwise, False.Level
All levels.Details
Upload data to a WebService endpoint using a specified method request.Smart parameters are supported for all parameters.
Example
The example shows how to use wTM endpoints to log on and create a batch:WsSetHeader("@STRING(Content-Type)", "@STRING(application/xml)", false)
WsUploadDataEx("http://localhost:82/service/Session/LogonEx?loadUserProfile=true", " TravelDocs admin 1 admin ", "Set-Cookie", "xml", "POST","C:\myfolder\logon.xml")
WsUploadFileEx("http://localhost:82/service/Queue/UploadFile/TravelDocs/@B.QID", "C:\Datacap\TravelDocs\images\car2.tif", "Set-Cookie", "POST","c:\Datacap\response.txt")
WsUploadDataEx("http://localhost:82/service/Queue/ReleaseBatch/TravelDocs/@B.QID/finished","","Set-Cookie", "xml", "PUT","")