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框中傳遞了參數 –