cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Liu, Jervis" <>
Subject RE: Good way to return a RowSet from a service?
Date Fri, 03 Aug 2007 03:53:34 GMT
It looks like you are trying to do some kind of Database Web services. I am afraid in the world
of Database web services, you would never want to return RowSet directly because RowSet object
is too complex/big to be mapped to XML, not to mention other concerns like performance etc.
Many database vendors and web services framework vendors have done a lot in the Database web
services area. There are two most common approaches. One is you map JDBC types to XML types
(and vice versa) either by an O/R mapping framework (like Hibernate) or by yourself. Take
an example, if you have a SQL statement "SELECT employee_name from employee where employee_id=?",
this can be mapped to an operation in your WSDL, and the corresponding java operation is String
getEmployeeName(String employeeID). When a request coming said I want to invoke getEmployeeName
with a string parameter, the web service stack will first dispatch the incoming SOAP message
to getEmployeeName(String employeeID) method, then the DB web service code (you write this
piece of code or it is a functionality provided by DB web service vendor) maps employeeID
to JDBC type then invoke the SQL of  "SELECT employee_name from employee where employee_id=?".
 Of course this is just a version simplified for the purpose illustration, the real process
can be more complex.

Another approach is to utilize the XML database or XML interface provided on top of traditional
database. Now that the output of database is already in XML format, it is just a simple matter
how you expose certain DB queries appropriately as web services and how you organize the result
and return it back. This is indeed a very interesting topic, especially when this offering
is combined with REST. Think about it this way, database in its nature, is a resource repository.
All these SQL queries do is to navigate among resources (i.e., tables, columns.). This is
exactly what REST is. I am personally very interested in this topic and would like to see
how we can explore this potential using CXF REST support. Sth similar to what Microsoft Astoria
is done [1]. If you have any comments or suggestions, I would be very happy to hear from you.

Let me know if this answered your question.

[1].  <>


-----Original Message-----
From: Glen Mazza []
Sent: 2007?8?3? 10:39
Subject: Re: Good way to return a RowSet from a service?

Mark Hansen's pretty-good-if-tad-bit-pricey SOA book
( covers XmlAdapters in a fair amount of detail
on p.245-256, although I'm not certain it would solve the user's problem


Am Donnerstag, den 02.08.2007, 12:54 -0400 schrieb Daniel Kulp:
> This is actually an "interesting" question that's been on my "todo" list
> to investigate for ages.  It relates to things like HashMaps and such.
> The JAXB Javadoc describes some stuff about XmlAdapters:
> that supposedly could be used to map non-jaxb objects into objects that
> JAXB can understand.   That javadoc describes a sample thing for
> HashMaps, but I haven't actually tried doing it to see how it would work
> or how to integrate it into CXF.
> Dan
> On Tuesday 31 July 2007 23:34, Jeremy Isikoff wrote:
> > Hi all, I'm trying to return a RowSet (data and schema info) from a
> > cxf webservice. I tried returning instances of CachedRowSetImpl or
> > WebRowSetImpl directly but they both cause stack overflows when
> > deploying to tomcat. Is there some better way to do this or do I have
> > write my own class?
> >
> >
> > java.lang.StackOverflowError
> > at java.lang.Class.privateGetDeclaredFields(
> > at java.lang.Class.getDeclaredFields(
> > at
> > org.apache.cxf.jaxb.JAXBContextInitializer.addClass(JAXBContextInitial
> > at
> > org.apache.cxf.jaxb.JAXBContextInitializer.addClass(JAXBContextInitial
> > at org.apache.cxf.jaxb.JAXBContextInitializer.a
> >
> >
> >
> > ______________________________________________________________________
> >______________ Looking for a deal? Find great prices on flights and
> > hotels with Yahoo! FareChase.

IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message