Yes
It seems that the bytecodes generated by loading a precompiled script of by
evaluation of a script are different. The later having a
class.metaclass.astNode being non null.
But I don't know the role of the astNode at this point. May be a groovy
expert can comment on this difference ? I will be happy to learn ;-)
Beside this point, it seems that you are not able to control the
serialization process from the XFire client side (using Aegis xml file for
example). So for example if you have a Book instance coming from a Book
groovy script, you will not be able to remove the metaclass property when
calling addBook(book) and you will the get the problem you noticed.
But I may have missed some point here ? May be there is a way to control the
serialization process ?
Any idea XFire folks ?
Cheers
Guillaume
On 2/6/07, Audry Chanel <[EMAIL PROTECTED]> wrote:
Hi,
I am trying to use GroovySOAP to use webservices with complex types :
import groovy.net.soap.SoapClient
def proxy = new SoapClient("
http://localhost:6981/BookServiceImplInterface?wsdl")
Book book = new Book(title:"Groovy in Action", author:"Dierk", isbn:"123")
proxy.addBook( book )
Book.groovy :
class Book {
String author
String title
String isbn
}
groovySOAP registers the types with a xfire TypeMapping : the registered
class is here book.getClass().
it works fine with already compiled classes (if Book.class is in my
classpath) but with only Book.groovy I get :
org.codehaus.xfire.fault.XFireFault: Couldn't get property
{http://ast.groovy.codehaus.org}typeClass<http://ast.groovy.codehaus.org%7dtypeclass/>from
bean
[EMAIL PROTECTED]: Book].
what is this ClassNode and why is the result different when I use
Book.groovy instead of Book.class ??? (why does Xfire try to register a
ClassNode instead ok a Book ?)
Cheers,