rest - Basic cxfrs RESTful JAX-RS Service -


I am trying to get a basic CXF RS JX-RS example for working. Unfortunately, the GET on a resource which I want to return HTML does not apply the resource at all.

Here is an extraction from spring bean:

   & Lt; Bean id = "HelloResource" class = "com.example.HelloResource" /> & Lt; Camelcontext xmlns = "http://camel.apache.org/schema/spring" & gt; & Lt; Route & gt; & Lt; From Yuri = "cxfrs: bean: rsssver" /> & Lt; From Yuri = "Log: Later? ShowAll = true" /> & Lt; / Route & gt; & Lt; / CamelContext & gt; Here is a quote from the related JAX-RS resource:  
  @ path ("/") public class HelloResource {Private Final Log Log = LogFattery. GetLog (HelloResource.class); Public HelloResource () {log.info ("creating HelloResource ..."); } @GET @ path ("/ Hello") @ product ("text / html") public string hello () {log.info ("***** hello? ******"); Return "& lt; p & gt; Hello World! & Lt; / p & gt;"; }}  

The following command does not offer any output:

  Kernel localhost: 9099 / path / hello  

As you can see from the following log extract, the spring bean has been created, the method that he will call looks correct, but the method does not really say:

  14: 55: 27,614 | Information | Qtp137557963-131 HelloResource | 180 - Hello.jar - 0.0.0 | Creating HelloResource ... 14: 55: 27,616 | Information | Qtp137557963-131 After 96 - org.apache.camel.camel-Core - 2.10.4 | Exchange [Id: ASDF63648-1398714852208-0-3, ExchangePattern: InOut, properties: {CamelToEndpoint = log: showAll = true after //, CamelCreatedTimestamp = Mon Apral 28 14:55:27 CDT 2014?}, Header : {CamelHttpUri = /route/hello,CamelCxfMessage=org.apache.cxf.message.XMLMessage@76159b6f, CamelHttpPath = / hello, breadcrumbID = ASDFAS3987148522080-4, CamelCxfRsResponseGenericType = class java.lang.String, user-agent = curl / 7.21 .1 (i686) -pisi- mingw32) libcurl / / 7.21.1 OpenSSL / 0.9.8r zlib 1.2.3, operationName = Hello, accept = * / * content types get = null, CamelHttpMethod =, CamelCxfRsOperationResourceInfoStack = [ Org.apache.cxf JaxrskmodelkMethodInvocationInfo@354563cc] host = localhost: 9099, CamelAcceptContentType = * / *, CamelCxfRsResponseClass = class java.lang.String}, BodyType: org.apache.cxf.message.MessageContentsList, body: [], out : Blank]  

I'm sure I'm doing something wrong

Thanks!


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -