Apologies in advance for those of you also on Grails mail list.
I'm trying to use webtest to test a REST interface but grails is telling me
my xml is wrong
org.xml.sax.SAXParseException: Premature end of file.
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
webtest code is:
def SMALL_XML = '''
<start>stuff</start>
'''
def testUpdate() {
webtest('RestTest basic operations: update get status etc') {
invoke (url: 'restTest/addProject', method: 'POST',
content: SMALL_XML)
}
}
The controller code is
def addProject = {
RestPostLog rpl = new RestPostLog(status: PostLogStatus.queued)
println "request: ${request.inspect()}"
blockingQueueService.add([id: rpl.id, data: request.XML]) }
and the problem happens on the line where request.XML is called
--
View this message in context:
http://www.nabble.com/testing-REST-service-tp14373977p14373977.html
Sent from the WebTest mailing list archive at Nabble.com.
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest