Exchange XML-based messages using the HttpRequest
by the POST
This preconfiguration can be activated when creating a new object (e.g. by "New object ..."
in the local object menu or by pressing the Insert
key after selecting the object) and is included in the group: "/ Communication / Protocols and other communications / HTTP - XML, JSON, CSV, SOAP, text"
This preconfiguration can be created in the object: PmaFolder
- The preconfiguration is created including the panel (object of the PmaPanel
type) is functional also as Web panel
object has a pair of related user methods. One sets the desired structure of the data to be sent and sends it using the Add
method of the PmaSequencer
object with the appropriate communication parameters. The second related method processes the incoming data. The onStep
event of the PmaSequencer
object uses the first two parameters to send the communication request. And it uses the third parameter to call a specific method, which passes the xml
content of the received response.
object is configured in order to have each communication running outside the main working thread of the PROMOTIC application. In the onStep
event, there is an ActiveX Microsoft.XMLHTTP
object that gets the corresponding parameters for synchronous mode communication by the open
method. The "send"
method follows sends the data. The received xml data is passed to a specific method for processing. The transmission is terminated by the abort
The testing panel PmaPanel
allows to run preconfigured methods and to display unprocessed received data.
These configurators can be set before the preconfiguration is created:
|The name of created object||Name of the object created in the Pma objects tree. The maximum name length is 30 characters. This is a system name, so it must contain only alphanumeric and must not contain any diacritics (i.e. national dependent characters), empty string, spaces and the first character must not be a number.
|Create test panel||Creates panel used for communication testing and displaying of received data|
|Enable as Web component||Specifies whether this object has to be registered as a Web server component
After the preconfiguration is created, the "PmaPanel > Web server > Enable as Web component" configurator will be set to this value.
|PmaWeb object||Path in the Pma objects tree to the object PmaWeb, PmaWebFolder or PmaWebLang where the registration is carried out.
Macro expression can be used for input (it is evaluated after the application is launched).
After the preconfiguration is created, the "PmaPanel > Web server > PmaWeb object" configurator will be set to this value.