views:

195

answers:

0

I am running a groovy program that zips up some files and then I need to send that file to an XFIRE web service - what is the best way to get this done? the file(s) could be 1-5 Megs at most

Thanks!

The following code code

byte[] data = new File(file).readBytes()

def getProxy(wsdl, classLoader) {
  new WSClient(wsdl, classLoader)
}

def proxy = getProxy("http://blabla.com:8080/wacko/services/wacko?wsdl", this.class.classLoader)
proxy.initialize()

result = proxy.saveConfig(data)

gives me this following error:

Jul 26, 2009 11:44:07 PM org.apache.cxf.phase.PhaseInterceptorChain doIntercept
INFO: Interceptor has thrown exception, unwinding now Could not send Message.
Jul 26, 2009 11:44:07 PM groovyx.net.ws.AbstractCXFWSClient invokeMethod
SEVERE: Could not invoke method.
org.apache.cxf.interceptor.Fault: Could not send Message.