未能调用updateStatus.消息负载的类型为:Mule Studio上的NullPayload



我正在学习本教程https://www.mulesoft.com/exchange#/twitter集成连接器,当我尝试发送带有updateStatus的tweet时,我会收到以下消息Failed to invoke updateStatus。消息有效载荷的类型为: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)

推特应用程序具有读、写和直接消息权限,但我不确定应用程序网站字段。

Mule 3.6.x中的WWW身份验证标头似乎有问题。

我尝试了一个基本的twitter流,它适用于Mule 3.5,但不适用于3.6。

报告的问题有:

  • https://www.mulesoft.org/jira/browse/MULE-8282
  • https://www.mulesoft.org/jira/browse/MULE-8127
  • https://www.mulesoft.org/jira/browse/MULE-8249

我正在学习同样的教程,遇到了同样的问题。我需要用一个新的版本4连接器更新默认的twitter连接器。然后代码就工作了,但是,它只工作一次。为了让它再次工作,我似乎需要更改状态消息并重新运行——否则我会再次得到空负载消息。仅仅停止并启动应用程序似乎还不够好——我似乎需要更改状态。

最新更新