EVENT_PUBLISH (Publish Event to HTTP)

Publishes an event using the HTTP protocol

Syntax

CALL EVENT_PUBLISH(eventId, publishType, rc, properties,
<propValue1, ...propValueN> url <,url2, ...urlN> );

Required Arguments

eventID
identifies the event that is to be published.
Type:Numeric, Input
publishType
indicates how to publish the event. To publish the event by using the HTTP protocol, specify a publishType of TO_HTTP.
Type:Character, Input
rc
receives a return code.
Type:Numeric, Output
properties
identifies a comma-separated list of optional property names. Specify any of the following property names, or specify double quotation marks to indicate that no properties are to be applied:
  • HTTP_PASSWORD
  • HTTP_PROXY_URL
  • HTTP_USER
Type:Character, Input
url <,url2, …urlN>
identifies the URL(s) that will be used to publish the event.
Type:Character, Input

Optional Argument

propValue1, …propValueN
specifies one value for each specified property name. The order of the property values must match the order of the property names in the properties parameter. A value must be specified for each property that is specified in the properties parameter. Valid property values are defined as follows:
HTTP_PASSWORD specifies the password that is needed to bind to the network resources.
HTTP_PROXY_URL specifies the URL of the proxy server.
HTTP_USER specifies the user ID that is needed to bind to the network resources.
Type:Character or Numeric, Input

Details

If you specify multiple URLs, and if you specify the RESPONSE property in the EVENT_BEGIN CALL routine, then the response will be received and processed only for the URL that you specified first. The event is published to the first URL, and the response is written to the RESULT_URL location. For all remaining URLs, the event will be published, but the EVENT_PUBLISH CALL routine will not write the response to the RESULT_URL location. To process results from multiple URLs, issue EVENT_PUBLISH for each URL. Executing an EVENT_PUBLISH for each URL creates an explicit RESULT_URL for each response.

Example: Publishing an Event to HTTP

The following example publishes the event to the network resource by using the HTTP protocol. HTTP URL identifies the machine and port to use.
publishType = "TO_HTTP";
url = "http://myhost.com:40";
CALL EVENT_PUBLISH(eventId,
   publishType, rc, '', url);