如何解决WSO2 EI 6.1.1中的Sendgrid
我正在WSO2 EI 6.1.1中实现Sendgrid连接器操作(类别操作)。
注意:尝试使用免费帐户。
我遵循的步骤:
a)最初,我使用This创建帐户。
b)之后,通过this
创建apikeyc)apikey:SG.xxxxxxxx.yyyyy
问题:在salesforce.init方法之后,init操作不会打印任何内容。进行类别操作后,获得一些具有拒绝权限行的HTML表单。我错过了什么吗?
这是我的示例API代码:
<?xml version="1.0" encoding="UTF-8"?>
<api context="/sendgridapi" name="SendgridAPI" xmlns="http://ws.apache.org/ns/synapse">
<resource methods="POST">
<inSequence onError="faultHandlerSeq">
<log level="custom">
<property name="=======SendgridAPI" value="Called======="/>
</log>
<property name="category" expression="json-eval($.category)"/>
<property expression="get-property('Sendgrid-Config')" name="SendgridConfig" scope="default" type="OM"/>
<property description="apiUrl" expression="$ctx:SendgridConfig//*[local-name()='apiUrl']" name="apiUrl" scope="default" type="STRING"/>
<property description="apiUser" expression="$ctx:SendgridConfig//*[local-name()='apiUser']" name="apiUser" scope="default" type="STRING"/>
<property description="apiKey" expression="$ctx:SendgridConfig//*[local-name()='apiKey']" name="apiKey" scope="default" type="STRING"/>
<log level="custom">
<property expression="$ctx:apiUrl" name="=======apiUrl====="/>
</log>
<sendgrid.init>
<apiUrl>{$ctx:apiUrl}</apiUrl>
<apiUser>{$ctx:apiUser}</apiUser>
<apiKey>{$ctx:apiKey}</apiKey>
</sendgrid.init>
<log level="custom">
<property expression="json-eval($.)" name="===after Connection===="/>
</log>
<log level="full"/>
<sendgrid.createCategory>
<category>{$ctx:category}</category>
</sendgrid.createCategory>
<log level="full"/>
<respond/>
</inSequence>
<outSequence/>
<faultSequence>
<property name="====FaultySequence:::====" scope="default" type="STRING" value="is called==="/>
<property expression="get-property('ERROR_MESSAGE')" name="====ERROR_MESSAGE====" scope="default" type="STRING"/>
<sequence key="faultHandlerSeq" />
</faultSequence>
</resource>
</api>
本地条目:Sendgrid-Config
<?xml version="1.0" encoding="UTF-8"?>
<localEntry key="Sendgrid-Config" xmlns="http://ws.apache.org/ns/synapse">
<config>
<apiUrl>https://api.sendgrid.com/api/newsletter</apiUrl>
<apiUser>mailid</apiUser>
<apiKey>SG.xxxxxx.yyyyy</apiKey>
</config>
</localEntry>
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。