Reply to comment

Grail Newbie, learning alot

Grail Newbie, learning alot but I found groovyws great and easy to use, even for nested elements! Not sure if something has been fixed since this but wrapping the call in a service works (for me).

import groovyx.net.ws.WSClient

class UserService {

def proxy

def initialize(){
if (proxy == null) {
proxy = new WSClient("http://whateverserver.com/api/services/TestWebService?wsdl", this.class.classLoader)
proxy.initialize()
}
}
def test() {
initialize()
def x = proxy.create("...")
....
}

Speed is quite good after initial call to generate the classes... if can't use grails service, use the singleton pattern. Replied here since I had the same problem and your blog came up at the top

Reply

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options