Return-Path: Delivered-To: apmail-cxf-dev-archive@www.apache.org Received: (qmail 95974 invoked from network); 26 Aug 2009 16:03:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 26 Aug 2009 16:03:04 -0000 Received: (qmail 49709 invoked by uid 500); 26 Aug 2009 16:03:03 -0000 Delivered-To: apmail-cxf-dev-archive@cxf.apache.org Received: (qmail 49625 invoked by uid 500); 26 Aug 2009 16:03:03 -0000 Mailing-List: contact dev-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list dev@cxf.apache.org Received: (qmail 49615 invoked by uid 99); 26 Aug 2009 16:03:03 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Aug 2009 16:03:03 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jmholtzman@gmail.com designates 209.85.219.210 as permitted sender) Received: from [209.85.219.210] (HELO mail-ew0-f210.google.com) (209.85.219.210) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Aug 2009 16:02:53 +0000 Received: by ewy6 with SMTP id 6so343000ewy.10 for ; Wed, 26 Aug 2009 09:02:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to :content-type; bh=G2bRBXrwmG/CVAtx/qqJ4aiVT/Eqg9A8ahL0ohWRHEU=; b=SzK1vknZLjO+thi3sbnZ/0E7X9hdecuHAulaIQ3PtoepI7SSbSaDqzmJg4IXM35Lpi b9wM1/HjHBWK6c1002F64cZ8I/cUqQ1aonHhWGYJnEmffWwUnESGSLq36EFyNlIm+x4I VhAX9VaGBJCxKReXlOLhsQyxpmmUziSF7BVYQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type; b=lqVyV52Tdwj14FipQWSwy/6up9bi8kMMBn0EaJ696IZZ7VQo7elsAUKa6l1ivG04hd 5Jji1EXzK0YRJJJ+jUEFp98trrH30eCvXP91uzAVY7SSIehDiSAGIKEnnXiz9sV5GwDK l5ezxCb7A0fExMkSZmFFTpIfHWceJGoFKE7tc= MIME-Version: 1.0 Sender: jmholtzman@gmail.com Received: by 10.216.48.195 with SMTP id v45mr1702243web.123.1251302543546; Wed, 26 Aug 2009 09:02:23 -0700 (PDT) In-Reply-To: <25138636.post@talk.nabble.com> References: <01c401ca227c$76f99e40$1f02050a@emea.progress.com> <25138636.post@talk.nabble.com> From: Josh Holtzman Date: Wed, 26 Aug 2009 18:02:03 +0200 X-Google-Sender-Auth: 8129a395063dbd7e Message-ID: Subject: Re: Integrating JAX-RS runtime into DOSGi To: dev@cxf.apache.org Content-Type: multipart/alternative; boundary=001485f6ccba9d59ee04720d9359 X-Virus-Checked: Checked by ClamAV on apache.org --001485f6ccba9d59ee04720d9359 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Great, thanks Sergey. I just tried this, and wasn't able to read/write an arbitrary object. I've registered a MessageBodyReader and a MessageBodyWriter (actually, the same object) like so: FooXmlReaderWriter fooReaderWriter = new FooXmlReaderWriter(); context.registerService(MessageBodyReader.class.getName(), fooReaderWriter, null); context.registerService(MessageBodyWriter.class.getName(), fooReaderWriter, null); I see that these services are in fact registered: ----------------------------------------------- objectClass = javax.ws.rs.ext.MessageBodyReader service.id = 41 ---- objectClass = javax.ws.rs.ext.MessageBodyWriter service.id = 42 ---- But when I try to access a Foo via JAX-RS, I get this: [9853182@qtp-998044-0 - /inspection/rest/foo] WARN org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor - .No message body writer found for response class : Foo. Please let me know if I misunderstood the recipe for registering JAX-RS providers. I'll be out of the office until Monday, and will start digging into the CXF code to see what's going on when I return. Many thanks, Josh On Tue, Aug 25, 2009 at 7:21 PM, Sergey Beryozkin wrote: > > Hi Josh > > I've updated the JAX-RS layer in DOSGi such that it will now discover JAXRS > (and CXF specific providers) which have been registered as (global) OSGI > services. At the moment I've decided not to use a ServiceTracker and > instead > a calling BundleContext is asked to exercise a filter expression which > should catch JAXRS MessageBodyReader, MessageBodyWriter, ExceptionMapper, > as > well as CXF RequestHandler, ResponseHandler & ParameterHandler. I'll > attempt > to optimize it later on.... > > One can disable such queries for such providers and also insist that only > those global providers which have identified themselves (through a specific > property) that they will work reliably with CXF can be used. > > Alternatively, one can register an array of service/endpoint -specific > providers by using "org.apache.cxf.rs.provider" property, when registering > an application service. > Will document it tomorrow > > Give it a try please whenever you get a chance and let me know if it works > for you > > cheers, Sergey > > > > Josh Holtzman wrote: > > > > Hi Sergey. Yes, we are using JAXB with both JAX-RS and JAX-WS endpoints. > > > > Josh > > > > On Aug 21, 2009 6:28 PM, "Sergey Beryozkin" > wrote: > > > > Hi Josh > > > > Can you please let me know if JAXB is being used for your JAX-RS > endpoints > > ? > > I've spotted that for HTTP Service based JAX-RS endpoints no > AegisProvider > > is being set - I'would actually like JAXB being used by default for JAXRS > > endpoints which will be consistent with the expectations of JAX-RS users > > in > > general - but I'd like to confirm first that JAXB is working ok in your > > case... > > > > thanks, Sergey > > > >> Sergey, > Thanks again for the detailed documentation you've provided in > > this thread. > I was ab... > > > > > > -- > View this message in context: > http://www.nabble.com/RE%3A-Integrating-JAX-RS-runtime-into-DOSGi-tp24127832p25138636.html > Sent from the cxf-dev mailing list archive at Nabble.com. > > --001485f6ccba9d59ee04720d9359--