我陷入困境,我认为这将是一件非常容易的事。
我正在尝试设置Mule流程以连接Salesforce并获取OAUTH令牌。
<flow>
<sfdc:config-with-oauth consumerKey="thatgirliscute" consumerSecret="nosheishOT" doc:name="Salesforce (OAuth)" name="Salesforce__OAuth_" connectionTimeout="10000" readTimeout="10000">
<sfdc:oauth-callback-config domain="localhost" localPort="8081" path="callback"/>
</sfdc:config-with-oauth>
<flow name="salesforce-oauthFlow1" doc:name="salesforce-oauthFlow1">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8081" doc:name="HTTP"/>
<sfdc:authorize accessTokenUrl="https://login.salesforce.com/services/oauth2/token" authorizationUrl="https://login.salesforce.com/services/oauth2/authorize" config-ref="Salesforce__OAuth_" display="PAGE" doc:name="Authorize at Salesforce"/>
</flow>
但是我收到一条错误消息“无法获取访问令牌”。消息有效内容的类型为:String'
Message : Unable to fetch access token. Message payload is of type: String
Code : MULE_ERROR--2
--------------------------------------------------------------------------------
Exception stack is:
1. Connection timed out: connect (java.net.ConnectException)
java.net.PlainSocketImpl:-2 (null)
2. Error found while consuming http resource at https://login.salesforce.com/services/oauth2/token (java.lang.RuntimeException)
org.mule.security.oauth.util.HttpUtilImpl:93 (null)
3. Unable to fetch access token. Message payload is of type: String (org.mule.api.MessagingException)
org.mule.security.oauth.processor.OAuth2FetchAccessTokenMessageProcessor:91 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/MessagingException.html)
--------------------------------------------------------------------------------
Root Exception stack trace:
java.net.ConnectException: Connection timed out: connect
任何解决方案都有很大的帮助。感谢
- 编辑:我在公司防火墙后面 - 这有关系吗?但我能够使用Salesforce连接器成功进行基本身份验证。只有OAuTH会导致问题。
当我输入localhost时:8081我被重定向到
然后自动重定向到以下网址,并显示错误“无法获取访问令牌”。消息有效负载的类型为:字符串'在浏览器中,控制台显示为我在上面发布的内容。
答案 0 :(得分:0)
这是Mule中的一个错误,Salesforce Connector 6.2解决了它。