wso2 - 是否可以在 HTTP Endpoint 中使用特殊字符作为变量而不对其进行编码?
问题描述
因此,我尝试使用 WSO2 Entreprise Integrator 7.1.0 将数据发送到 MQTT 代理,并根据数据源使用变量更改主题名称。
我要使用的主题名称结构是/location/type/model/uniqueId/count。
我可以通过此配置使用静态主题名称将数据发布到我的 MQTT 代理:
带地址端点
mqtt:/SampleProxy?mqtt.server.host.name=localhost&mqtt.server.port=1883&mqtt.client.id=esb.test.sender2&mqtt.subscription.qos=2&mqtt.blocking.sender=true&mqtt.topic.name=/canada/detector/det-01-001/count
此方法运行良好,但我无法在地址端点中使用变量,因此在将数据发送到 mqtt 代理之前,我无法更改属性名称的 det-01-001。
使用 HTTP 端点
mqtt:/SampleProxy?mqtt.server.host.name=localhost&mqtt.server.port=1883&mqtt.client.id=esb.test.sender2&mqtt.subscription.qos=2&mqtt.blocking.sender=true&mqtt.topic.name={uri.var.topics}
和我的财产uri.var.topics
<property description="Topic" name="uri.var.topic" scope="default" type="STRING" value="/canada/detector/det-01-001/count"/>
此方法有效,但将每个字符“/”更改为它的ASCII 编码参考“%2F”。
这种存在的结果%2Fcanada%2Fdetector%2Fdet-01-001%2Fcount
有没有办法解码“/”字符或防止端点对其进行编码的选项?
解决方案
推荐阅读
- google-apps-script - 谷歌表格/脚本 OnEdit 更改两张表格
- php - Laravel Eloquent 复杂查询从一张表中获取最新数据
- powershell - Powershell错误字符串缺少终止符:'
- python - 属性错误:“Calc”对象没有属性“clear_Entry”
- javascript - 将值加 1 并将其记录在控制台中
- android - 删除 TextInputLayout 中的浮动标签提示文本
- java - Android 在 CircleImageView 中显示从相机捕获的图像
- algorithm - 查找添加到数组的运行总和时为 1 的最小数字
- botframework - 历史消息
- javascript - createReadStream 和 createWriteStream 无法正常工作