Return-Path: Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: (qmail 87978 invoked from network); 28 May 2008 19:30:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 May 2008 19:30:40 -0000 Received: (qmail 23623 invoked by uid 500); 28 May 2008 19:30:42 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 23608 invoked by uid 500); 28 May 2008 19:30:42 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 23596 invoked by uid 99); 28 May 2008 19:30:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 May 2008 12:30:42 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [66.249.82.239] (HELO wx-out-0506.google.com) (66.249.82.239) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 May 2008 19:29:52 +0000 Received: by wx-out-0506.google.com with SMTP id i31so2373452wxd.28 for ; Wed, 28 May 2008 12:30:07 -0700 (PDT) Received: by 10.90.114.19 with SMTP id m19mr3948408agc.91.1212003007269; Wed, 28 May 2008 12:30:07 -0700 (PDT) Received: from ?172.21.21.118? ( [98.193.244.253]) by mx.google.com with ESMTPS id 20sm7424189agb.12.2008.05.28.12.30.05 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 28 May 2008 12:30:06 -0700 (PDT) Message-Id: <1713B7B4-03C6-45F1-A0B6-BBF445FE0D15@campgroundautomation.com> From: Jon Sharp To: user@cayenne.apache.org In-Reply-To: <42EEFC17-762A-4170-BB57-A4898AF48F31@objectstyle.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Subject: Re: Cayenne and JAX-WS / JAXB Date: Wed, 28 May 2008 14:30:04 -0500 References: <0DBF57F9-8995-4061-8BBB-F389B32656C6@campgroundautomation.com> <42EEFC17-762A-4170-BB57-A4898AF48F31@objectstyle.org> X-Mailer: Apple Mail (2.919.2) X-Virus-Checked: Checked by ClamAV on apache.org Andrus, Thanks for the input. I've been playing around with this annotations approach, but it seems I'm going to have to get into the cayenne source a bit more than I expected. It looks like I'll need to annotate the Interfaces themselves (DataObject). I've checked out the latest Cayenne trunk, but have had some trouble with it. I'll see if I can't find a milestone to work from. In the meantime, as I see it, this may be a real benefit to Cayenne to allow for XML serialization of Cayenne data objects using JAXB. I imagine this would be a popular feature for many, whether implementing web services or not. If I'm going to put resources on this on our end, I'd certainly be interested in feeding these changes into Cayenne proper. What do you guys think? Is this as good a solution as I think it might be? I'd love to hear any input on this. And perhaps the dev list is a more appropriate place for this discussion. Thanks again, Jon -- Jon Sharp CTO & Senior Engineer Campground Automation Systems, Inc. jon@campgroundautomation.com (615) 579-5868 www.campgroundautomation.com On May 27, 2008, at 3:01 AM, Andrus Adamchik wrote: > I never used JAXB, although I evaluated it briefly in the past. With > everyone gradually moving to Java 6, it probably warrants a closer > looks from us in Cayenne. More to the point, I think the annotations > approach should work, but that will require some experimentation. So > try it, and let us know if you run into any troubles. > > Andrus > > > On May 27, 2008, at 2:51 AM, Jon Sharp wrote: >> Hello all, >> >> We are using Cayenne 3.0M3 for ORM in our project and are exposing >> this database using SOAP Web Services. We're using the latest Sun >> Metro stack (1.2), consisting of the JAX-WS and JAXB frameworks. >> In attempting to use Cayenne Data objects as either return types or >> method parameters for our defined @WebMethod's, we are greeted with >> an error that indicates JAXB does not handle interfaces. For those >> who may not be familiar with JAX-WS/JAXB, JAXB is responsible for >> marshalling java objects into XML, and this is of course necessary >> for use in SOAP web services provided by the JAX-WS framework. >> According to https://jaxb.dev.java.net/guide/ >> Mapping_interfaces.html, there are some solutions for this issue, >> but it appears that it may involve code changes to Cayenne. I'm >> not a Cayenne developer, so I cannot say how feasible or practical >> this approach may be. Perhaps someone could comment on that, but >> more important to me at this point is determining whether anyone >> has been successful in marshalling cayenne data objects to XML >> using JAXB? >> >> Thanks, >> Jon >> >> -- >> Jon Sharp >> CTO & Senior Engineer >> Campground Automation Systems, Inc. >> jon@campgroundautomation.com >> (615) 579-5868 >> www.campgroundautomation.com >> >> >> >> >> >