THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||||
---|---|---|---|---|
| ||||
URLClassLoader classLoader = ...; DynamicClientFactory dcf = DynamicClientFactory.newInstance(); Client client = dcf.createClient("people.wsdl", classLoader); //The context class loader has been reset by the dynamic client factory's create client code Object person = Thread.currentThread().getContextClassLoader().loadClass("com.acme.Person").newInstance(); Method m = person.getClass().getMethod("setName", String.class); m.invoke(person, "Joe Schmoe"); client.invoke("addPerson", person); |
NOTE: Use of the Dynamic compiler requires a full JDK to be available. It generates java code and calls off to "javac" to compile the code. Thus, the JDK needs to be available and javac on the PATH.
COMING SOON: Groovy Web Services support for dynamic clients so you don't need to use reflection!