Examples of Axis2RepoManagerClient


Examples of org.wso2.carbon.repomanager.axis2.ui.Axis2RepoManagerClient

        } else {
            // Retrieve the path to upload artifacts
            fileUploadDirName = formFieldsMap.get("dirName").get(0);
        }

        Axis2RepoManagerClient repoManagerClient =
                new Axis2RepoManagerClient(configurationContext, serverURL, cookie);
        String msg;
       
        List<Axis2ArtifactUploadData> uploadDataList = new ArrayList<Axis2ArtifactUploadData>();
        try {
            for (FileItemData fileItemData : fileItemDataArray) {
                String filename = getFileName(fileItemData.getFileItem().getName());
                checkServiceFileExtensionValidity(filename, ALLOWED_FILE_EXTENSIONS);

                if (!filename.endsWith(".jar")) {
                    throw new CarbonException("File with extension " + filename + " is not supported!");
                }

                Axis2ArtifactUploadData uploadData = new Axis2ArtifactUploadData();
                uploadData.setFileName(filename);
                uploadData.setDataHandler(fileItemData.getDataHandler());
                uploadDataList.add(uploadData);
            }

            repoManagerClient.
                    uploadArtifacts(uploadDataList.toArray(new Axis2ArtifactUploadData[uploadDataList.size()]),
                                    fileUploadDirName);

            request.getSession().setAttribute("uploadStatus", "successful");
            //response.setContentType("text/html; charset=utf-8");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.