简体   繁体   English

IBM Security(Tivoli)Directory Integrator中的HTTP Server连接器

[英]HTTP Server Connector in IBM Security (Tivoli) Directory Integrator

I am using IBM Security Directory Integrator, formerly known as IBM Tivoli Directory Integrator, and in the feed section I have one connector that is connecting to a MySQL Database and providing data from the database, I want the data from the MySQL database to be displayed on a web page using an HTTP Server connector, however none of the attributes in the WORK object are available as output for the HTTP Server connector. 我正在使用IBM Security Directory Integrator(以前称为IBM Tivoli Directory Integrator),并且在feed部分中,我有一个连接器正在连接到MySQL数据库并提供数据库中的数据,我希望显示MySQL数据库中的数据在使用HTTP Server连接器的网页上,但是WORK对象中的任何属性都不能用作HTTP Server连接器的输出。 There is not much documentation on this platform and I would like to know how to Route the data from a Database Connector to an HTTP Server connector which will then display the data on a web page. 这个平台上没有太多的文档,我想知道如何将数据从数据库连接器路由到HTTP Server连接器,然后将其显示在网页上。

None of the Attributes in the WORK object are available to scripts in the DATA FLOW section. WORK对象中的所有属性均不可用于DATA FLOW部分中的脚本。

数据流脚本

You need to update your question a little to reflect exactly what you want to do. 您需要稍微更新您的问题,以准确反映您想要做什么。 Do you 你呢

  1. Want all the data from your SQL DB to be shown on every request that reaches your HTTP Server connector 希望将SQL DB中的所有数据显示在到达HTTP Server连接器的每个请求上

  2. Display a specific entry from the DB depending on some input parameter on the request that reaches the HTTP Server connector ? 根据到达HTTP Server连接器的请求上的某些输入参数,显示来自数据库的特定条目。

A little background on the feed and data flow sections 提要和数据流部分的一些背景知识

In your feed section, you would normally have a connector in iterator mode that will go through a number of data entries from a source. 在提要部分中,通常会在迭代器模式下使用一个连接器,该连接器将通过源中的许多数据条目。

In your data flow section you will have a number of connectors/functions/scripts that do transformations on the data 在您的数据流部分中,您将具有许多对数据进行转换的连接器/函数/脚本

Each data entry that gets returned from the Iterator connector in the feed section, will go through the transformations described in the data flow section. 从提要部分中的Iterator连接器返回的每个数据条目都将经历数据流部分中描述的转换。 This is configurable by mapping certain data attributes (columns in DB, fields in CSV, attributes in ldap, http parameters in http requests) to attributes in the work entry. 通过将某些数据属性(数据库中的列,CSV中的字段,ldap中的属性,http请求中的http参数)映射到工作条目中的属性, 可以进行配置

Normally it is up to you to do something with the transformed data, as in write them to a file, DB, ldap server.Again what will be written is configurable in the output map of the connector you use where you map attributes of the work entry to output attributes for the connector you use. 通常,您需要对转换后的数据进行处理,例如将其写入文件,数据库,ldap服务器中。要写入的内容同样可以在您使用连接器的输出映射中进行配置,您可以在其中映射工作属性输入所使用连接器的输出属性。

Now, the HTTP Server connector in Server mode is a slightly more complex beast in that it needs to send back a response to the HTTP client so it contains both an input map and an output map. 现在,服务器模式下的HTTP Server连接器是一个稍微复杂一点的野兽,因为它需要将响应发送回HTTP客户端,因此它既包含输入映射又包含输出映射。 What happens is that the request is read , the data flow section is executed and then the HTTP Server connector instance itself returns a reply to the HTTP client. 发生的情况是,读取了请求,执行了数据流部分,然后HTTP Server连接器实例本身将响应返回给HTTP客户端。 This is described in detail here http://www-01.ibm.com/support/knowledgecenter/?lang=en#!/SSCQGF_7.1.0/com.ibm.IBMDI.doc_7.1/referenceguide29.htm%23serverconnect2 so I will not go into so much details. 这里对此进行了详细描述http://www-01.ibm.com/support/knowledgecenter/?lang=en#!/SSCQGF_7.1.0/com.ibm.IBMDI.doc_7.1/referenceguide29.htm%23serverconnect2不会涉及太多细节。

