The code hereafter generates an error which was not there before :

    @EndpointInject(name = "jms:queue:inout")
    ProducerTemplate producer;

    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

Reply via email to