Note: | For a sample using <directinvoke> with a SOAP server, see the soapservice.emml sample mashup. |
Can Contain | securityprofile? |
Allowed In | mashup | catch | else | elseif | for | foreach | if | macro | operation | sequence | try | while |
Name | Required | Description | ||
endpoint | yes | The URI to the endpoint for the publicly accessible web service or web site to invoke. This can be an explicit URL or dynamic using variables. See Dynamic Endpoints or Parameters for <directinvoke> for an example. The endpoint may use HTTPS and SSL for secure connections. <directinvoke> supports one-way SSL connections only. Certificates for secure endpoints are validated against certificates in the trust store configured for the JRE (Java Runtime Engine) where the Presto Server is running when the mashup script is run.
For certificates issued by well-known certificate authorities, no additional configuration is required. For self-signed certificates or certificates from other certificate authorities, however, you may simply add the public certificate for the endpoint to the default trust store to allow successful invocations. | ||
method | The HTTP method to use invoking this web site or web service: ![]() ![]() ![]() ![]() Other attributes for <directinvoke> depend on the method used. For more information, see: | |||
requestbody | An optional attribute for the name of the variable containing the body of the request to send when method is POST, PUT or DELETE and the content is not name/value pairs. The payload of the request body may be: ![]() ![]() ![]() See <directinvoke> Basics for POST Requests and Handling JSON Responses or Inputs for more information. | |||
header | The name of a document-type variable containing HTTP or web-service headers to use when this web or web site is invoked. The payload in a headers variable must be in the form: <header> web-service-specific header payload -- or -- <http-header-name>value</http-header-name> </header> See Adding HTTP Headers to <directinvoke> Requests for an example defining an HTTP header. See also Adding HTTP Basic Authentication to <directinvoke>
Requests. | |||
outputvariable | yes | The required variable to accept the output of this statement. For responses with complex data, this variable must have a document datatype. The response data can be either: ![]() ![]() ![]() With HTML or JSON responses, the subtype specified for the variable to contain the response affects how the response is parsed and converted. See Handling HTML Responses and Handling JSON Responses or Inputs for more information and examples. | ||
feedtype | An optional attribute for syndicated feeds identifying the protocol for normalization. See Normalization and
Presto
Support for RSS/Atom Formats for more information. Valid values include: ![]() ![]() ![]() | |||
followredirects | An optional attribute to explicitly control whether <directinvoke> follows redirect directives from the endpoint: ![]() ![]() ![]() | |||
htmlparser | The HTML parser to use to fix an HTML response if the response is not well-formed: ![]() ![]() | |||
responseheader | An optional attribute for the name of the variable to receive HTTP headers from the response. | |||
responsecode | An optional attribute for the name of the variable to receive the HTTP status code from the response. | |||
cookies | An optional attribute for the name of the variable to receive cookies from the response. | |||
bypassproxy | An optional attribute to have the invocation bypass the proxy server, if any. This is false by default. | |||
stream | An extension attribute for use with other extensions from the Real-Time Analytics Query Language. See RAQL
Extensions to
EMML
Statements for Streaming for more information. | |||
timeout | The maximum number of seconds to wait for a response before terminating the invocation to this web service or web site. The default timeout is 5 minutes. | |||
onerror | The behavior for the mashup or macro if errors occur when this web service or web site is invoked. Valid values include: ![]() ![]()
See Lightweight Error Handling for Component Mashups and Mashables for more information. |