1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
public boolean sendForGraphicalResultsExpression(String fileName1, String fileName2, String dirName, String savePath, int goLevel, Double threshold) throws FileNotFoundException, IOException, RemoteException {
// send a VSM and a Concept extraction file in order to retrieve a ZIP file containing an interactive similarity network
DataHandler ret = new DataHandler(new FileDataSource(localpath+"myres.txt"));
DataHandler dhVSM = new DataHandler(new FileDataSource(fileName1));
DataHandler dhCLUST = new DataHandler(new FileDataSource(fileName2));
DataHandler[] dhClustFiles = getDirAttachments(dirName);
File clustDir = new File(dirName);
String[] filenames = clustDir.list();
call.removeAllParameters();
call.setTargetEndpointAddress(endpointURL);
call.setOperationName(new QName(webService, "Build_GO_Graphical_Results_Expression"));
QName qnameAttachment = new QName(webService, "DataHandler");
call.registerTypeMapping(
dhVSM.getClass(),
qnameAttachment,
JAFDataHandlerSerializerFactory.class,
JAFDataHandlerDeserializerFactory.class);
call.addParameter("golevel", XMLType.XSD_INT, ParameterMode.IN);
call.addParameter("dhVSM", qnameAttachment, ParameterMode.IN);
call.addParameter("dhCLUST", qnameAttachment, ParameterMode.IN);
call.addParameter("dhClustFiles", XMLType.SOAP_ARRAY, ParameterMode.IN);
call.addParameter("filenames", XMLType.SOAP_ARRAY, ParameterMode.IN);
call.addParameter("threshold", XMLType.XSD_DOUBLE, ParameterMode.IN);
call.setReturnType(qnameAttachment);
ret = (DataHandler) call.invoke(new Object[] { goLevel, dhVSM, dhCLUST, dhClustFiles,filenames, threshold });
FileOutputStream archive = new FileOutputStream(savePath);
ret.writeTo(archive);
archive.close();
return true;
} |
Partager