Hi,

you mean that the problem is on the server side? Can you inspect the received content?

Cheers,
Marc.
--
Blog: http://mguillem.wordpress.com


tim pigden wrote:
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







_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to