Getting java.lang.IllegalArgumentException when trying to make a dynamic HTTP endpoint in Mule -


i got http outbound-endpoint method specific url, thing if add variable in path url throw exception... believe not being supported. flow:

<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 string"/>     </flow> 

this exception stacktrace

caused by: java.lang.illegalargumentexception:  endpoint scheme must compatible connector scheme. connector is: "ajax-servlet", endpoint "http://specific-url/plot/get?graphname=specific_graph_name&subgroup=hour&width=100" (java.lang.illegalargumentexception). message payload of type: string         @ org.mule.execution.exceptiontomessagingexceptionexecutioninterceptor.execute(exceptiontomessagingexceptionexecutioninterceptor.java:35)         @ org.mule.execution.messageprocessornotificationexecutioninterceptor.execute(messageprocessornotificationexecutioninterceptor.java:43)         @ org.mule.execution.messageprocessorexecutiontemplate.execute(messageprocessorexecutiontemplate.java:43)         @ org.mule.processor.chain.defaultmessageprocessorchain.doprocess(defaultmessageprocessorchain.java:93)         @ org.mule.processor.chain.abstractmessageprocessorchain.process(abstractmessageprocessorchain.java:66)         @ org.mule.execution.exceptiontomessagingexceptionexecutioninterceptor.execute(exceptiontomessagingexceptionexecutioninterceptor.java:27)         @ org.mule.execution.messageprocessorexecutiontemplate.execute(messageprocessorexecutiontemplate.java:43) 

tried searching lot in google got no clue on what's wrong or done working. saw there jira tickets created in mulesoft fix wasn't "supported" supposed fixed after mule 3.2.1 (i'm using 3.3.1).

the url being correctly created, if copy-paste in browser work, misterious reason mule doesn't this.

thanks.

try this:

  • configure http connector, say: <http:connector name="httpconnector" />
  • use in dynamic http endpoint: <http:outbound-endpoint connector-ref="httpconnector" ...

Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -