HTTP Service
The Bridge can be used as HTTP server or as HTTP client. In order to access HTTP resources (backends), the URL adapter can be used.
In order to act as server, an HTTP frontend can be defined for a service.
Example File (Builder project Basic Modeling/Frontend):
<your example path>\Basic Modeling\Frontend\uml\simpleHttpService.xml <your example path>\Basic Modeling\Frontend\uml\simpleRESTSupportManager.xml |
Refer to HTTP Header Support regarding general information on HTTP header support in this context.
Since Runtime 2018.5, the BRIDGE HTTP service supports IPv6.
HTTP Components
The HTTP service is defined in the component diagram as <<E2EHTTPService>> component containing one ore many <<E2EHTTPPortType>> classes:
Each <<E2EHTTPService>> contains the following tagged values:
Name Dialog / Tag | Description | Allowed Values / Examples | |||||
---|---|---|---|---|---|---|---|
Port (port) | Specifies the machine port number the service is binding to. This port number can be given at the service level only. | any number Using ports below 1024 may require additional privileges. | |||||
Trace Port (tracePort) | In order to test the HTTP service using the Trace Analyzer, the model compiler generates a SOAP interface for each HTTP service interface. The SOAP service will be listening on this trace port. | any positive integer | |||||
service port +40000 | default | ||||||
Max Request Body Size (maxRequestBodySize) | Runtime 2021.2 Specifies the maximum size of the request in KB (1 KB = 1024 Bytes). This can be used to prevent DoS or similar attacks. When the payload of the service exceeds the given maximum, incoming request are rejected. | any positive integer | |||||
0 | Accept unlimited requests (default of services compiled with Builder versions < 7.12.0). | ||||||
2048 | Builder 7.12.0 2MB, default if not specified | ||||||
Max Request Header Size (maxRequestHeaderSize) | Runtime 2022.6 Specifies the maximum size of the request header in KB (1 KB = 1024 Bytes). This can be used to prevent DoS or similar attacks. When the header payload of the service exceeds the given maximum, incoming request are rejected. Compatibility Hint For older Runtimes, a limit of 8 KB applies. | any positive integer | |||||
8 | 8 KB (default if not specified). | ||||||
Authentication Mode (authenticationMode) | Defines the authentication mode to be used with this SOAP service.
Independent of the authentication mode, the user is found in the principal object if the authentication succeeded. | none | no authentication | ||||
HTTPBasicAuth | HTTP basic authentication | ||||||
HTTPRemoteAuth | HTTP remote authentication | ||||||
User | Specifies user and password for the use of HTTP Basic authentication. | user/password |
At the moment HTTP is the only supported protocol. If HTTPS is required, use the BRIDGE Apache reverse proxy.
For a list of HTTP port type parameters refer to the reference page at HTTP Service Reference.
HTTP Headers
Runtime 2019.9 Bridge xUML services read the following incoming HTTP headers containing correlation information:
- X-Transaction-Id or xTransactionId (in JMS context)
This header identifies the transaction the call belongs to. You can set the transaction id manually with setTransactionID() Operation. If not set, the Runtime will generate one.
This header will be passed through the callstack to identify all service calls that belong to a transaction. - X-Request-Id
This header should identify the unique request. - X-Sender-Host and X-Sender-Service
These headers should contain the sender host resp. the sender service.
These headers will be all logged to the transaction log. Having this information, you can use this for error analysis or usage metrics.
HTTP Header Roles
Runtime 2020.12 If the standard HTTP header handling does not meet your needs, you can take control of the header handling by defining your own header roles.
Refer to HTTP Header Support > Overwriting the Standard HTTP Headers for a detailed explanation of how to use this feature.