HTTP adapter request and response for a DELETE action
The DELETE action requests the server to delete the resource identified by the request URL.
The following table describes the elements of an HTTP adapter request with a DELETE action:
Elements of an HTTP adapter request with a DELETE action
Element | Description | Required |
---|---|---|
<adapter-name> | Specifies the name of the adapter | No |
<action> | Specifies the URL for the target page | Yes |
<use-ssl-certificate> | Determines whether to establish a secure connection | No |
<install-certificate> | Determines whether to install certificates | No |
<allow-unsigned-certificate> | Specifies whether to allow unsigned certificates from trusted zones | No |
<passphrase> | Specifies the Java Standard Trust Keystore passphrase Verify the cacerts passphrase using the following command in UNIX or Linux: | No |
<data-format> | Indicates the data type for the adapter response | No |
<data> | Contains the data to be posted
| No |
<ntlm-authentication> | Indicates whether to use NTLM authentication for the target server for the specified user credentials | No |
<user-name> | Specifies the user name required for basic authentication | No |
<password> | Specifies the password corresponding to the user name provided for basic authentication | No |
<character-set> | Specifies the supporting CharSet | No |
<http-connection-properties> | Specifies an XML document that includes HTTP connection properties, which contain the <user-name> and <password> elements for basic or NTLM authentication | No |
<user-name> | Specifies the user name required for basic or NTLM authentication specified in <http-connection-properties> | No |
<password> | Specifies the password corresponding to the user name specified in <http-connection-properties> | No |
<signature-properties> | 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 |
<keystore-file> | Specifies the path to the JKS that contains the client certificate | Conditional; required when <signature-properties mode="keystore"> |
<key-password> | Specifies the password of the key contained in the JKS | No |
<keystore-password> | Specifies the password to the JKS | Conditional; required when <signature-properties mode="keystore"> |
<alias> | 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 <signature-properties mode="keystore"> |
<private-key-file> | Specifies the file containing the private key that is used to sign the HTTP request
| Conditional; required when <signature-properties mode="key-files"> |
<certificate-file> | Specifies the file containing the public key (X509 Certificate)
| Conditional; required when <signature-properties mode="key-files"> |
<private-key-data> | Contains an XML file specifying the private key in an Base64-encoded PEM format | Conditional; required when <signature-properties mode="key-data"> |
<certificate-data> | Contains an XML file specifying the public key (X509 Certificate) in an Base64-encoded PEM format | Conditional; required when <signature-properties mode="key-data"> |
<enable-json-conversion> | 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 |
<request-timeout> | Specifies the time (in seconds) to wait when establishing a connection | 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 Note: You can specify the <ignore-line-break-in-response> element when the <content-type> is plain/text. | No |
XML sample of the HTTP adapter response with a JSON string in <message-body> after parsing
<metadata>
<status>success</status>
</metadata>
<status-line>
<code>200</code>
<reason>OK</reason>
</status-line>
<header-lines>
<Transfer-encoding>chunked</Transfer-encoding>
<Content-type>text/html</Content-type>
</header-lines>
<message-body>
<html lang="en-US">
<head>
<title>BBDA API</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<job-approval>
<detail>dsd</detail>
<result>approve</result>
</job-approval>
<h1>Accepted request</h1>
</body>
</html>
</message-body>
</httpAdapterResponse>
XML sample of the HTTP adapter request with <data>
<enable-json-conversion>true</enable-json-conversion>
<action>http://10.128.249.76:8080/DemoJSONNew/JSONServlet2</action>
<data-format></data-format>
<data>
<Demo>
<employees>
<employee>
<name>User1</name>
<age>23</age>
</employee>
<employee>
<name>User2</name>
<age>22</age>
</employee>
<employee>
<name>User3</name>
<age>22</age>
</employee>
<employee>
<name>User4</name>
<age>22</age>
</employee>
</employees>
<testing1>testing 1</testing1>
<testing2>testing 2</testing2>
<testing3>testing 3</testing3>
</Demo>
</data>
</httpadapterRequest>
XML sample of the HTTP adapter response with <data>
<metadata>
<status>success</status>
</metadata>
<status-line>
<code>200</code>
<reason>OK</reason>
</status-line>
<header-lines>
<Server>Apache-Coyote/1.1</Server>
<Content-Type>application/json</Content-Type>
<Content-Length>206</Content-Length>
<Date>Wed, 01 Aug 2012 10:38:20 GMT</Date>
</header-lines>
<message-body>
<non-xml-data-response>{"Demo":{"employees":[{"name":"ROHIT","age":"23"},{"name":"RATHI","age":"22"},{"name":"NITIN","age":"22"},{"name":"SHARMA","age":"22"}],"testing1":"testing 1","testing2":"testing 2","testing3":"testing 3"}}</non-xml-data-response>
</message-body>
</httpAdapterResponse>