Return-Path: Delivered-To: apmail-cxf-dev-archive@www.apache.org Received: (qmail 79910 invoked from network); 8 Sep 2009 20:28:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 8 Sep 2009 20:28:58 -0000 Received: (qmail 60171 invoked by uid 500); 8 Sep 2009 20:28:57 -0000 Delivered-To: apmail-cxf-dev-archive@cxf.apache.org Received: (qmail 60107 invoked by uid 500); 8 Sep 2009 20:28:57 -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 60097 invoked by uid 99); 8 Sep 2009 20:28:57 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Sep 2009 20:28:57 +0000 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [216.40.44.73] (HELO smtprelay.hostedemail.com) (216.40.44.73) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Sep 2009 20:28:45 +0000 Received: from filter.hostedemail.com (ff-bigip1 [10.5.19.254]) by smtprelay02.hostedemail.com (Postfix) with SMTP id 46E941025F8B for ; Tue, 8 Sep 2009 20:28:24 +0000 (UTC) X-Spam-Summary: 50,0,0,f2802cd0c218e3d8,907452bc8cfe1759,dkulp@apache.org,dev@cxf.apache.org:bimargulies@gmail.com,RULES_HIT:355:379:599:601:945:967:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1542:1593:1594:1711:1730:1747:1766:1792:2393:2525:2553:2560:2563:2682:2685:2693:2731:2828:2857:2859:2892:2933:2937:2939:2942:2945:2947:2951:2954:3022:3027:3355:3865:3866:3867:3868:3869:3870:3871:3872:3873:3874:3876:3877:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:4250:5007:6114:6261:7679:7903:7904:8501:8957:8985:9025:9160:9388,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fu,MSBL:none,DNSBL:none X-Session-Marker: 64616E406B756C702E636F6D X-Filterd-Recvd-Size: 4156 Received: from server.dankulp.com (server1.dankulp.com [66.207.172.168]) (Authenticated sender: dan@kulp.com) by omf03.hostedemail.com (Postfix) with ESMTP for ; Tue, 8 Sep 2009 20:28:23 +0000 (UTC) Received: by server.dankulp.com (Postfix, from userid 5000) id 79E0950707C1; Tue, 8 Sep 2009 16:28:23 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.2.1-gr1 (2007-05-02) on server.dankulp.com X-Spam-Level: X-Msg-File: /tmp/mailfilter.xKzAI7pEDJ Received: from dilbert.localnet (c-24-91-141-225.hsd1.ma.comcast.net [24.91.141.225]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by server.dankulp.com (Postfix) with ESMTPSA id 61AD850707BF; Tue, 8 Sep 2009 16:28:22 -0400 (EDT) From: Daniel Kulp To: dev@cxf.apache.org Subject: Re: JSON + Aegis + JAX-RS: Not? Date: Tue, 8 Sep 2009 16:28:18 -0400 User-Agent: KMail/1.12.1 (Linux/2.6.30-gentoo-r6; KDE/4.3.1; x86_64; ; ) Cc: Benson Margulies References: <61b5d9410909051052w6022d4cfqae7dcd30a81fa5d2@mail.gmail.com> In-Reply-To: <61b5d9410909051052w6022d4cfqae7dcd30a81fa5d2@mail.gmail.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <200909081628.18433.dkulp@apache.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=-3.3 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.1-gr1 I'm completely lost on most of this discussion, but thought I'd pop in with couple ideas that may or may not be applicable: 1) In CXF, all the subclasses of AbstractDataBinding already have a namespaceMap in them where the use CAN (not require) configure prefixes in if they want. It might be good to push them into jettison. Keeps them consistent between soap/json. 2) You might be able to loop through the schemaCollection for all the namespaces up front to avoid the DOM thing. Doesn't solve the real prefix mapping issue though. You could at least make it predictable by sorting the namespaces and assigning them ns# based on the sorting order. If I think of more, I'll happily speak up. :-) Dan On Sat September 5 2009 1:52:10 pm Benson Margulies wrote: > Well, so, I've been working on the soggy saga of JAX-RS + Aegis + Jettison. > I won't repeat other recent messages too much. > > Aegis likes to write namespaces. There is no option to use it unqualified. > > Jettison is really weak on namespaces. It someone to know all the > namespaces and prefixes in advance of creating a StaX stream. That's not > very realistic for Aegis. > > Jettison doesn't write out the definition of namespaces for you. You tell > it that namespace X maps to prefix P, and it writes strings of the form > P.qqqq, and never writes a definition of P. > > I have danced around all of this by making the JAX-RS Aegis provider write > to DOM first, and then collect all the namespace prefixes, and then push it > to jettison. I have no idea how to make the read side work consistently in > any non-brittle way. Given that any sort of object, in any package, could > turn up as a subclass, there's just no way to know what all the namespaces > will be in advance. More to the point, when reading, seeing 'ns3.bloop', > there's no way to tell what namespace should go with ns3. Very simple cases > work where there's only one namespace. > > This might be addressed by prefixing an actual namespace map, and reading > it. Alternatively, we could use a completely different scheme for handling > namespaces than Jettison. Instead of adding prefixes to the element names, > put them all in attributes (say, well, 'xmlns' attributes, by URI). Then we > wouldn't lose any information. > > It could be argued that this combination is just a really bad idea. If you > want JSON, you want a binding that can do unqualified elements. And if the > DOSGi gang wants to avoid JAX-B that badly, perhaps someone from in there > would like to add unqualified support to Aegis? > -- Daniel Kulp dkulp@apache.org http://www.dankulp.com/blog