2013-04-25 48 views
0

我得到了一個對特定URL執行GET方法的HTTP出站端點,事情是,如果我在路徑URL中添加一個變量,它將會拋出異常...我相信這不被支持。 這是我的流程:嘗試在Mule中創建動態HTTP端點時獲取java.lang.IllegalArgumentException

<flow name="ADMIN_GET_GRAPH_DATA" doc:name="ADMIN_GET_GRAPH_DATA"> 
     <ajax:servlet-inbound-endpoint channel="/admin/get_graph_data" responseTimeout="10000" doc:name="Ajax"/> 
     <http:outbound-endpoint exchange-pattern="request-response" host="${graph.url}" port="8081" path="plot/get?graphName=#[json:graph_name]&amp;subgroup=hour&amp;width=100" method="GET" doc:name="HTTP" /> 
     <byte-array-to-string-transformer doc:name="Byte Array to String"/> 
    </flow> 

這是異常堆棧跟蹤

Caused by: java.lang.IllegalArgumentException: Endpoint scheme must be compatible with the connector scheme. Connector is: "ajax-servlet", endpoint is "http://specific-url/plot/get?graphName=SPECIFIC_GRAPH_NAME&subgroup=hour&width=100" (java.lang.IllegalArgumentException). Message payload is of type: String 
     at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:35) 
     at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:43) 
     at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:43) 
     at org.mule.processor.chain.DefaultMessageProcessorChain.doProcess(DefaultMessageProcessorChain.java:93) 
     at org.mule.processor.chain.AbstractMessageProcessorChain.process(AbstractMessageProcessorChain.java:66) 
     at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:27) 
     at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:43) 

試圖尋找了很多在谷歌,但我有什麼地方不對勁或什麼可以做,以得到它的工作毫無頭緒。 我甚至看到在MuleSoft中創建了JIRA門票來解決這個問題,因爲它沒有被「支持」,但它應該在Mule 3.2.1(我使用3.3.1)之後被修復。

正確地創建URL,即使您將其複製粘貼到瀏覽器中,它也能正常工作,但出於某種神祕原因,Mule不喜歡這樣。

謝謝。

回答

1

試試這個:

  • 配置HTTP連接器,說:<http:connector name="httpConnector" />
  • 使用它在動態HTTP端點:<http:outbound-endpoint connector-ref="httpConnector" ...
相關問題