Questions tagged [cxfrs]

CXFRS is an Apache Camel component that provides integration with Apache CXF for connecting to JAX-RS services hosted in CXF.

CXFRS is an Apache Camel component that provides integration with Apache CXF for connecting to JAX-RS services hosted in CXF.

Reference http://camel.apache.org/cxfrs.html

162 questions
61
votes
1 answer

How to route Rest request from a local service to a remote one using Camel

I am trying to route a rest request from a cxf rest service to another. I have had a look at http://camel.apache.org/cxfrs.html which helped understand part of the process. I have a classCastException at the level of the remoteService Invocation. …
redben
  • 5,578
  • 5
  • 47
  • 63
13
votes
5 answers

No message body writer has been found for response class ArrayList

While I am trying to return List its throwing No message body writer has been found for response class ArrayList. I have code as follows: @POST @Path("/{scope}/{application}/tables") @Produces("application/xml") public List
aswininayak
  • 933
  • 5
  • 22
  • 39
12
votes
2 answers

CXF REST APIs Documentation using Swagger

According to Swagger's tutorial, seems swagger only support Jersey framework (See https://github.com/wordnik/swagger-core/wiki/java-jax-rs) Does anybody have experience on making swagger work with CXF JAX-RS implementation? Could you share your…
Dylan
  • 179
  • 2
  • 12
8
votes
2 answers

Why do we use as opposed to a plain when using the CXF-RS component?

As a follow-up to this question, I'm still a bit confused about how to properly use the CXF-RS component. I'm confused why we need the tag for specifying CXF-RS endpoints (or is there even such a concept?), when I can use the…
Ivan Gozali
  • 2,089
  • 1
  • 27
  • 25
7
votes
1 answer

Configure jetty that is launched via CXF programmatically

I launch a jetty instance indirectly when creating a JAX-RS endpoint using cxf JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean(); sf.setResourceClasses(HelloWorldResource.class); sf.setResourceProvider(HelloWorldResource.class,…
Aksel Willgert
  • 11,367
  • 5
  • 53
  • 74
7
votes
2 answers

Generating wadl from existing CXF rest service

I try to create a wadl from an existing CXF rest service. It does not work. I am getting instead HTTP 404. The rest service itself does work. I use Tomcat 7. What am I doing wrong? Server Information Tomcat Version JVM Version JVM Vendor OS…
rapt
  • 11,810
  • 35
  • 103
  • 145
6
votes
0 answers

Why does injected UriInfo use a different hostname than injected HttpServletRequest?

I'm learning JAX-RS, and like the idea of returning URLs to other relevant actions in a response. Using Apache TomEE JAX-RS 1.5.1, for some reason the URLs provided by an injected UriInfo instance are always using "localhost" as the host name. I…
GargantuChet
  • 5,691
  • 1
  • 30
  • 41
5
votes
6 answers

No message body writer found : JSON : Apache CXF : RestFul Webservices

I am using Apache CXF for making a simple restful application. I have a client class which posts a JSON object to the server and server returns back a JSON after some manipulation. but when i execute the code i get…
Sikorski
  • 2,653
  • 3
  • 25
  • 46
5
votes
2 answers

Can anyone point me to a working example Camel route using a cxfrs client/producer?

I am having trouble getting my Camel route to successfully POST a message to an existing RESTful web service. I have tried all the examples in the camel cxf package but none of them produce a web service call (they are consumers). I would love to…
HoopItUp
  • 63
  • 1
  • 2
  • 5
5
votes
2 answers

How to invoke a REST call (POST with JSON body) from Camel in Java DSL

Having the following working Camel flow setup in a ServletContextListener in a Web project running on IBM WebSphere, an incoming XML is converted to JSON and printed to the System.out and printed to the report.txt. So far so…
JStefan
  • 149
  • 1
  • 2
  • 11
5
votes
1 answer

How to remove namespace prefixes from JSON response in CXF/JAX-RS?

I have the following response created by CXF using JAX-RS: {"ns1.CustomerInformationResponse":{ "@xsi.type":"ns1:CustomerInformationResponse", "ns2.code":"SUCCESS", "ns1.customer":{ "@xsi.type":"ns2:CustomerBaseDTO", …
user1763152
  • 51
  • 1
  • 2
4
votes
2 answers

Exposure of Camel routes as REST services under Web container

I have Camel route that I would like to expose as a REST Web Service. Application is deployed on Web container (Jetty/Tomcat) and Spring is used as well for DI and other "infrastructural" things. I took a look at both camel-restlet and camel-cxfrs…
oiavorskyi
  • 2,893
  • 1
  • 20
  • 23
4
votes
1 answer

Apache Camel CxfRsEndpoint performInvocation setting triggers invocation twice

I have a minimal camel route with a cxf endpoint (in a RouteBuilder#configure method): CxfRsComponent cxfComponent = new CxfRsComponent(context); CxfRsEndpoint serviceEndpoint = new CxfRsEndpoint("http:/localhost/rest",…
4
votes
2 answers

How to deal with input parameter in CXF request handler in general?

I have been doing some work with apache CXF(version 2.2.2) JAX-RS. I am trying to introduce data validation layer in CXF request handler before business method be invoked. Fortunately :), I am encountering an issue on input parameter handling in…
Dylan
  • 179
  • 2
  • 12
3
votes
1 answer

Injecting CXF JAXRS MessageContext in an "in Interceptor"

I am trying to inject MessageContext in an Interceptor with the Phase as READ as follows @Context org.apache.cxf.jaxrs.ext.MessageContext.MessageContext messageContext; But this is not getting initialized and remains null. Is it possible to inject…
user325643
  • 353
  • 1
  • 8
  • 20
1
2 3
10 11