HTTP(S) Connector
This adapter communicates with servers via the HyperText Transfer Protocol (HTTP) or HTTP Secure (HTTPS) based on the Apache HttpClient version 4. The adapter provides the standard HTTP methods GET
, POST
, PUT
, DELETE
, HEAD
, OPTIONS
, TRACE
, and PATCH
. In addition, custom HTTP methods can be used. The adapter supports HTTP Basic, Digest, and NTLMv2 authentication, as well as proxy servers and preemptive authentication. The adapter also supports Server Name Indication for HTTPS connections and client certificates for validating requests.
Note:
In standard mode (
fromXML
parameter disabled), the adapter may process any input document with unchanged content type and character encoding, depending on the operation.In expert mode (
fromXML
parameter enabled), the adapter processes a specific XML document that can include headers, cookie information, etc., and with which the HTTP(S) operation can be controlled in detail, see parameterfromXML
and the description of the input structure.This adapter replaces the existing HTTP(S) Communication adapter, see (7.4.0-en) HTTP(S) Communication (deprecated).
Properties
Operation | Describes which operation the adapter performs. Possible values:
|
Parameters
Adapter | Main class of the adapter (do not change!) Possible values: de.softproject.integration.adapter.http4.HttpClient4Adapter: Main class (Default) |
protocol | AI gateway protocol used (HTTP or HTTPS) Possible values:
|
host | IP address or host name of the IMAP server Note: The Possible values: Any valid string without protocol specification (e.g. google.com) |
vHost | Host name of a logical server (virtual host) if it cannot be uniquely identified by the physical specification in the host parameter Note: The The ports can be specified here, except ports 80 (default for HTTP connections) and 443 (default for HTTPS connections). Possible values: Any valid string without protocol specification (e.g. google.com) |
port | Port number of the HTTP(S) service Possible values:
|
path | Folder path on the server, starting with a forward slash Possible values: Any path (e.g. |
method | Name of the HTTP method to be used in the Possible values: Any string |
authenticationEncoding | Character encoding for credentials Possible values: Define a character encoding, e.g.
|
query | Argument(s) for the HTTP(S) request Possible values: Any URL-encoded arguments without a leading question mark (e.g. |
username | Username for Basic, Digest, or NTLM authentication Possible values:
|
password | Password for Basic, Digest, or NTLM authentication Possible values: Any string |
token | Token for Bearer authentication
|
ntlmWorkstation | Client workstation (computer name) (for NTLM authentication only, see Possible values: Any valid workstation name |
ntlmDomain | Domain name (for NTLM authentication only, see Possible values: Any valid domain name (NetBIOS Name) |
usePreemptiveBasicAuth | Enables preemptive authentication (using the credentials from the username and password parameters) for HTTP(S) calls (for basic authentication only, see allowBasic parameter) Possible values:
|
allowBasic | Use HTTP(S) Basic authentication Possible values:
|
allowDigest | Use Digest authentication Possible values:
|
allowNtlm | Use proprietary NTLM server authentication by Microsoft Possible values:
|
fromXml | Activates the expert mode. The adapter expects a specific XML document including headers, cookie information, etc., with which the HTTP(S) operation can be controlled in detail. Note: In expert mode, the Possible values:
|
toXml | Outputs all headers as elements and the body content as Base64-encoded text in an XML document Possible values:
|
hideCookieHeader | Also outputs header elements with cookie information in the result XML document (if the Possible values:
|
useProxy | Use a proxy server to connect Possible values:
|
proxyHost | IP address or host name of the IMAP server Possible values: Any valid string (e.g. |
proxyPort | Port number of the proxy server Possible values:
|
proxyUsername | User name for Basic, Digest, or NTLM authentication on the proxy server Possible values:
|
proxyPassword | Password for the proxy server Possible values: Any string |
proxyNtlmWorkstation | Workstation (computer name) from which the authentication request originates (for NTLM authentication via NTLM proxy) Possible values: Any workstation name |
proxyNtlmDomain | Windows domain for NTLM authentication via NTLM proxy Possible values: Any domain name |
proxyUsePreemptiveBasicAuth | Enables preemptive authentication (with the credentials from the Possible values:
|
proxyAllowBasic | Use Basic authentication for the proxy Possible values:
|
proxyAllowDigest | Use Digest authentication for the proxy Possible values:
|
proxyAllowNtlm | Use the proprietary NTLM authentication by Microsoft for the proxy Possible values:
|
connectTimeout | Time limit for establishing a connection in milliseconds Possible values:
|
socketTimeout | Timeout value between two incoming data packets in milliseconds; this does not tell you about the total request time. Possible values:
|
redirectsEnabled | Allows URL redirects for a server response with the Possible values:
|
circularRedirectsEnabled | Allows circular redirects for a server response with the Possible values:
|
maxRedirects | Maximum number of possible URL redirects for a server response with the Possible values:
|
acceptAllCertificates | Turns off certificate verification Possible values:
|
acceptAllSslHostnames | Turns off hostname verification for certificates Possible values:
|
useClientCertificate | Use client certificates to validate the request Possible values:
|
keystoreType | Keystore type for storing client certificates (as per http://docs.oracle.com/javase/6/docs/technotes/guides/security/StandardNames.html#KeyStore) Possible values:
|
keystoreURL | URL to the keystore for validating the request via client certificates Possible values: Any valid URL, e.g. |
keystorePassword | Password for the keystore to validate the request via client certificates Possible values: Any valid string |
keyAlias | Key alias used to access a specific key within the keystore Possible values: Any valid string |
aliasPassword | Associated password for a specific key within the keystore Possible values: Any valid string |
Status values
-1 | Technical error: Server does not respond or adapter input XML cannot be processed (only if expert mode is enabled via fromXml parameter) |
>=100 | Three-digit HTTP status code depending on the result of the call, see http://tools.ietf.org/html/rfc2616#section-6.1.1 |
Input (standard mode)
In standard mode (fromXML
parameter disabled), the adapter may process any input document with unchanged content type and character encoding, depending on the operation; see Document Properties Changer.
Input (expert mode)
In expert mode (fromXML
parameter enabled), the adapter processes a specific XML document that can include headers, cookie information, etc., and with which the HTTP(S) operation can be controlled in detail.
This XML structure essentially corresponds with both the XML structure that the adapter outputs when the toXml
parameter is enabled and the X4 REST interface (if the respective URI operation is defined in the isDirect="false"
attribute in the <X4>/X4DB/0/restconfig.xml
configuration file). The only difference to the X4 REST result XML document is that it provides the Base64-encoded body in a <Content>
element (instead of in <Body>
in the adapter).
The <Cookies>
element may also contain cookie information in one <Cookie>
element respectively:
<Request>
<Headers>
<Header>
<Name><!--HTTP-Header-Name--></Name>
<Value><!--Header-Wert--></Value>
</Header>
<!-- Oder bei Datumswerten: -->
<Header>
<Name><!--HTTP-Header-Name--></Name>
<Date timezone="Zeitzone"><!--Header-Datumswert--></Date>
</Header>
</Headers>
<Cookies>
<Cookie expires="Verfallsdatum" path="Pfad" domain="Domäne">
<Version><!--Versionsnummer--></Version>
<Secure/> <!-- Wenn Secure-Attribut gesetzt -->
<Persistent /> <!-- Bei einem persistenten Cookie -->
<Domain><!--Domäne--></Domain>
<Path><!--Pfad--></Path>
<Name><!--Cookie-Name--></Name>
<Value><!--Cookie-Wert--></Value>
<ExpiryDate><!--Verfallsdatum im Format YYYY-MM-DD hh:mm:ss--></ExpiryDate>
</Cookie>
</Cookies>
<Body><!--Base64-kodierte Daten der HTTP-Anfrage--></Body>
</Request>
Execute operation
With the Execute
operation in conjunction with the activated fromXML
parameter , the HTTP method can also be set in the input XML as follows:
<Request method="CUSTOM_METHOD">
<Headers>
<!-- ... -->
</Headers>
<Cookies>
<!-- ... -->
</Cookies>
<Body><!--Base64-kodierte Daten der HTTP-Anfrage--></Body>
</Request>
Output
By default (if the toXml
parameter is disabled), the result document of the HTTP(S) call is output.
If the toXml
parameter is enabled, an XML document is output that contains all the HTTP headers of the response in one <Header>
element respectively. If a header value contains several values separated by commas, these partial values are also specified in one <Element>
element at a time in the <Name>
and <Value>
child elements.
The body content is contained as a Base64-encoded string in the <Body>
element. If the hideCookieHeader
parameter has been deactivated, each header that led to the cookie is also output.
<Response>
<Request line="HTTP-Anfragezeile">
<Method><!--HTTP-Methode--></Method>
<URI><!--Pfad auf dem Server--></URI>
<Protocol>HTTP/1.1</Protocol>
</Request>
<Status line="HTTP-Statuszeile">
<Code><!--Dreistelliger Statuscode--></Code>
<Reason><!--Statusname--></Reason>
<Protocol><!--HTTP/1.1</Protocol>
</Status>
<Headers>
<Header>
<Name><!--HTTP-Header-Name--></Name>
<Value><!--Header-Wert--></Value>
</Header>
<!-- Oder bei Datumswerten: -->
<Header>
<Name><!--HTTP-Header-Name--></Name>
<Date timezone="Zeitzone"><!--Header-Datumswert--></Date>
</Header>
</Headers>
<Cookies>
<Cookie expires="Verfallsdatum" path="Pfad" domain="Domäne">
<Version><!--Versionsnummer--></Version>
<Secure/> <!-- Wenn Secure-Attribut gesetzt -->
<Persistent /> <!-- Bei einem persistenten Cookie -->
<Domain><!--Domäne--></Domain>
<Path><!--Pfad</Path>
<Name><!--Cookie-Name--></Name>
<Value><!--Cookie-Wert--></Value>
<ExpiryDate><!--Verfallsdatum im Format YYYY-MM-DD hh:mm:ss--></ExpiryDate>
</Cookie>
</Cookies>
<Body><!--Base64-kodierte Daten im Body der Antwort--></Body>
</Response>