Hi i am using xfire plugin in grails app,Belov is service written,
class HelloWorldService {
static expose=['xfire']
void addBook(String pName,String pAuthor) {
def b=new Book()
b.name=pName
b.author=pAuthor
println b.name
println b.author
if(!b.save())
{
b.errors.each { println it }
}
else
{
println "saved"
}
}
}
when client requests this addBook method with parameters, getting error as,
groovy开发者_StackOverflow社区.lang.MissingMethodException: No signature of method: patienthealthhistory.Book.save() is applicable for argument types: () values: []
why is it so?
PLz can anybody help me to solve this issue..Waiting for answer..
I'm assuming the error is occurring on this line
if(!b.save())
The only reason I can think of why the save()
method would be missing is that Book
is not a domain class
精彩评论