我已经测试了Twitter和Linkedin,我似乎能够最终获得这些工作,但我无法找到足够的材料来获取Google连接器的工作。使用Google Calendar连接器时,我正在尝试使用 - #[flowVars['tokenId']]收集令牌,但该值始终作为null出来。难道我做错了什么?有人可以帮忙吗?

谢谢,

灰。

有帮助吗?

解决方案

为其他人争取同样问题的人回答了我自己的问题 -

管理OAuth令牌(可选)

配置对象安装objectstore

要保留数据持久性,您需要将其存储在某个地方,建议您使用对象安装。安装ObjectStore连接器。在应用程序中配置它:

<objectstore:config name="ObjectStore" doc:name="ObjectStore" />
.

授权后存储令牌

完成授权舞后,您正在调用的服务的访问权限作为名为OAuthAccessTokenid的流量可用。您必须保留此ID,以便您可以在未来连接器的调用中使用它。此示例显示如何将此变量存储在密钥访问安全警告下的对象库中。

<flow name="authorize-google" doc:name="authorize-google">
        <http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8081" path="authorize" doc:name="HTTP"/>
        <google-contacts:authorize config-ref="Google_Contacts" doc:name="Authorize GContacts"/>
        <objectstore:store config-ref="ObjectStore" key="accessTokenId" value-ref="#[flowVars['OAuthAccessTokenId']]" overwrite="true" doc:name="ObjectStore"/>    
</flow>
.

使用您的访问令牌

任何接收器的调用必须从对象库加载访问令牌并引用它。此示例显示从对象库加载它,并在继续之前设置它。

<enricher target="#[flowVars['accessTokenId']]" doc:name="Message Enricher">
            <objectstore:retrieve config-ref="ObjectStore" key="accessTokenId" defaultValue-ref="#['']" doc:name="Get AccessToken"/>
</enricher>
<expression-filter expression="#[flowVars['accessTokenId'] != '']" doc:name="Is Access Token Set"/>
.

一旦AccessTokenID作为流量变量,您可以在连接器操作中引用:

<google-contacts:get-contacts config-ref="Google_Contacts" accessTokenId="#[flowVars['accessTokenId']]" />
.

更多详细信息在此处 - http://www.mesoft.org/documentation/display/34x/using anyclycorkconnector adto+access ackytoauth网上

heres如何看待工作室 - http://imgur.com/dtlodel

谢谢,

灰。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top