You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by dermoritz <ta...@hotmail.com> on 2015/11/20 13:46:07 UTC

How to set not string properties in rest dsl

I am using restlet component and want to set the property "restletRealm" on
it. My problem is that all set Property methods only take a string as value.
 So i get an exception that string can not be converted to map if i set:

       
restConfiguration().component("restlet").port(port).endpointProperty("restletRealm",
"realm");

With:
     registry.put("realm", <Map&lt;String, String> with one entry>);

(i am using simple registry). So i tried to change property key to
"restletRealmRef" but with this the method setRestletRealm(Map<String,
String> restletRealm) is never called and realm keeps null.

The odd thing here is with "restletRealmRef" set i get 404 for every request
on every endpoint.
 




--
View this message in context: http://camel.465427.n5.nabble.com/How-to-set-not-string-properties-in-rest-dsl-tp5774149.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to set not string properties in rest dsl

Posted by Claus Ibsen <cl...@gmail.com>.
Use the # notation, eg #realm
http://camel.apache.org/how-do-i-configure-endpoints.html

On Fri, Nov 20, 2015 at 1:46 PM, dermoritz <ta...@hotmail.com> wrote:
> I am using restlet component and want to set the property "restletRealm" on
> it. My problem is that all set Property methods only take a string as value.
>  So i get an exception that string can not be converted to map if i set:
>
>
> restConfiguration().component("restlet").port(port).endpointProperty("restletRealm",
> "realm");
>
> With:
>      registry.put("realm", <Map<String, String> with one entry>);
>
> (i am using simple registry). So i tried to change property key to
> "restletRealmRef" but with this the method setRestletRealm(Map<String,
> String> restletRealm) is never called and realm keeps null.
>
> The odd thing here is with "restletRealmRef" set i get 404 for every request
> on every endpoint.
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/How-to-set-not-string-properties-in-rest-dsl-tp5774149.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2