Return-Path: Delivered-To: apmail-cxf-users-archive@www.apache.org Received: (qmail 98481 invoked from network); 1 Oct 2010 19:53:25 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 1 Oct 2010 19:53:25 -0000 Received: (qmail 3614 invoked by uid 500); 1 Oct 2010 19:53:24 -0000 Delivered-To: apmail-cxf-users-archive@cxf.apache.org Received: (qmail 3574 invoked by uid 500); 1 Oct 2010 19:53:24 -0000 Mailing-List: contact users-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@cxf.apache.org Delivered-To: mailing list users@cxf.apache.org Received: (qmail 3566 invoked by uid 99); 1 Oct 2010 19:53:24 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Oct 2010 19:53:24 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [64.85.173.253] (HELO server.dankulp.com) (64.85.173.253) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Oct 2010 19:53:17 +0000 Received: by server.dankulp.com (Postfix, from userid 5000) id 8862C186E4A; Fri, 1 Oct 2010 15:52:56 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on server.dankulp.com X-Spam-Level: X-Msg-File: /tmp/mailfilter-users@cxf.apache.org.2OvuLtwxEx Received: from dilbert.dankulp.com (c-24-91-72-253.hsd1.ma.comcast.net [24.91.72.253]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by server.dankulp.com (Postfix) with ESMTPSA id 75C36186E47; Fri, 1 Oct 2010 15:52:54 -0400 (EDT) From: Daniel Kulp To: users@cxf.apache.org Subject: Re: Aegis Binding without namespaces Date: Fri, 1 Oct 2010 15:52:06 -0400 User-Agent: KMail/1.13.5 (Linux/2.6.35; KDE/4.5.1; x86_64; ; ) Cc: "Kampf, Eric" References: <0A95DE316D40F244B65989915C978B072E89A5C41E@KEX-US-CLUS02.KRONOS.COM> <0A95DE316D40F244B65989915C978B072E89A5C452@KEX-US-CLUS02.KRONOS.COM> In-Reply-To: <0A95DE316D40F244B65989915C978B072E89A5C452@KEX-US-CLUS02.KRONOS.COM> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201010011552.07025.dkulp@apache.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=-2.9 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00 shortcircuit=no autolearn=ham version=3.3.1 On Friday 01 October 2010 2:28:34 pm Kampf, Eric wrote: > Sergey, > > I implemented your suggestion and it worked for outgoing data. > Unfortunately incoming data is an issue. Aegis still requires the > namespace information to be able to unmarshal the XML. > > So what I am really looking for is a way to entirely disable namespace > mapping in the binding. I realize it is not directly supported, but > perhaps there is some way to "trick" the binding? Any suggestions? Is it possible to do the reverse on the way in? Wrapper the XMLStreamReader with one that always returns a preconfigured namespace for all the calls the pull a namespace? Dan > > Thanks again for all your help to this point. > > -Eric > > -----Original Message----- > From: Sergey Beryozkin [mailto:sberyozkin@gmail.com] > Sent: Wednesday, September 29, 2010 5:45 AM > To: users@cxf.apache.org > 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/o > rg/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 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:bimargulies@gmail.com] > > Sent: Tuesday, September 28, 2010 9:09 PM > > To: users@cxf.apache.org > > 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 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/cxf-user@incubator.apache.org/msg04683.htm > > >> l > > > > . > > > > >> 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.pl > > u > > > > >> 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 > > > dkulp@apache.org > > > http://dankulp.com/blog -- Daniel Kulp dkulp@apache.org http://dankulp.com/blog