WsUploadData

Upload data to a WebService endpoint using a POST request.

Syntax

bool WsUploadData (string url, string uploadData, string sessionkeys, string format, string responsefile)

Parameters

url
Required: the URL of the web service.
uploadData
Required: the data to upload.
sessionkeys
Optional: comma-separated list of session key names.
format
Optional: return format type. The default is xml.
responsefile
Optional: save the response results to this file for later use.

Returns:

True, if the action succeeds. Otherwise, False.

Level

All levels.

Details

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)
WsUploadData("http://localhost:8010/ServicewTM.svc/Session/Logon", 
   "Demo901admin1admin", "", "xml", "C:\myfolder\logon.xml")
WsUploadData("http://localhost:8010/ServicewTM.svc/Queue/CreateBatch",
   "Demo901Demo_SingleTIFFs", "Set-Cookie", "", "C:\myfolder\createbatch.xml")