cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Heemskerk, Marcel \(M.\)" <Marcel.Heemsk...@uwv.nl>
Subject Flexible XSD / XML generator
Date Mon, 14 Jul 2008 14:23:33 GMT

We have the requirement for a web service to respond XML in a flexible
format (flexible XSD) and i am looking to see if i can use internal CXF
classes for this. 

The web service exposes a complex and very large database read-only. For
every consumer a database view is generated, based on priviledges to see
certain columns and rows.  Then, every service consumer can define how
the data should be represented in XML. For example, the relation Order
-> OrderLine -> Book can be represented as one XML tree with all three
objects or as two XML trees with Order-> OrderLine  and one with Books.
See examples below.

This means that the XSD and XML is flexible and different per consumer.
Over a hundred consumers exist.

The XSD/WSDL should generated and XML produced without restarting or
programming the application. 

Any suggestions to how to solve this with CXF ?

JAXB is out-of-question (because XSD generation is at developtime),
which XML binding framework is best suited for this? 





Simple one XML tree:


<Order>
	<OrderLine>
		<Book id="100">
			<Title>Hitchhikers Guide</Title>
		</Book>
		<Quantity>1</Quantity>
	</OrderLine>
	<OrderLine>
		<Book id="200">
			<Title>CXF Guide</Title>
		</Book>
		<Quantity>2</Quantity>
	</OrderLine>
</Order>

Or as two XML trees like this:


<Order>
	<OrderLine>
		<BookId>100</BookId>
		<Quantity>1</Quantity>
	</OrderLine>
	<OrderLine>
		<BookId>200</BookId>
		<Quantity>2</Quantity>
	</OrderLine>
</Order>
<Books>
		<Book id="100">
			<Title>Hitchhikers Guide</Title>
		</Book>
				<Book id="200">
			<Title>CXF Guide</Title>
		</Book>
</Books>





Met vriendelijke groet,
Marcel Heemskerk
Software Architect Polis+ Webservices


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