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: GET POST PUT DELETE 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: Well-formed XML. The variable containing this payload must be a document-type. Well-formed JSON. The variable containing this payload must be a document-type. A string in any form except name/value pairs. The variable containing this payload must have a string datatype. 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: Well-formed XML HTML JSON 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: native = does not normalize feed results. rss = normalizes the feed results to RSS 2.0. atom = normalizes the feed results to Atom 1.0. | |||
followredirects | An optional attribute to explicitly control whether <directinvoke> follows redirect directives from the endpoint: If omitted, redirects are accepted when method is GET and are ignored for any other method type. true = follow endpoint redirects regardless of the method. false = ignore endpoint redirects regardless of the method. | |||
htmlparser | The HTML parser to use to fix an HTML response if the response is not well-formed: tagSoup = the default parser for versions 3.8 and later. jtidy = JTidy was the parser used in mashups for version 3.7 or earlier. Choose this option if the mashup needs backwards compatibility. | |||
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: abort = Stops all further mashup or macro processing after an invocation error. If <directinvoke> is located inside a <try> block, any exceptions may still be caught and handled by subsequent <catch> blocks. continue = Continues mashup or macro processing after an invocation error.
See Lightweight Error Handling for Component Mashups and Mashables for more information. |