2013-04-25 59 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" ...
相关问题