- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我看到其他人已经能够让它工作,但是我无法找到足够的细节来解释他们是如何做到这一点的,以便我让它工作。
This guy在 this link声称他能够做到这一点。虽然有关于如何执行此操作的简要说明,但我并不完全理解。
提出的解决方案是:
With InvokeHTTP, you can add dynamic properties, which will be sent in the request as headers. You can use dynamic properties to set values for the Content-Type and SOAPAction headers, just use the header names for the names of the dynamic properties. InvokeHTTP lets you control the HTTP method, so you can set that to POST. The remaining step would be to get the content of request.xml to be sent to the InvokeHTTP as a flowfile. One way to do this is to use a GetFile processor to fetch requeset.xml from some location on the filesystem, and pass the success relationship of GetFile to InvokeHTTP
--Jeff.
我正在使用 SOAPUI 来验证一切是否正常,并且当我得到适当的 XML 响应时它确实如此。但是我无法在 NiFi 中实现这一点。我的猜测是我不知道如何称呼我的动态属性。我也不完全了解我要添加到动态属性的 Value
中的数据。
最佳答案
我缺少的关键是需要将 xml SOAP 请求作为流文件内容而不是流文件属性发送。我花了一段时间才知道如何使用自定义内容创建流文件。
使用 InvokeHTTP
处理器发出 SOAP 请求的关键是要求 InvokeHTTP 处理器将 xml SOAP 请求作为流文件接收,因为当处理器发送 http POST 请求它将其属性作为 SOAP 请求的 header 发送,并将传入的流文件内容作为 SOAP 主体发送。这需要一段时间来理解,然后才弄清楚如何自定义流文件的内容。
我最初的错误是我试图单独使用 GenerateFlowFile
处理器并将其直接发送到 InvokeHTTP 处理器。这对我不起作用,因为我不知道如何将我放入 GenerateFlowFile 动态属性的“文本”作为内容转换。
终于有个人了HERE提示我如何通过使用 ReplaceText
处理器将我在 GenerateFlowFile
处理器中创建的属性转换为流文件内容来创建具有自定义内容的流文件.
最后,我获得了 InvokeHTTP 处理器发送/POST SOAP 请求所需格式正确的流文件。
流程截图:
GenerateFlowFile 和 ReplaceText 处理器的属性:
最后,我们只需向 InvokeHTTP
处理器添加一些动态属性,并将其与传入的流文件一起作为 HTTP POST 请求提交。同样,属性作为标题发送,传入的流文件内容作为正文发送。这需要一点时间来理解,但是一旦您将各个部分放在一起并正确设置,就很容易了。
关于soap - NiFi 如何使用带有 SOAP 的 InvokeHTTP 处理器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49457764/
以下流程采用用户名/密码组合并通过 InvokeHTTP 针对 API 进行身份验证: InvokeHTTP 的结果是一个身份验证 token : 我想在之前的任何 API 调用中使用此 token
我尝试在 Apache NiFi 中使用 InvokeHttpProcessor 来执行具有复杂 JSON 正文的 POST 请求。因此本教程:http://www.tomaszezula.com/2
我有以下处理器序列: 我使用 ReplaceText 处理器创建 POST 查询的正文。该处理器链接到InvokeHTTP。ReplaceText 中的替换值为: { "size": 0, "
NiFi 新手! 我有一个场景,我提出一个休息请求并取回一些数据。我收到的数据包含一个 ID,我需要它来进行后续请求。例如: 调用HTTP GET 要求: http://localhost:2999/
我看到其他人已经能够让它工作,但是我无法找到足够的细节来解释他们是如何做到这一点的,以便我让它工作。 This guy在 this link声称他能够做到这一点。虽然有关于如何执行此操作的简要说明,但
我正在尝试向我的 PostHTTP/InvokeHTTP 处理器添加静态 header 。 因为我已经阅读了文档和这个 answer , 看起来我们将只支持来自处理器输入 flowfile 的属性。
我有以下两种情况,对于每种情况,我都需要建议使用哪种 NiFi 处理器: 我有在 NiFi 外部运行的 Restful Web 服务。 NiFi希望通过调用特定的restful API来获取/发布/删
我有以下两种情况,对于每种情况,我都需要建议使用哪种 NiFi 处理器: 我有在 NiFi 外部运行的 Restful Web 服务。 NiFi希望通过调用特定的restful API来获取/发布/删
我有一个 Worklight 适配器,它通过 WL.Server.invokeHttp() 调用 RESTful 方法。使用 http DELETE 方法时,不会添加查询字符串参数。我正在使用 Wor
在发布关于 Apache NiFi InvokeHTTP 的这个问题之前,我已经完成了所有其他问题及其答案,但我仍然不确定我应该拥有的最佳流程。我的情况如下: 1) 从 Apache Kakfa,我得
所以我在向 Hive 发送 curl 请求时遇到了困难。我想获取我创建的 json 流文件并将其作为命令发送到 Hive,但是当我尝试配置 InvokeHTTP 处理器时,我不断收到错误消息。这里的引
如果我用不记名 token 配置了属性 Authorization,InvokeHTTP 是否会将该 header 发送到重定向 URL? 我在文档中找不到任何关于它的内容。我似乎也无法在 OkHtt
我正在尝试使用 Nifi 的 InvokeHTTP 处理器向 POST API 发送多部分/表单数据请求。此请求需要一个 json 和一个文件。 POSTMAN 中的请求 header 和请求正文看起
我是一名优秀的程序员,十分优秀!