Thank you Andrea! I misled myself with some old docs.

Its straight forward:

def http = new HTTPBuilder("http://127.0.0.1:8080";)

//providing authentication if neccessary
http.auth.basic 'admin','geoserver'

//building and sending the WFS-Request
http.headers.'Content-Type'="application/xml; charset=UTF-8"
http.headers.'Accept-Encoding'= 'gzip,deflate'
String xmlString = new StreamingMarkupBuilder().bind(){mkp.yield
request.XML}
def wfsResponse = http.post(path:'/geoserver/wfs',body:xmlString)

//dealing with response
def featureCollection = new StreamingMarkupBuilder().bind(){mkp.yield
wfsResponse}
render featureCollection.toString()

Regards
Sven

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to