Groovy MarkupBuilder causing java.lang.NoClassDefFoundError on closure in soapUI

Posted by Eric on Stack Overflow See other posts from Stack Overflow or by Eric
Published on 2010-06-01T17:40:46Z Indexed on 2010/06/01 17:43 UTC
Read the original article Hit count: 429

Filed under:
|
|

I am not able to get the Groovy MarkupBuilder to work with soapUI. I am very new to Groovy and I am just following one of the user guides on creating XML.

Testing a very simple method:

public String Example(){
def writer = new StringWriter()
def root = new MarkupBuilder(writer)
root.mkp.xmlDeclaration(version:"1.0", encoding:"UTF-8")
root.Root{
Example("A")
}
return writer.toString()
}

I get the following error in soapUI: ava.lang.NoClassDefFoundError: MockXML$_Example_closure2

I have no error when I run from Groovy Console.

In the same class I have: public String Hello(){ return "Hello" }

Which works fine in soapUI.

Is there something I would need setup/imported/configured in soapUI that I am not thinking about to handle MarkupBuilder/closures?

Thanks

© Stack Overflow or respective owner

Related posts about web-services

Related posts about groovy