You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Charles Moulliard (JIRA)" <ji...@apache.org> on 2009/12/02 15:48:52 UTC
[jira] Updated: (CAMEL-2239) Cannot determine specific JmsMessage
type to use from body class
[ https://issues.apache.org/activemq/browse/CAMEL-2239?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Charles Moulliard updated CAMEL-2239:
-------------------------------------
Comment: was deleted
(was: @Willem, @Sergey,
An elegant alternative approach could be that the thread running the method called in the REST service :
@GET
@Path("/incidents/{id}/")
public Incident getIncident(@PathParam("id") String id) {
long idNumber = Long.parseLong(id);
Incident i = incidents.get(idNumber);
return i;
}
is suspended and resumed when we receive through Camel route what the client is expected to receive as reply. This could be achieved if we add a new annotation @ProcessStatus to inform camel endpoint or CXF that we wait exchange return from Camel route (where we call a POJO in charge by example to make a DataBase request) before to provide back the reply to the RESTfull client.
)
> Cannot determine specific JmsMessage type to use from body class
> ----------------------------------------------------------------
>
> Key: CAMEL-2239
> URL: https://issues.apache.org/activemq/browse/CAMEL-2239
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-cxf
> Affects Versions: 2.1.0
> Reporter: Charles Moulliard
> Assignee: Willem Jiang
> Fix For: 2.2.0
>
>
> Error : Cannot determine specific JmsMessage type to use from body class. Will use generic JmsMessage. Body class: org.apache.cxf.jaxrs.impl.ResponseImpl. If you want to send a POJO then your class might need to implement java.io.Serializable, or you can force a specific type by setting the jmsMessageType option on the JMS endpoint
> is reported with the following camel routing
> {code}
> <beans xmlns="http://www.springframework.org/schema/beans"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
> xmlns:camel="http://camel.apache.org/schema/spring" xmlns:cxf="http://camel.apache.org/schema/cxf"
> xmlns:cxf-core="http://cxf.apache.org/core" xmlns:jaxrs="http://cxf.apache.org/jaxrs"
> xsi:schemaLocation="
> http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans.xsd
> http://www.springframework.org/schema/context
> http://www.springframework.org/schema/context/spring-context.xsd
> http://camel.apache.org/schema/osgi
> http://camel.apache.org/schema/osgi/camel-osgi.xsd
> http://camel.apache.org/schema/spring
> http://camel.apache.org/schema/spring/camel-spring.xsd
> http://camel.apache.org/schema/cxf
> http://camel.apache.org/schema/cxf/camel-cxf.xsd
> http://cxf.apache.org/jaxrs
> http://cxf.apache.org/schemas/jaxrs.xsd
> http://cxf.apache.org/core
> http://cxf.apache.org/schemas/core.xsd">
> <import resource="classpath:META-INF/cxf/cxf.xml" />
> <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
> <import resource="classpath:META-INF/cxf/cxf-extension-http.xml" />
> <import resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml" />
> <import resource="classpath:META-INF/cxf/osgi/cxf-extension-osgi.xml" />
>
> <bean id="jms" class="org.apache.activemq.camel.component.ActiveMQComponent">
> <property name="connectionFactory">
> <bean class="org.apache.activemq.ActiveMQConnectionFactory">
> <property name="brokerURL" value="vm://localhost?broker.persistent=false"/>
> </bean>
> </property>
> </bean>
> <!--
> <jaxrs:features> <cxf-core:logging/> </jaxrs:features> <bean
> id="jsonProvider" class="org.apache.cxf.jaxrs.provider.JSONProvider"/>
> -->
> <jaxrs:server id="restService" address="/proxy/camel-rest-example/"
> staticSubresourceResolution="true">
> <jaxrs:serviceBeans>
> <ref bean="reportIncidentService" />
> </jaxrs:serviceBeans>
> <!-- <jaxrs:features><cxf-core:logging/></jaxrs:features> -->
> </jaxrs:server>
> <bean id="reportIncidentService" class="org.apache.camel.example.reportincident.restful.ReportIncidentService" />
>
> <cxf:rsServer id="rsServer" address="/camel-rest-example/"
> serviceClass="org.apache.camel.example.reportincident.restful.ReportIncidentService" />
> <cxf:rsClient id="rsClient" address="http://localhost:8181/cxf/proxy/"/>
> <camel:camelContext trace="true"
> xmlns="http://camel.apache.org/schema/osgi">
> <camel:route>
> <camel:from uri="cxfrs:bean:rsServer" />
> <!-- <camel:to uri="log:org.apache.camel.example.reportIncident?level=DEBUG" /> -->
> <camel:to uri="jms:queue:in" />
> </camel:route>
>
> <camel:route>
> <camel:from uri="jms:queue:in"/>
> <camel:to uri="cxfrs:bean:rsClient" />
> </camel:route>
> </camel:camelContext>
>
> </beans>
> {code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.