尝试在Mule中创建动态HTTP端点时获取java.lang.IllegalArgumentException
我得到了一个HTTP出站端点,它对特定URL执行GET方法,问题是如果我在路径URL中添加一个变量,它将抛出一个异常。。。我相信这是不被支持的。 这是我的流程:尝试在Mule中创建动态HTTP端点时获取java.lang.IllegalArgumentException,java,mule,esb,endpoint,flow,Java,Mule,Esb,Endpoint,Flow,我得到了一个HTTP出站端点,它对特定URL执行GET方法,问题是如果我在路径URL中添加一个变量,它将抛出一个异常。。。我相信这是不被支持的。 这是我的流程: <flow name="ADMIN_GET_GRAPH_DATA" doc:name="ADMIN_GET_GRAPH_DATA"> <ajax:servlet-inbound-endpoint channel="/admin/get_graph_data" responseTimeout="10000
<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]&subgroup=hour&width=100" method="GET" doc:name="HTTP" />
<byte-array-to-string-transformer doc:name="Byte Array to String"/>
</flow>
我试着在谷歌上搜索了很多东西,但我不知道哪里出了问题,也不知道该怎么做才能让它正常工作。
我甚至看到在MuleSoft中创建了JIRA票证来解决这个问题,因为它不受“支持”,但应该在Mule 3.2.1之后解决(我使用的是3.3.1)
URL的创建是正确的,即使您在浏览器中复制粘贴它,它也会工作,但由于某些不确定的原因,Mule不喜欢这样
谢谢。试试这个:
- 配置HTTP连接器,例如:
- 在动态HTTP端点中使用它:
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)