Hi Eric On Thu, Sep 30, 2010 at 6:21 PM, Kampf, Eric <[email protected]> wrote:
> Sergy, > > I have run into a problem right off the bat. The class I need to extend, > AegisElementProvider, is included in CXF (cxf-bundle-minimal-2.2.9.jar which > is distributed with DOSGI-CXF 1.2). I need to reference this class from an > OSGI bundle. To do so within my Eclipse environment, I first need to get > Eclipse to recognize CXF as a bundle/plug-in. I copied all CXF jar files to > my <ECLIPSE>/plugins directory, but Eclipse does not recognize CXF as a > bundle. Thus I am not able to add the manifest entry to resolve the > reference to the Aegis class. > I do not the answer right now - can you try update the manifest of your bundle manually, without Eclipse, just for the sake of verifying if the whole idea works ? > > Several of us inspected the CXF jar. Its structure and content resemble > that of other bundles recognized by Eclipse. When I compare the manifest > entries of cxf-dosgi-ri-discovery-local-1.2.jar (recognized by Eclipse) and > cxf-bundle-minimal-2.2.9.jar (not recognized by Eclipse), I can find no > significant difference. > > Any idea what might be going on? > > May be some differences in manifets, specifically in OSGI-related directives ? Say, bundle symbolic name, etc ? cheers, Sergey > Thanks. > > -Eric > > -----Original Message----- > From: Kampf, Eric > Sent: Wednesday, September 29, 2010 9:19 AM > To: [email protected] > Subject: RE: Aegis Binding without namespaces > > Sergey, > > Thanks for the advice. I'll give this a go and let you know how it turns > out. > > -Eric > > -----Original Message----- > From: Sergey Beryozkin [mailto:[email protected]] > Sent: Wednesday, September 29, 2010 5:45 AM > To: [email protected] > Subject: Re: Aegis Binding without namespaces > > Hi Eric > > the way you can do it is as follows. > > Extend AegisElementProvider [1] and override its createStreamWriter method > and create a custom writer, see [2] for an example, just pass to it the > writer instance AegisElementProvider creates. > > You just probably need to override writeNamespace(...) with a no-op > implementation and writeStartElement and block the namespaces. > > I believe you work with DOSGI. In that case, do not use > org.apache.cxf.rs.databindng property but rather an > "org.apache.cxf.rs.providers" and list the full name of your custom > provider. > > hope it helps, Sergey > > [1] > > http://svn.apache.org/repos/asf/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AegisElementProvider.java > [2] > > http://svn.apache.org/repos/asf/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/CustomXmlStreamWriter.java > On Wed, Sep 29, 2010 at 2:15 AM, Kampf, Eric <[email protected]> > wrote: > > > Yes the reason for this is that our primary clients are mobile devices, > > some of which have very limited XML parsing capabilities. REST seems to > > emphasize simplicity and namespace handling is not always simple. SOAP > is a > > little too 2009 for my taste. :-) > > > > -----Original Message----- > > From: Benson Margulies [mailto:[email protected]] > > Sent: Tuesday, September 28, 2010 9:09 PM > > To: [email protected] > > Subject: Re: Aegis Binding without namespaces > > > > It's a big problem. The mapping of packages to namespaces avoids > > collisions. If you don't want namespaces, then you have to find > > another solution. > > > > I personally find no-namespace XML to be entirely too 1999 for my > > taste, but I imagine that you have a good reason for it. > > > > On Tue, Sep 28, 2010 at 4:49 PM, Daniel Kulp <[email protected]> wrote: > > > > > > I honestly don't think anyone has looked at this at all. If it's > > something > > > you need, you'll likely have to work on it and submit patches. > > > > > > Dan > > > > > > > > > On Tuesday 28 September 2010 4:26:35 pm Kampf, Eric wrote: > > >> Hello, > > >> > > >> I would like to use CXF's Aegis data binding for a REST service (I > have > > >> multiple reasons for preferring Aegis over JAXB...). The biggest > > >> impediment I face however is the presence of namespaces on all > elements. > > >> This will be a hardship for most of our clients. > > >> > > >> I see that this topic came up a couple of years ago on this list: > > >> > http://www.mail-archive.com/[email protected]/msg04683.html > > . > > >> It even resulted in the creation of a JIRA issue which is still listed > > as > > >> open: > > >> > > > https://issues.apache.org/jira/browse/CXF-1291?page=com.atlassian.jira.plu > > >> gin.system.issuetabpanels:comment-tabpanel. > > >> > > >> Does anyone know if there is a solution for this? Our clients are > > simply > > >> not going to be able to use namespaces. Is there any hope of > > configuring > > >> Aegis to function without namespaces? > > >> > > >> Thanks. > > >> > > >> -Eric > > > > > > -- > > > Daniel Kulp > > > [email protected] > > > http://dankulp.com/blog > > > > > >
