gpt4 book ai didi

wso2 - 如何使用管理 API 创建 WSO2 DAS 事件接收器

转载 作者:行者123 更新时间:2023-12-02 03:18:07 24 4
gpt4 key购买 nike

一旦您在 carbon 配置文件中将 HideAdminServiceWSDLs 设置为 false,就可以发现 EventReceiverAdminService 服务端点。它公开 deployEventReceiverConfiguration 方法。谁能提供有关如何在 Multi-Tenancy 环境中使用此服务的示例?我尝试调用该服务,但每次收到以下响应时:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server</faultcode>
<faultstring>unknown</faultstring>
<detail/>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>

DAS 日志中没有有用的消息。

最佳答案

您需要提供事件接收器的 XML 配置。我在 SOAP UI 上尝试了以下操作,它有效。

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:adm="http://admin.receiver.event.carbon.wso2.org">
<soapenv:Header/>
<soapenv:Body>
<adm:deployEventReceiverConfiguration>
<!--Optional:-->
<adm:eventReceiverConfigXml><![CDATA[<eventReceiver xmlns="http://wso2.org/carbon/eventreceiver" name="httpReceiver" statistics="disable" trace="disable">
<from eventAdapterType="http">
<property name="transports">all</property>
</from>
<mapping customMapping="disable" type="json" />
<to streamName="org.wso2.event.sensor.stream" version="1.0.0" />
</eventReceiver>]]>

在 Multi-Tenancy 环境中,使用各自租户管理员的凭据进行基本身份验证。然后它将在正确的租户中部署事件接收器。部署DAS时会打印如下日志,

[2016-02-11 17:40:39,670] admin@test.com [1] [DAS] INFO {org.wso2.carbon.core.services.util.CarbonAuthenticationUtil} -  'admin@test.com [1]' logged in at [2016-02-11 17:40:39,670-0700]
[2016-02-11 17:40:39,674] admin@test.com [1] [DAS] INFO {org.wso2.carbon.event.receiver.core.internal.util.helper.EventReceiverConfigurationFileSystemInvoker} - Event receiver configuration saved to the filesystem :httpReceiver.xml
[2016-02-11 17:40:39,675] admin@test.com [1] [DAS] INFO {org.wso2.carbon.event.input.adapter.core.internal.InputAdapterRuntime} - Connecting receiver httpReceiver
[2016-02-11 17:40:39,676] admin@test.com [1] [DAS] INFO {org.wso2.carbon.event.stream.core.internal.EventJunction} - Producer added to the junction. Stream:BAM_MESSAGE_TRACE:1.0.0
[2016-02-11 17:40:39,676] admin@test.com [1] [DAS] INFO {org.wso2.carbon.event.receiver.core.EventReceiverDeployer} - Event Receiver configuration successfully deployed and in active state: httpReceiver

关于wso2 - 如何使用管理 API 创建 WSO2 DAS 事件接收器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35346827/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com