0

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.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..

laxmi
  • 107
  • 5

1 Answers1

0

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

Dónal
  • 185,044
  • 174
  • 569
  • 824
  • :Book is a domain class..when i call same service method from controller action save works but client requests service directly as webservice then its not!! – laxmi Aug 16 '11 at 10:53
  • When i use it as webservice with xfire then its not working.i think i am missing something with using xfire for web service. – laxmi Aug 16 '11 at 10:55