Hi
I am using the dynamic client as describe in the book Apache CXF Web Service
Development and got the following problem when invoking the method.
Here is a snapshot of the code ...
JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance()
Client client = dcf.createClient("
https://myabell.net:443/webservicepublic.asmx?WSDL")
Object getInfo =
Thread.currentThread().getContextClassLoader().loadClass("net.myabell.GetInfoContentFromProduct").newInstance()
Method m1 = getInfo.getClass().getMethod("setProductID" , String.class)
Method m2 = getInfo.getClass().getMethod("setType" , String.class)
Method m3 = getInfo.getClass().getMethod("setLanguageID", String.class)
Method m4 = getInfo.getClass().getMethod("setLocale" , String.class)
m1.invoke(getInfo, "10")
m2.invoke(getInfo, "0")
m3.invoke(getInfo, "2")
m4.invoke(getInfo, "en-gb")
// This is not working
//Object[] response = client.invoke("GetInfoContentFromProduct", getInfo)
// This is working
Object[] response = client.invoke("GetInfoContentFromProduct", "10", "0",
"2", "en-gb")
println "Response is ${response[0]}"
It actually seems that the invocation has to be made not using the object
initialized by reflection (is that called wrapped mode? ) (as stated in the
book).
Is there a way to diagrammatically determine which is type of call has to be
used ?
Guillaume