Hi,
I am new to JAXB, JAX-WS, JAX-RS and Apache CXF as well. Still I have been
able to successfully publish a service of mine as web services and RESTful
web service using CXF. Amazing.
My approach was having my Java service designed first and annotated my
classes with JAXB and let the WSDL generated by CXF.
@GET
@Produces({MediaType.APPLICATION_XML,MediaType.TEXT_XML,MediaType.TEXT_HTML})
@Path("listProducts")
public List<Product> listProducts() {...
That works quite well and gets me the XML I wanted:
<products>
<product id="1658" digitalId="5099972936955" title="Les lépidoptères"
displayArtist="Jean-Louis Aubert">
<availabilities>
<availability territoryCode="GB" product="1658"
streamingDate="2011-05-07T00:00:00+01:00"
salesStartDate="2011-05-02T00:00:00+01:00">
<id>15350</id>
</availability>
<availability territoryCode="AE" product="1658"
streamingDate="2011-09-05T00:00:00+01:00"
salesStartDate="2011-10-03T00:00:00+01:00">
<id>15352</id>
</availability>
...
<availabilities>
<product id=...</product>
...
</products>
I am using Excel to get the data from this RESTful web service method and
display to the user. (Excel-Data-Get external data from Web). That is
because the user will be free to manipulate it further (filter, sort, chart,
etc.) However, Excel does some approximation on the data types and it does
not work correctly with every field. For example dates are imported as text
fields and if a field is comprised of digits then it is imported as a number
field. I definitely need an XSD to accompany the generated XML files.
I wonder if that schema can be generated automatically, either on the fly or
during build?
Thanks.
--
View this message in context:
http://cxf.547215.n5.nabble.com/style-sheet-tp5033048p5033048.html
Sent from the cxf-user mailing list archive at Nabble.com.