From: Chris H. <ch...@op...> - 2005-09-05 16:08:28
|
Quoting Herman Le Roux <whl...@cs...>: > Hallo, > > I am trying to build a web alert service and need a bit of advice. > The service is based on information retrieved from a feature service. > To get the features/data I use geotools. I need some advice on how to > generate the XML responses when using the interface (eg HTTP POST > requests such as GetCapabilities etc). I think my options are: (1) > Generate the XML from scratch as pre-programmed text string responses > (2) Use geotools in some way with the GML plug-in (3) Use GML in some > way. (4) Use a Java XML reader/writer. I am building the service > using Java. Any advice would be appreciated. If you're using geotools to get the data and doing WAS, I'd highly recommend building on GeoServer - it can serve as a nice framework for ogc webservices - it gives you access to geotools, servlets, and struts if you desire. As for your options, Between 1 and 2 I'd insert use SAX production. This is how we do things in GeoServer, and it works pretty well, and is very fast. It works better than just writing out strings, since you don't have to worry about getting the tags wrong, you just have to remember to close things. To do this approach you extend org.geotools.xml.transform.TransformerBase. You can see a good example in geoserver, in org.vfny.geoserver.wms.responses.helpers.WMSCapsTransformer. Writing a caps document for WAS modeling after that should be pretty simple. We also currently use this method for returning GML in GeoServer. You also may check out XDO, which is the XML framework that the current GML code in GeoTools is based on. GeoServer will likely eventually move over, but we're not quite there yet. David should be able to give you more details, I can't find the homepage for it right now. This basically fits into (4), it used to be a part of GeoTools, but it's now split out into it's own project. best regards, Chris > > Thanks, > Herman > > > .............................................................................................................. > Herman le Roux M Eng > > Simulation Architect Lead > Systems, Modelling & Simulation > Defencetek CSIR > > WHl...@cs... > www.csir.co.za > > Tel : +27 (0)12 841 4867 > Fax : +27 (0)12 841 5025 (For Attention WH le Roux) > Mail : Office F104, Bld 44, PO Box 395, Pretoria 0001, South > Africa > .............................................................................................................. > > > > -- > This message is subject to the CSIR's copyright, terms and conditions > and > e-mail legal notice. Views expressed herein do not necessarily > represent the > views of the CSIR. > > CSIR E-mail Legal Notice > http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html > > CSIR Copyright, Terms and Conditions > http://mail.csir.co.za/CSIR_Copyright.html > > For electronic copies of the CSIR Copyright, Terms and Conditions and > the CSIR > Legal Notice send a blank message with REQUEST LEGAL in the subject > line to > Hel...@cs.... > > > This message has been scanned for viruses and dangerous content by > MailScanner, > and is believed to be clean. MailScanner thanks Transtec Computers > for their support. > ---------------------------------------------------------- This mail sent through IMP: https://webmail.limegroup.com/ |