atom feed14 messages in org.codehaus.grails.userRe: [grails-user] Re: WSClient / Groo...
FromSent OnAttachments
Chris C.Jul 16, 2010 6:35 am 
Marco PasJul 16, 2010 7:34 am 
Sébastien LaunayJul 16, 2010 9:57 am 
Ronny LøvtangenJul 16, 2010 3:12 pm 
Chris C.Jul 19, 2010 8:28 am 
Ronny LøvtangenJul 19, 2010 8:39 am 
Chris C.Jul 19, 2010 9:11 am 
Ronny LøvtangenJul 19, 2010 11:08 am 
Jonathan StottJul 19, 2010 12:07 pm 
Chris C.Jul 19, 2010 12:50 pm 
Ronny LøvtangenJul 19, 2010 1:01 pm 
Jonathan StottJul 19, 2010 1:08 pm 
Ronny LøvtangenJul 19, 2010 2:37 pm 
Chris C.Jul 20, 2010 7:43 am 
Subject:Re: [grails-user] Re: WSClient / GroovyWS - can't get them to work for SOAP-based WS!
From:Jonathan Stott (jona@axonuk.com)
Date:Jul 19, 2010 1:08:08 pm
List:org.codehaus.grails.user

Chris,

I totally agree, it took ages to get it to work. The documentation out there on the web is quite frankly awful - if I have time I would write better docs but I am so overwhelmed with work at the moment that won't happen any time soon.

We are using J2SE 6.0 and have tested our SOAP stuff in Grails 1.3.1 and 1.3.2. I didn't do anything at all with poms or set pom true.

When you add the groovyws dependencies on the client it will download shedloads of jars. If it didn't do this, then you might have missed out uncommenting the mavenRepos. We have uncommented the mavenCetral and Codehaus repos:

mavenCentral() mavenRepo "http://repository.codehaus.org"

Client code is pretty much just this:

import groovyx.net.ws.WSClient ... WSClient wsc = new WSClient("http://www.example.com/xxx/services/xxx?wsdl", this.class.classLoader) wsc.initialize() def ret = wsClient().getSomething(arg)

Then on the server I just have:

class XxxService { static expose = ['cxf'] ... XxxDto getSomething(arg) { return new XxxDto(val: arg * 2) } }

And then used the XxxDto to transfer the result:

import javax.xml.bind.annotation.XmlAccessType import javax.xml.bind.annotation.XmlAccessorType @XmlAccessorType(XmlAccessType.FIELD) class XxxDto { Integer val }

Hope this helps!

Jonathan

On 19 July 2010 20:50, Chris C. <chri@rogers.com> wrote:

This is beyond frustrating now...  I've got a deadline of tomorrow morning to figure this out, or we ditch grails completely.  I tried adding the dependencies {} bit to the BuildConfig.groovy of a clean project, but it made no difference.  It still gets a compile error.

I really appreciate all of the help being offered, unfortunately, bits and pieces just aren't cutting it for me.  I've never felt this stupid in my life before!  Does anyone have a "basic Grails + Maven + SOAP consuming application skeleton for Dummies" with every include, dependancy etc. spelled out?

Jonathon, did you add groovyws as a maven dependency?  What version of the JDK are you using?  What version of Grails?  or Maven?  Did you also have to do the pom dependency entries specified in a previous reply?  What about the "pom true" setting in the BuildConfig.groovy -- do you use that?

There's enough people posting that this is possible that I believe it. However, I've spent FIVE DAYS trying to get this thing to work and it's just one issue after another.  I don't have the patience to figure out all of the dependencies and my architect figures that if there are that many dependancy issues, it's probably not suitable for anything close to a mission critical application anyway.

Thanks again for the replies, but short of a step-by-step guide, I think I'm done here.