|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
groovyws and grailsHello everyone,
I'm a little stuck. I try expose a service via WSServer (groovyws), but without any success or an good idea how to do it (I'm quiet new to grails). So, when I try something like this ---------- import org.springframework.beans.factory.InitializingBean import groovyx.net.ws.WSServer class TestService implements InitializingBean { def server void afterPropertiesSet() { server = new WSServer() server.setNode("TestService", "http://localhost:8080/invocare_server/services/TestService") } def doStuff(def number) { return number + 2 } } ---------- a ClassNotFound-Exception is thrown ---------- 2008-07-22 11:00:59.585::WARN: Failed startup of context org.mortbay.jetty.webapp.WebAppContext@3de71c{/invocare_server,/home/finn/IdeaProjects/invocare_server/web-app} org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'testService': Cannot create inner bean '(inner bean)' while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#2': Invocation of init method failed; nested exception is java.lang.ClassNotFoundException: TestService Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#2': Invocation of init method failed; nested exception is java.lang.ClassNotFoundException: TestService Caused by: java.lang.ClassNotFoundException: TestService at java.net.URLClassLoader$1.run(URLClassLoader.java:200) ---------- Greetings Finn --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: groovyws and grailsTo create webservices via grails try using the xfire plugin (http://www.grails.org/XFire+plugin)
Cheers! On Tue, Jul 22, 2008 at 6:08 AM, Finn Herpich <finn.herpich@...> wrote: Hello everyone, -- Fernando "Takai" http://flickr.com/photos/supeertakai http://fernandotakai.tumblr.com/ http://twitter.com/fernando_takai |
|
|
Re: groovyws and grailsThanks so far =)
It seems to work, but I'm a little bit messed up with sending an array of custom objects. E.g. def leads = proxy.getAllLeads() leads is now an ArrayOfLead The only way that I figured out to access the properties is something like leads.lead[0].id.value (It's ugly but working) So, is there a more elegant way to work with those objects? Finn On Tuesday 22 July 2008 12:25:39 Fernando Takai wrote: > To create webservices via grails try using the xfire plugin ( > http://www.grails.org/XFire+plugin) > > Cheers! > > On Tue, Jul 22, 2008 at 6:08 AM, Finn Herpich < > > finn.herpich@...> wrote: > > Hello everyone, > > > > I'm a little stuck. I try expose a service via WSServer (groovyws), but > > without any success or an good idea how to do it (I'm quiet new to > > grails). > > > > So, when I try something like this > > ---------- > > import org.springframework.beans.factory.InitializingBean > > import groovyx.net.ws.WSServer > > > > class TestService implements InitializingBean { > > > > def server > > > > void afterPropertiesSet() { > > server = new WSServer() > > > > > > server.setNode("TestService", " > > http://localhost:8080/invocare_server/services/TestService") > > } > > > > def doStuff(def number) { > > return number + 2 > > } > > } > > ---------- > > > > a ClassNotFound-Exception is thrown > > ---------- > > 2008-07-22 11:00:59.585::WARN: Failed startup of context > > org.mortbay.jetty.webapp.WebAppContext@3de71c > > {/invocare_server,/home/finn/IdeaProjects/invocare_server/web-app} > > org.springframework.beans.factory.BeanCreationException: Error creating > > bean > > with name 'testService': Cannot create inner bean '(inner bean)' while > > setting bean property 'target'; nested exception is > > org.springframework.beans.factory.BeanCreationException: Error creating > > bean > > with name '(inner bean)#2': Invocation of init method failed; nested > > exception is java.lang.ClassNotFoundException: TestService > > Caused by: org.springframework.beans.factory.BeanCreationException: Error > > creating bean with name '(inner bean)#2': Invocation of init method > > failed; nested exception is java.lang.ClassNotFoundException: TestService > > Caused by: java.lang.ClassNotFoundException: TestService > > at java.net.URLClassLoader$1.run(URLClassLoader.java:200) > > ---------- > > > > Greetings > > Finn > > > > --------------------------------------------------------------------- > > To unsubscribe from this list, please visit: > > > > http://xircles.codehaus.org/manage_email --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
| Free Forum Powered by Nabble | Forum Help |