2014-04-24 54 views
4

我認爲這是某種類型的通用MuleSoft錯誤消息,基本上說它要麼不滿輸入或輸出,但我做了最簡單的流程,據我所知,沒有參數可以通過。

我試圖做的測試流程:

HTTP -> ZenDesk/ListTickets -> Set Payload ("hello world") 

事情我已經看了看:

  • 我使用一個全局配置和連接驗證
  • 我使用我的密碼(與安全令牌)
  • 如果我使密碼不正確,我得到一個401預期,如果我使用我的密鑰相同
  • 我有管理員/ API PRIVS中的Zendesk
  • 我能夠使用REST API從瀏覽器
  • 有沒有針對「列出門票」中列出的所有輸入參數,見doc
  • 如果我做了設置有效載荷,以一個簡單的字符串之後再返回類型不應該的問題
  • 在做調試,與上的Zendesk和SetPayload斷點,而不會繼續設置有效載荷步

在瀏覽器中,我得到:

null (java.lang.UnsupportedOperationException). Message payload is of type: ZendeskConnector$1 

在控制檯中我看到:

Message    : null (java.lang.UnsupportedOperationException). Message payload is of type: ZendeskConnector$1 
Code     : MULE_ERROR--2 
-------------------------------------------------------------------------------- 
Exception stack is: 
1. null (java.lang.UnsupportedOperationException) 
    org.mule.modules.utils.pagination.PaginatedCollection:84 (null) 
2. null (java.lang.UnsupportedOperationException). Message payload is of type: ZendeskConnector$1 (org.mule.api.MessagingException) 
    org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor:35 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/MessagingException.html) 
-------------------------------------------------------------------------------- 
Root Exception stack trace: 
java.lang.UnsupportedOperationException 
    at org.mule.modules.utils.pagination.PaginatedCollection.toArray(PaginatedCollection.java:84) 
    at com.mulesoft.mule.debugger.response.ObjectFieldDefinitionFactory.create(ObjectFieldDefinitionFactory.java:51) 
    at com.mulesoft.mule.debugger.response.ObjectFieldDefinitionFactory.createFromObject(ObjectFieldDefinitionFactory.java:133) 
    + 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything) 

騾子流量xml文件:(雖然很簡單)

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

<mule xmlns:zendesk="http://www.mulesoft.org/schema/mule/zendesk" 
    xmlns:data-mapper="http://www.mulesoft.org/schema/mule/ee/data-mapper" 
    xmlns="http://www.mulesoft.org/schema/mule/core" 
    xmlns:json="http://www.mulesoft.org/schema/mule/json" 
    xmlns:http="http://www.mulesoft.org/schema/mule/http" 
    xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" 
    xmlns:spring="http://www.springframework.org/schema/beans" 
    xmlns:core="http://www.mulesoft.org/schema/mule/core" 
    version="EE-3.4.1" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd 
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/solr/1.0.0/mule-solr.xsd 
http://www.mulesoft.org/schema/mule/json http://www.mulesoft.org/schema/mule/json/current/mule-json.xsd 
http://www.mulesoft.org/schema/mule/ee/data-mapper http://www.mulesoft.org/schema/mule/ee/data-mapper/current/mule-data-mapper.xsd 
http://www.mulesoft.org/schema/mule/zendesk http://www.mulesoft.org/schema/mule/zendesk/1.0/mule-zendesk.xsd"> 

    <zendesk:config name="Zendesk" username="[email protected]" password="password-not-security-token" apiUrl="https://my-company.zendesk.com/api/v2/" doc:name="Zendesk"> 
     <zendesk:connection-pooling-profile initialisationPolicy="INITIALISE_ONE" exhaustedAction="WHEN_EXHAUSTED_GROW"/> 
    </zendesk:config> 

    <flow name="my_flow" doc:name="my_flow"> 
     <http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8081" path="zendesk" doc:name="HTTP"/> 
     <zendesk:list-tickets config-ref="Zendesk" doc:name="Zendesk" /> 
     <set-payload value="Hello World" doc:name="Set Payload"/> 
    </flow> 
</mule> 
+0

我已經開始了一個全新的項目,我能夠從zendesk檢索單個票,但使用整個l ist仍然給出這個錯誤。我也試圖找到連接器的源代碼,我在這裏發佈了關於這個http://stackoverflow.com/questions/23330362 –

+0

由於REST API確實工作,我猜測有人知道更多關於Mule編碼可以使用一些通用的Mule-REST包裝技術爲此實現包裝,而不是直接對此代碼進行故障排除。考慮開始賞金,所以只是提到這是一個想法。 –

+0

奇怪的是,我在設置這個評論的時候遇到了麻煩,我在meta上發佈了這個帖子http://meta.stackoverflow.com/questions/252544 –

回答

1

據類型轉換錯誤...您的味精是從的Zendesk來,是特殊的類對象,所以請我們變壓器來改造信息,它會正常工作...

+0

謝謝。我不再在那個環境中安裝,也不用這個軟件,但這聽起來很合理。我會給答案+1,但不要打勾,因爲我無法直接驗證。但再次感謝! –

相關問題