camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Problem with injection of endpoint (cxf - producer - camel 2.2 - osgi)
Date Thu, 17 Dec 2009 07:31:37 GMT
On Wed, Dec 16, 2009 at 2:25 PM, Charles Moulliard <cmoulliard@gmail.com> wrote:
> This is much better now.
>

BTW I am fixing it in Camel 2.2 so it will throw an exception when you
enter an invalid value in the attributes.
https://issues.apache.org/activemq/browse/CAMEL-2299


> Thx.
>
> Charles Moulliard
> Senior Enterprise Architect
> Apache Camel Committer
>
> *****************************
> blog : http://cmoulliard.blogspot.com
> twitter : http://twitter.com/cmoulliard
> Linkedlin : http://www.linkedin.com/in/charlesmoulliard
>
> Apache Camel Group :
> http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm
>
>
> On Wed, Dec 16, 2009 at 2:18 PM, Claus Ibsen <claus.ibsen@gmail.com> wrote:
>
>> On Wed, Dec 16, 2009 at 2:14 PM, Charles Moulliard <cmoulliard@gmail.com>
>> wrote:
>> > The code hereafter generates an error which was not there before :
>> >
>> >    @EndpointInject(name = "jms:queue:inout")
>> >    ProducerTemplate producer;
>>
>> Use (uri = "jms:queue:inout") as it appears as a uri and not a
>> reference to an endpoint.
>>
>> We should probably add some validation (if possible) that the default
>> endpoint could not be resolved.
>>
>>
>>
>> >
>> >    public ReportIncidentService() {
>> >        init();
>> >    }
>> >
>> >    @GET
>> >    public Incidents getIncidents() {
>> >
>> >        Incidents l = new Incidents();
>> >
>> >        // Call the distant service to get result (SYNCHR WAY)
>> >
>> >        List<Incident> i = (List<Incident>)
>> > producer.requestBody("GET_INCIDENTS");
>> >        l.setIncidents(i);
>> >
>> >        return l;
>> >    }
>> >
>> > Caused by: org.apache.cxf.interceptor.Fault: defaultEndpoint must be
>> > specified
>> > at
>> >
>> org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:155)
>> > at
>> >
>> org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:121)
>> > at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:130)
>> > at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:82)
>> > at
>> >
>> org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)
>> > at
>> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>> > at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
>> > at java.util.concurrent.FutureTask.run(FutureTask.java:138)
>> > at
>> >
>> org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
>> > at
>> >
>> org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106)
>> > at
>> >
>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
>> > ... 37 more
>> >
>> >
>> > If I use the following method, everything works fine
>> >
>> > List<Incident> i = (List<Incident>) producer.requestBody(
>> > "jms:queue:inout","GET_INCIDENTS");
>> >
>> > Regards,
>> >
>> > Charles Moulliard
>> > Senior Enterprise Architect
>> > Apache Camel Committer
>> >
>> > *****************************
>> > blog : http://cmoulliard.blogspot.com
>> > twitter : http://twitter.com/cmoulliard
>> > Linkedlin : http://www.linkedin.com/in/charlesmoulliard
>> >
>> > Apache Camel Group :
>> > http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm
>> >
>>
>>
>>
>> --
>> Claus Ibsen
>> Apache Camel Committer
>>
>> Author of Camel in Action: http://www.manning.com/ibsen/
>> Open Source Integration: http://fusesource.com
>> Blog: http://davsclaus.blogspot.com/
>> Twitter: http://twitter.com/davsclaus
>>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Mime
View raw message