简体   繁体   English

WSO2 API管理器-订户电子邮件不在AM数据库中

[英]WSO2 API Manager - subscriber email are not in AM database

I'm working with WSO2 am and I'm customising a subscription workflow to send an email at the user who are subscribing. 我正在使用WSO2 am,并且正在自定义订阅工作流程,以向正在订阅的用户发送电子邮件。

But to send an email, I should get the subscriber's email. 但是要发送电子邮件,我应该得到订户的电子邮件。 When I call the method to get this email ( subs.getEmail() ), I have nothing : 当我调用获取该电子邮件的方法( subs.getEmail() )时,我什么也没有:

Subscriber subs = apiMgtDAO.getSubscriber(username); System.out.println(subs.getEmail());

So, I watch in the WSO2_AM database, in the table AM_SUBSCRIBER and I discover that a column for email exit but it's empty for all my users. 因此,我在WSO2_AM数据库的AM_SUBSCRIBER表中进行了观察,发现有一个用于退出电子邮件的列,但对我所有用户而言都是空的。

TENANT_ID | EMAIL_ADDRESS | DATE_SUBSCRIBED
-1234 | | 2015-03-17 14:49:24.028 -1234 | | 2015-03-20 12:33:01.084 -1234 | | 2015-03-27 16:56:23.264 -1234 | | 2015-03-27 17:04:41.459 -1234 | | 2015-04-02 14:19:46.889

it's the good way to get the user email ? 这是获取用户电子邮件的好方法? It's a bug ? 是个错误吗?

If someone can help me to get the user email in a custom workflow, will be really good. 如果有人可以帮助我在自定义工作流程中获取用户电子邮件,那将非常好。

Thanks a lot 非常感谢

all the details of that user will be stored as user profile(which is a feature of IS used in apimanger). 该用户的所有详细信息都将存储为用户个人资料(这是apimanger中使用的IS的功能)。 So by admin service call you can get the user profile of a particular user and from there you can get the email address of that user. 因此,通过管理员服务呼叫,您可以获取特定用户的用户个人资料,并从那里可以获取该用户的电子邮件地址。

here[1] you can find a sample User profile management service client. 在这里[1],您可以找到示例用户配置文件管理服务客户端。

1 . 1。 https://svn.wso2.org/repos/wso2/carbon/platform/trunk/platform-integration/test-automation-framework/org.wso2.carbon.automation.api/src/main/java/org/wso2/carbon/automation/api/clients/identity/UserProfileMgtServiceClient.java https://svn.wso2.org/repos/wso2/carbon/platform/trunk/platform-integration/test-automation-framework/org.wso2.carbon.automation.api/src/main/java/org/wso2/ carbon / automation / api / clients / identity / UserProfileMgtServiceClient.java

actually what they have done is, they have used the UserProfileMgtService in UserProfileMgtService.java. 实际上,他们使用的是UserProfileMgtService.java中的UserProfileMgtService。 So you can write your own client for that service.It is an admin service with in apimager .You can find the wsdl of that service by following this doc[2]. 因此,您可以为该服务编写自己的客户端。它是apimager中的管理服务。您可以通过遵循此文档[2]找到该服务的wsdl。 'https://:8280/services/UserProfileMgtService?wsdl' using that wsld create the stub and invoke the service as you want. 使用该wsld的“ https://:8280 / services / UserProfileMgtService?wsdl”创建存根并根据需要调用服务。 you can find the endpoints in the url l.username and password will be the username and password of the supper admin of apimager. 您可以在网址l中找到端点。用户名和密码将是apimager超级管理员的用户名和密码。 2. docs.wso2.com/display/AM160/WSO2+Admin+Services 2. docs.wso2.com/display/AM160/WSO2+Admin+Services

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM