URL | (String)
The URL address of the data Web server where the XML data have to be sent. The PROMOTIC application as the Web server offers the data usually on the path (see the "PmaDataTable > Web server" tab): http://ComputerName:Port/ComponentId/data.xml Caution! Beginning of the address ("http:") must be entered! If you want to enter the address of the local computer, then it is possible to enter the localhost word as the ComputerName. The Port needn't be entered if the Web server is on the standard port 80. The communication also works on secured Web server at address https://... |
---|---|
sParam | (String) Additional parameters of the transfer. This is the text in the form, for example: "fmt:purevalue;user:NAME1;psw:PASSWORD1;".
fmt (mandatory) - Named format of the sent XML data. The PROMOTIC system in the meantime offers only the "purevalue" format.
user - User name for the authentication. See "WebWrite" permission on the server. If not set and the site requires the authentication, then the onEndOfTransfer event is triggered with the error pEvent.Error=40.
psw - Password of the user for the authentication. This parameter is ignored if the user parameter is missing. |
var oDataTable = pMe.Pm("/DataTable");
if (oDataTable.WebClientIsReady)
{
oDataTable.WriteToWeb("http://ComputerName:Port/ComponentId/data.xml", "fmt:purevalue;user:oper;psw:ABCD");
}
else
{
Pm.Debug("Web client is not ready (is still active)");
}