IBM TDI中的连接器httpclient是一个访问http url的客户端,它的输出映射是通过写入http头部而传送到http url的,但输出映射的属性前必须加http.这个前缀。若访问的http url是在domino服务器上,那么domino获得这些属性时,其头部属性有一个前缀http_。例如在输出映射定义为http.uid用户id属性,那么domino得到的头部是http_uid。而java web服务器得到的头部就是uid。如果属性值含有中文,需要通过编码来传输,直接传输将会出现乱码。
下面是它的定义文件idi.inf
[connectors ibmdi.HTTPClient]
attributeList {
}
connectorConfig {
connectorType:com.ibm.di.connector.HTTPClientConnector
parserOption:Optional
}
description:HTTP Client Connector (version 2)
[end]
[form com.ibm.di.connector.HTTPClientConnector]
parameter {
method {
default:GET
label:Request Method
syntax:droplist
values [
GET
POST
HEAD
OPTIONS
PUT
DELETE
TRACE
]
localizedvalues {
GET:GET
POST:POST
HEAD:HEAD
OPTIONS:OPTIONS
PUT:PUT
DELETE:DELETE
TRACE:TRACE
}
}
password {
label:Password
syntax:password
}
url {
default:http://localhost
label:HTTP URL
}
username {
label:Username
}
proxy {
label:Proxy
description:Specify proxyhost:port if you use a proxy for connections
}
inbody {
label:File to HTTP body
description:Specify file path. If set, the file contents will be used as http.body.
}
contentType {
label:Content Type
description:Specify the type of data to send. If set, this will be used as http.content-type
syntax:dropedit
values [
text/plain; charset=US-ASCII
text/xml; charset=UTF-8
text/html; charset=ISO-8859-1
]
}
outbody {
default:
label:File from response HTTP body
description:Specify reponse file path. The file contents will be copied from response HTTP body.
}
}
parameterlist [
url
method
username
password
proxy
inbody
contentType
outbody
$GLOBAL.debug
$GLOBAL.help
]
title:HTTP Client (version 2)
[end]