1
我想在用户登录混合应用程序后(基于IBM Worklight 6.0)向用户发送电子邮件。通过HTTP适配器传递参数?
我想将用户的参数(电子邮件ID)传递给托管的PHP文件。我直接尝试发送邮件的URL如下,这个工程:
http://www.xxxyyyzzz.comli.com/[email protected]
如何通过工作灯适配器一样吗?
ADAPTER.XML
<wl:adapter name="sendmail"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:wl="http://www.worklight.com/integration"
xmlns:http="http://www.worklight.com/integration/http">
<displayName>sendmail</displayName>
<description>sendmail</description>
<connectivity>
<connectionPolicy xsi:type="http:HTTPConnectionPolicyType">
<protocol>http</protocol>
<domain>xxxyyy.comli.com</domain>
<port>80</port>
<sslCertificateAlias></sslCertificateAlias>
<sslCertificatePassword></sslCertificatePassword>
-->
</connectionPolicy>
<loadConstraints maxConcurrentConnectionsPerNode="2" />
</connectivity>
<procedure name="getStories"/>
<procedure name="getStoriesFiltered"/>
</wl:adapter>
ADAPTER IMP.JS
function getStories(interest) {
path = getPath(interest);
var input = {
method : 'get',
returnedContentType : 'html',
path : '/email.php?a='
};
return WL.Server.invokeHttp(input);
}
我调用过程中传递的参数。那是我尝试调用适配器。 –
您的代码段不显示任何传递给适配器的参数。 –
我尝试通过使用run as-> invoke procedure手动调用适配器过程,并在txt框中传递了参数 –