HTTP adapter request and response for a Get action
The HTTP adapter can retrieve data from a specified URL by using a Get action. You must enter the Get action in theAction field of the Properties tab for the Call Adapter activity. When you use a context item as an input for an adapter request, you must enclose the adapter request in the <request-data>
elements. However, when you create a static request, <request-data>
is not required and the adapter request starts with the <adapterName-adapter-request>
element.
Recommendation
The HTTP adapter supports both <httpAdapterRequest>
and <http-adapter-request>
tags for an adapter request; however, only the <httpAdapterResponse>
tag is supported for an adapter response.
BMC recommends that you use the <httpAdapterRequest>
root tag for the adapter request.
The following table describes the adapter request elements for the HTTP adapter with a Get action.
Elements for an HTTP adapter request with a Get action
Element | Description | Required |
---|---|---|
| Specifies the URL for the target page | Yes |
| Determines whether to establish a secure connection | No |
| Specifies whether to allow unsigned certificates from trusted zones | No |
| Determines whether to install certificates | No |
| Specifies the Java Standard Trust Keystore passphrase Warning
| No |
| Indicates the data type for the adapter response | No |
| Specifies an XML document that includes HTTP connection properties, which contain the | No |
| Specifies the user name required for basic or NTLM authentication specified in | No |
| Specifies the password corresponding to the user name specified in | No |
| Indicates whether to use NTLM authentication for the target server for the specified user credentials | No |
| Specifies the type of data format for HTTP content | No |
| Specifies the supporting CharSet | No |
| Contains the elements that specify information about the public key (X.509 certificate) and the private key that are used for the digital signature
| No |
| Specifies the path to the JKS that contains the client certificate | Conditional; required when |
| Specifies the password of the key contained in the JKS | No |
| Specifies the password to the JKS | Conditional; required when |
| Specifies the name of the alias in the JKS that identifies the Public Key Certificate (PKC) that the web server uses to authenticate the client | Conditional; required when |
| Specifies the file containing the private key that is used to sign the HTTP request
| Conditional; required when |
| Specifies the file containing the public key (X509 Certificate)
| Conditional; required when |
| Contains an XML file specifying the private key in an Base64-encoded PEM format | Conditional; required when |
| Contains an XML file specifying the public key (X509 Certificate) in an Base64-encoded PEM format | Conditional; required when |
| Specifies whether the adapter should treat the input data in the request and the data received in the adapter response as a JavaScript Object Notation (JSON) string
| No |
| Specifies whether the adapter should redirect a URL request to the changed URL location | No |
| Specifies whether the adapter should display the content of the attached file in the adapter response or save the content in a file | No |
| Specifies the full path where the attached file must be downloaded | No |
<request-timeout> | Specifies the time (in seconds) to wait when establishing a connection Default value: 10 seconds. | No |
<ignore-line-break-in-response> | Specifies whether to ignore the line breaks while generating the adapter response If true, the line break markups are ignored and the response is returned as a single line. If false, the line break markers (if specified in the adapter response) are retained. Valid values: true (default), false | No |
Note
The HTTP adapter request is the request generated by the HTTP adapter; the HTTP request is the request sent to the HTTP server.
The HTTP adapter generates a response to the HTTP request (URL) defined in the adapter request.
The following table describes the elements of the response to an HTTP adapter request with a Get action, when<data-format>
is HTML for any <Content-Type>
of HTTP server response.
Elements of an HTTP adapter response to a request with a Get action when <data-format>
is HTML for any<Content-Type>
of HTTP response
Element | Description |
---|---|
| Specifies the status of the adapter request |
| Contains the |
| Contains the |
| Specifies the numeric status code for the response |
| Specifies the reason associated with the status code |
| Contains the |
| Specifies the field name returned from the adapter request in the HTTP header data |
| Contains the message body of the HTTP response in text format |
Elements of an HTTP adapter response to a request with a Get action when <data-format>
is XHTML or XML and <Content-Type>
is a well-formed text, HTML, or XML
Element | Description |
---|---|
| Contains the |
| Specifies the numeric status code of a response |
| Specifies the reason associated with the status code |
| Contains the |
| Specifies the field name returned from the adapter request |
| Contains the message body of the HTTP response in XML format or uncorrected HTML format, not in character data (CDATA) format Note If the output is not in the specified format, the output is enclosed in the |
Note
<script>
and <style>
elements are deleted from the HTTP server response for XHTML data format.
Note
If the output is not in the format that you want, it is enclosed in <non-xmldata-response>
tags.
Note
The JSON string is processed only if it is contained in the <body>
, <message-body>
, or <non-xml-data-response>
elements.
Comments
In this sample, where is the documentation for <html-syntax-correction> ?
Sample:
<httpAdapterRequest>
<action>http:
//2.2.2.2:10800/test.txt</action>
<ignore-line-
break
-in-response>
false
</ignore-line-
break
-in-response>
<data-format>XML</data-format>
<html-syntax-correction>
false
</html-syntax-correction>
</httpAdapterRequest>
Hi Jim,
I am following up with the team on this and will update the docs soon.
Thanks!
Log in or register to comment.