Yeah, it seems RAW() only works on the query parameter value. I've run some experiments and reported an issue here: https://issues.apache.org/jira/browse/CAMEL-17520 - likely it's a bug and we'll work on its resolution. Feel free to watch it on Jira or add any comments over there.
Cheers, Pasquale. On Thu, Jan 20, 2022 at 8:57 AM Yebba, Nicholas <[email protected]> wrote: > Thanks for the suggestion. I tried using the RAW function but it seems as > though it’s not being interpreted. For example when I inspect the URL > camel is sending the word RAW is contained in it. > > > > EX.. > https://api.degreed.com/api/v2/content?RAW(filter[end_date])=2021-12-29&RAW(filter[start_date])=2021-12-29 > <EX.. > https://api.degreed.com/api/v2/content?RAW(filter%5Bend_date%5D)=2021-12-29&RAW(filter%5Bstart_date%5D)=2021-12-29 > > > > > .to(" > https://api.degreed.com/api/v2/content?RAW(filter[end_date])=2021-12-29&RAW(filter[start_date])=2021-12-29 > ") > > > > Is there an example of how to use this function in code ? I also tried > using the $simple > https://camel.apache.org/components/3.14.x/languages/simple-language.html > > but couldn’t get it to interpret either. > > > On 2022/01/19 08:30:07 Pasquale Congiusti wrote: > > Hi Nick, > > maybe you can wrap them using RAW() function: > > > https://camel.apache.org/manual/faq/how-do-i-configure-endpoints.html#HowdoIconfigureendpoints-Configuringparametervaluesusingrawvalues > < > https://urldefense.proofpoint.com/v2/url?u=https-3A__camel.apache.org_manual_faq_how-2Ddo-2Di-2Dconfigure-2Dendpoints.html-23HowdoIconfigureendpoints-2DConfiguringparametervaluesusingrawvalues&d=DwQF-g&c=BX7Y4KpGhcDnIsrgHKqkbfoiiDvjhxwuYUpcrPD7xrE&r=OFvQfQi5F2eAFNOPCRzvUe57MQh7D-3NfvOtgep-tGg&m=SprYDSeClKG4ItPlLNkpIGTU6y019pQdiAIriUI3kYIEY0YAlRPzxXetUA-R8CkT&s=LTpLyUh0wCt30a8EJZsiO3aqPtwvvovButmRp-E7nHQ&e= > > > > > > Regards, > > Pasquale. > > > > On Tue, Jan 18, 2022 at 8:47 PM Yebba, Nicholas > > <[email protected]<mailto:[email protected]>> > wrote: > > > > > Hi, I’ve run into an issue with Camel when using square brackets in > query > > > params. For example the following endpoint produces an error. > > > > > > https://api.degreed.com/api/v2/content?filter[end_date]=”2022-01-01< > https://urldefense.proofpoint.com/v2/url?u=https-3A__api.degreed.com_api_v2_content-3Ffilter-5Bend-5Fdate-5D-3D-25E2-2580-259D2022-2D01-2D01&d=DwQF-g&c=BX7Y4KpGhcDnIsrgHKqkbfoiiDvjhxwuYUpcrPD7xrE&r=OFvQfQi5F2eAFNOPCRzvUe57MQh7D-3NfvOtgep-tGg&m=SprYDSeClKG4ItPlLNkpIGTU6y019pQdiAIriUI3kYIEY0YAlRPzxXetUA-R8CkT&s=nX6xmJBELu5A8cWClK09QPU0rEF6p79l92sK8rFcKN0&e= > >” > > > > > > The error I receive is: > > > > > > Caused by: java.lang.IllegalArgumentException: Cannot set property: > > > filter[end_date] as a Map because target bean has no setter method for > the > > > Map > > > at > > > > org.apache.camel.support.PropertyBindingSupport.setPropertyCollectionViaReflection(PropertyBindingSupport.java< > https://urldefense.proofpoint.com/v2/url?u=http-3A__PropertyBindingSupport.java&d=DwQF-g&c=BX7Y4KpGhcDnIsrgHKqkbfoiiDvjhxwuYUpcrPD7xrE&r=OFvQfQi5F2eAFNOPCRzvUe57MQh7D-3NfvOtgep-tGg&m=SprYDSeClKG4ItPlLNkpIGTU6y019pQdiAIriUI3kYIEY0YAlRPzxXetUA-R8CkT&s=6md6vJpAUhQYOwW5votQaG_Lq_av6ow_U77gykIyXog&e= > >:518) > > > at > > > > org.apache.camel.support.PropertyBindingSupport.doSetPropertyValue(PropertyBindingSupport.java< > https://urldefense.proofpoint.com/v2/url?u=http-3A__PropertyBindingSupport.java&d=DwQF-g&c=BX7Y4KpGhcDnIsrgHKqkbfoiiDvjhxwuYUpcrPD7xrE&r=OFvQfQi5F2eAFNOPCRzvUe57MQh7D-3NfvOtgep-tGg&m=SprYDSeClKG4ItPlLNkpIGTU6y019pQdiAIriUI3kYIEY0YAlRPzxXetUA-R8CkT&s=6md6vJpAUhQYOwW5votQaG_Lq_av6ow_U77gykIyXog&e= > >:448) > > > > > > > > > I have tried substituting the square brackets with Hex codes (%5B, %5D) > > > but that also gives the same error. > > > > > > The version of Camel we use is 3.8.0 > > > > > > Any help on this would be greatly appreciated. > > > > > > Thanks, > > > Nick > > > > > > > > > > > > > > > This e-mail transmission may contain information that is proprietary, > > > privileged and/or confidential and is intended exclusively for the > > > person(s) to whom it is addressed. Any use, copying, retention or > > > disclosure by any person other than the intended recipient or the > intended > > > recipient's designees is strictly prohibited. If you are not the > intended > > > recipient or their designee, please notify the sender immediately by > return > > > e-mail and delete all copies > > > > > > > > This e-mail transmission may contain information that is proprietary, > privileged and/or confidential and is intended exclusively for the > person(s) to whom it is addressed. Any use, copying, retention or > disclosure by any person other than the intended recipient or the intended > recipient's designees is strictly prohibited. If you are not the intended > recipient or their designee, please notify the sender immediately by return > e-mail and delete all copies >
