while (read != -1)
{
read = isr.read(buf);
sw.write(buf);
}
throw new WiseConnectionException("Remote server's response is an error: " + sw.toString());
}
// saving file
File file = new File(wiseProperties.getProperty("wise.tmpDir"), new StringBuffer("Wise").append(IDGenerator.nextVal()).append(".xml").toString());
OutputStream fos = new BufferedOutputStream(new FileOutputStream(file));
IOUtils.copyStream(fos, is);
fos.close();
is.close();
filePath = file.getPath();
}
catch (WiseConnectionException wce)
{
throw wce;
}
catch (Exception e)
{
throw new WiseConnectionException("Wsdl download failed!", e);
}
return filePath;
}