You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Cristiano Costantini <cr...@gmail.com> on 2016/03/02 09:23:11 UTC

CamelProxy and on Camel 2.16

Hello All,

I'm updating our project to use latest Camel 2.16 from camel 2.13.2

Launching tests, I've discovered the new behavior of the CamelProxy which
turns on Parameter Binding by default (
http://camel.apache.org/using-camelproxy.html#UsingCamelProxy-WhatissendontheMessage),
and makes my tests fails. On the tests the fix has been easy. I've changed
this code:

    Endpoint endpoint = context.getEndpoint("direct:start");
    MyService proxy = ProxyHelper.createProxy(endpoint, MyService.class);

to this code which set the binding to false:

    MyService proxy =
        new ProxyBuilder(context).endpoint("direct:start")
        .binding(false).build(MyService.class);

My question is:
in production we use the Spring DSL with the <proxy> tag, for example:

<proxy id="proxyId" serviceInterface="com.example. MyService"
serviceUrl="direct:start" />

should I turn off binding also on these proxies? How can I do on the Spring
DSL?

Thank you very much,
Cristiano

Re: CamelProxy and on Camel 2.16

Posted by Cristiano Costantini <cr...@gmail.com>.
Hi Claus,
I know why I didn't found the "binding" attribute on the <proxy>:

In my XML I used this schema location for camel spring:

xsi:schemaLocation="http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd"

I would expect it to point to the last version of Camel spring schema, but
it doesn't:
as you can see on this page http://camel.apache.org/schema/spring/
"camel-spring.xsd" seems to be "camel-spring-2.15.0.xsd", they have the
same date.

And in "camel-spring-2.15.0.xsd" the binding attribute on the proxy is
missing, I need to change to
xsi:schemaLocation="http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring-2.16.1.xsd"

Note also that I'm updating to camel 2.16.2, but a schema for this version
is missing.

So, shouldn't the camel-spring.xsd be updated to camel 2.16? Also,
shouldn't this XSD be updated to camel 2.16.2?

Thank you,
Cristiano


Il giorno gio 3 mar 2016 alle ore 08:02 Cristiano Costantini <
cristiano.costantini@gmail.com> ha scritto:

> Hi Claus!
> Yes I've found it!
> It is:
>
> <proxy id="proxyId" serviceInterface="com.example. MyService"
>  serviceUrl="direct:start" binding="false" />
>
> probably I didn't initially found it because eclipse was still pointing to
> the XSD of version 2.13.2 (I've found the attribute after "maven > update
> project" in eclipse)
>
> Thank you,
> Cristiano
>
> Il giorno mer 2 mar 2016 alle ore 12:42 Claus Ibsen <cl...@gmail.com>
> ha scritto:
>
>> Yes you should do the same in spring xml, and its just as easier there
>> is a binding attribute you can turn off.
>>
>> The spring xml is documented as a xsd so you can just look in there
>> what is valid to use, and setup your java editor to use that xsd while
>> editing and the editor can assist you and tell what is valid or not.
>>
>> On Wed, Mar 2, 2016 at 10:23 AM, Cristiano Costantini
>> <cr...@gmail.com> wrote:
>> > Hello All,
>> >
>> > I'm updating our project to use latest Camel 2.16 from camel 2.13.2
>> >
>> > Launching tests, I've discovered the new behavior of the CamelProxy
>> which
>> > turns on Parameter Binding by default (
>> >
>> http://camel.apache.org/using-camelproxy.html#UsingCamelProxy-WhatissendontheMessage
>> ),
>> > and makes my tests fails. On the tests the fix has been easy. I've
>> changed
>> > this code:
>> >
>> >     Endpoint endpoint = context.getEndpoint("direct:start");
>> >     MyService proxy = ProxyHelper.createProxy(endpoint,
>> MyService.class);
>> >
>> > to this code which set the binding to false:
>> >
>> >     MyService proxy =
>> >         new ProxyBuilder(context).endpoint("direct:start")
>> >         .binding(false).build(MyService.class);
>> >
>> > My question is:
>> > in production we use the Spring DSL with the <proxy> tag, for example:
>> >
>> > <proxy id="proxyId" serviceInterface="com.example. MyService"
>> > serviceUrl="direct:start" />
>> >
>> > should I turn off binding also on these proxies? How can I do on the
>> Spring
>> > DSL?
>> >
>> > Thank you very much,
>> > Cristiano
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> http://davsclaus.com @davsclaus
>> Camel in Action 2: https://www.manning.com/ibsen2
>>
>

Re: CamelProxy and on Camel 2.16

Posted by Cristiano Costantini <cr...@gmail.com>.
Hi Claus!
Yes I've found it!
It is:

<proxy id="proxyId" serviceInterface="com.example. MyService"
 serviceUrl="direct:start" binding="false" />

probably I didn't initially found it because eclipse was still pointing to
the XSD of version 2.13.2 (I've found the attribute after "maven > update
project" in eclipse)

Thank you,
Cristiano

Il giorno mer 2 mar 2016 alle ore 12:42 Claus Ibsen <cl...@gmail.com>
ha scritto:

> Yes you should do the same in spring xml, and its just as easier there
> is a binding attribute you can turn off.
>
> The spring xml is documented as a xsd so you can just look in there
> what is valid to use, and setup your java editor to use that xsd while
> editing and the editor can assist you and tell what is valid or not.
>
> On Wed, Mar 2, 2016 at 10:23 AM, Cristiano Costantini
> <cr...@gmail.com> wrote:
> > Hello All,
> >
> > I'm updating our project to use latest Camel 2.16 from camel 2.13.2
> >
> > Launching tests, I've discovered the new behavior of the CamelProxy which
> > turns on Parameter Binding by default (
> >
> http://camel.apache.org/using-camelproxy.html#UsingCamelProxy-WhatissendontheMessage
> ),
> > and makes my tests fails. On the tests the fix has been easy. I've
> changed
> > this code:
> >
> >     Endpoint endpoint = context.getEndpoint("direct:start");
> >     MyService proxy = ProxyHelper.createProxy(endpoint, MyService.class);
> >
> > to this code which set the binding to false:
> >
> >     MyService proxy =
> >         new ProxyBuilder(context).endpoint("direct:start")
> >         .binding(false).build(MyService.class);
> >
> > My question is:
> > in production we use the Spring DSL with the <proxy> tag, for example:
> >
> > <proxy id="proxyId" serviceInterface="com.example. MyService"
> > serviceUrl="direct:start" />
> >
> > should I turn off binding also on these proxies? How can I do on the
> Spring
> > DSL?
> >
> > Thank you very much,
> > Cristiano
>
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>

Re: CamelProxy and on Camel 2.16

Posted by Claus Ibsen <cl...@gmail.com>.
Yes you should do the same in spring xml, and its just as easier there
is a binding attribute you can turn off.

The spring xml is documented as a xsd so you can just look in there
what is valid to use, and setup your java editor to use that xsd while
editing and the editor can assist you and tell what is valid or not.

On Wed, Mar 2, 2016 at 10:23 AM, Cristiano Costantini
<cr...@gmail.com> wrote:
> Hello All,
>
> I'm updating our project to use latest Camel 2.16 from camel 2.13.2
>
> Launching tests, I've discovered the new behavior of the CamelProxy which
> turns on Parameter Binding by default (
> http://camel.apache.org/using-camelproxy.html#UsingCamelProxy-WhatissendontheMessage),
> and makes my tests fails. On the tests the fix has been easy. I've changed
> this code:
>
>     Endpoint endpoint = context.getEndpoint("direct:start");
>     MyService proxy = ProxyHelper.createProxy(endpoint, MyService.class);
>
> to this code which set the binding to false:
>
>     MyService proxy =
>         new ProxyBuilder(context).endpoint("direct:start")
>         .binding(false).build(MyService.class);
>
> My question is:
> in production we use the Spring DSL with the <proxy> tag, for example:
>
> <proxy id="proxyId" serviceInterface="com.example. MyService"
> serviceUrl="direct:start" />
>
> should I turn off binding also on these proxies? How can I do on the Spring
> DSL?
>
> Thank you very much,
> Cristiano



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