You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Each SOAP request is transported via HTTP. The contents of the HTTP header can be accessed after the SOAP call, e.g. to check the HTTP status code.

The following example shows a SOAP adapter call with getting the HTTP header.

You can also read dedicated headers using the getServiceContextValue() Function.

HTTP Headers

Parameter response contains the HTTP response of the SOAP call.

Runtime 2019.9 With xUML service adapter calls, the xUML Runtime adds the following outgoing HTTP headers containing correlation information to the request:

  • 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. 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 identifies the unique request. The Runtime generates a unique number for each adapter call.
  • X-Sender-Host and X-Sender-Service
    These headers contain the sender host resp. the sender service. They are set by the Runtime automatically.

Transaction id and request id will be logged to the transaction log on the adapter call. Having this information, you can use this for error analysis or usage metrics.

Accessing the Headers

ClassAttributeTypeDescription
HTTPTransportheadersArray of HeaderField

DeprecatedThis attribute is deprecated as of Runtime 2020.11. Please use httpHeaderMap (see below) for new implementations as its implementation complies to the HTTP specification.

Header information as array of name/value pairs.

statusCodeIntegerHTTP status code of the SOAP request.
httpHeaderMapMap of EntryRuntime 2020.11 Header information as a map. The map contains arrays of header value strings whereas the header name is the key of the map.
  • Header names are lowercase and treated case insensitive.
  • Multiple headers with the same name are treated as arrays.

Refer to HTTP Header Support for more information on the standard xUML HTTP headers.

ClassAttributeType
EntrykeyString
valueArray of Any. The dynamic type for httpHeaderMap is String.
HeaderFieldname
value
  • No labels