Oops my example was a little off, it should be:

def client = DynamicClientFactory.newInstance().createClient(
 "http://www.esynaps.com/WebServices/WhoIsService.asmx?WSDL";);

def cl = Thread.currentThread().contextClassLoader
def who = cl.loadClass("org.tempuri.WhoIs").newInstance()
who.domainName = "envoisolutions.com";

def res = client.invoke("WhoIs", who)
println(res[0].whoIsResult);

- Dan

On 2/8/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

Author: dandiep
Date: Thu Feb  8 09:09:39 2007
New Revision: 504967

URL: http://svn.apache.org/viewvc?view=rev&rev=504967
Log:
Add "dynamic client" support. This will allow people with dynamic
languages
to ignore the wsdl to java step. Guillaume Alleon of Groovy SOAP has been
using this so we can do something like this:

def client = DynamicClientFactory.newInstance().createClient(
  "http://www.esynaps.com/WebServices/WhoIsService.asmx?WSDL";);

def cl = Thread.currentThread().contextClassLoader
def who = cl.loadClass("org.tempuri.WhoIs").newInstance()
who.domainName = "envoisolutions.com";

def res = client.invoke("WhoIs", "envoisolutions.com")

(Except the classloading stuff will be nicely hidden).

This is from Paul Brown in CXF-407. Thanks Paul!


--
Dan Diephouse
Envoi Solutions
http://envoisolutions.com | http://netzooid.com/blog

Reply via email to