2015-04-01 34 views
0

我正在關注本教程https://www.mulesoft.com/exchange#!/twitter-integration-connector,當我嘗試用updateStatus發送推文時,我收到此消息無法調用updateStatus。消息負載的類型爲:NullPayload,顯示用戶操作工作,但不給updateStatus無法調用updateStatus。消息有效負載的類型是:Mule Studio上的NullPayload

<?xml version="1.0" encoding="UTF-8"?> 

<mule xmlns:json="http://www.mulesoft.org/schema/mule/json" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:twitter="http://www.mulesoft.org/schema/mule/twitter" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" 
    xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.6.0" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd 
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd 
http://www.mulesoft.org/schema/mule/twitter http://www.mulesoft.org/schema/mule/twitter/current/mule-twitter.xsd 
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd 
http://www.mulesoft.org/schema/mule/json http://www.mulesoft.org/schema/mule/json/current/mule-json.xsd"> 
    <twitter:config name="Twitter" accessKey="${twitter.accessKey}" accessSecret="${twitter.accessSecret}" consumerKey="${twitter.consumerKey}" consumerSecret="${twitter.consumerSecret}" streamBaseUrl="https://stream.twitter.com/1.1/" siteStreamBaseUrl="https://sitestream.twitter.com/1.1/" doc:name="Twitter"/> 
    <http:listener-config name="HTTP_Listener_Configuration" host="localhost" port="8081" basePath="updateStatus" doc:name="HTTP Listener Configuration"/> 
    <flow name="twitterFlow1"> 
     <http:listener config-ref="HTTP_Listener_Configuration" path="/" doc:name="HTTP"/> 
     <twitter:update-status config-ref="Twitter" status="Mensaje" doc:name="Twitter"/> 
     <json:object-to-json-transformer doc:name="Object to JSON"/> 
    </flow> 
</mule> 

,這是堆棧跟蹤

Exception stack is: 
1. 401 response received, but no WWW-Authenticate header was present (java.lang.IllegalStateException) 
    com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider$AsyncHttpClientEventFilter$AuthorizationHandler:1623 (null) 
2. java.lang.IllegalStateException: 401 response received, but no WWW-Authenticate header was present (java.util.concurrent.ExecutionException) 
    org.glassfish.grizzly.impl.SafeFutureImpl$Sync:363 (null) 
3. java.util.concurrent.ExecutionException: java.lang.IllegalStateException: 401 response received, but no WWW-Authenticate header was present (java.io.IOException) 
    org.mule.module.http.internal.request.grizzly.GrizzlyHttpClient:282 (null) 
4. Error sending HTTP request. Message payload is of type: MuleHttpClient$1 (org.mule.api.MessagingException) 
    org.mule.module.http.internal.request.DefaultHttpRequester:190 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/MessagingException.html) 

Twitter的應用程序具有讀,寫和直接郵件的權限,但我對應用網站領域不太確定。

回答

0

我下面相同的教程,並已運行到同樣的問題。我需要用新版本4連接器更新默認的twitter連接器。代碼然後工作,但是,它只會工作一次。爲了讓它再次運行,我似乎需要更改狀態消息並重新運行 - 否則我會再次獲取空有效負載消息。剛剛停止並啓動應用程序似乎不夠好 - 我似乎需要更改狀態。

相關問題