Your specific scenario 您的特定情况

If assumption 1 above is correct, then probably SDI is not the best tool for this. 如果上面的假设1是正确的,那么SDI可能不是最好的工具。 Or at least not as you plan to use it, anyway. 或者至少在您打算使用它时不这样做。 You can have one assembly line that reads the data from the DB and then a file connector in AddOnly mode in your data flow (using an XML parser ) that will append the data in a specified form to a file. 您可以具有一条流水线,该流水线从DB中读取数据,然后在数据流中使用AddOnly模式(使用XML解析器)读取文件连接器,该连接器会将指定格式的数据附加到文件中。 Then you need to do this once, or periodically, and serve the static html/xml file via a normal HTTP server. 然后,您需要执行一次或定期执行此操作,并通过普通的HTTP服务器提供静态html / xml文件。 If you ABSOLUTELY need to use SDI for this, read below for assumption 2. 如果您绝对需要为此使用SDI,请阅读以下假设2。

If assumption 2 is correct, then you have your connectors in the wrong sections. 如果假设2是正确的,则说明连接器的位置错误。 The HTTP Server connector needs to be in the feed section as this is the connector that would be listening all the time for incoming connections and would return something in response. HTTP Server连接器必须在feed部分中,因为该连接器将一直监听传入的连接,并会返回一些响应。 The exact nature/Data of the response is up to you to decide by the connectors you will include in the Data Flow section. 响应的确切性质/数据取决于您要包括在“数据流”部分中的连接器。 If you want to return a specific entry depending on the parameters of the request, then you would have a JDBC connector in lookup mode and the link criteria would be built based on the parameters of the incoming request in the HTTP Server. 如果要根据请求的参数返回特定的条目,则将使JDBC连接器处于查找模式,并且将基于HTTP Server中传入请求的参数来构建链接条件。 Otherwise, you need to read all the DB entries using the JDBC connector in lookup mode and a generic SQL query (select * from .. ) and then iterate over all the entries with a for-each attibute connector. 否则,您需要在查找方式下使用JDBC连接器和通用SQL查询(从*中选择*)读取所有数据库条目,然后使用逐个attibute连接器遍历所有条目。 No matter what/how you do it you will end up with some information you need to return to the client. 无论您做什么/如何做,最终都会得到一些需要返回给客户的信息。 For that you will use the output map of the HTTP Server connector and map the http.body and http.status 为此,您将使用HTTP Server连接器的输出映射并映射http.body和http.status

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 通过SSL连接到IBM Tivoli Directory时,LDAP搜索断开连接 - LDAP Search disconnecting when connecting via SSL to IBM Tivoli Directory 如何在IBM Tivoli Identity Manager中添加角色 - How to add roles in IBM Tivoli Identity Manager 如何为IBM HTTP Server编写插件? - How to write plugin for IBM HTTP Server? 是否可以将IBM HTTP Server设置为非IBM Websphere应用程序服务器的前端,并且IBM是否支持它? - Is it possible to setup the IBM HTTP server as the front end for a non IBM Websphere application server and is it supported by IBM? 如何将定制的Java程序作为Java插件添加到IBM Tivoli Provisioning Manager(TPM)? - How to add a custom made Java program to the IBM Tivoli Provisioning Manager ( TPM ) as a Java Plugin? 如何在IBM HTTP Proxy for Liberty Server中附加上下文根 - How to append context root in IBM HTTP Proxy for Liberty Server 如何设置IBM HTTP Server的响应标头 - how can I set the response header for IBM HTTP Server 如何在IBM HTTP SERVER中进行粘性会话配置? - How to do the Sticky session configuration in IBM HTTP SERVER? JVM调试连接器内部和安全性 - JVM debug connector internals and security IBM WESB/WAS JCA 安全配置 - IBM WESB/WAS JCA security configuration
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM