Forum Stats

  • 3,770,683 Users
  • 2,253,153 Discussions
  • 7,875,539 Comments

Discussions

UCM File operation error

vini.warde
vini.warde Member Posts: 9
edited Jan 5, 2018 9:54AM in HCM Cloud Service

Hi all,

I have to to upload my .dat file to webcenter content server:

I am implementing this using RIDC.

While implementing the code getting below error:

oracle.stellent.ridc.IdcClientException: No provider registered for protocol   https

Can someone will help me why I am getting this error.

Below is my code:

import java.util.ArrayList;

import java.util.List;

import java.util.Map;

import oracle.ucm.client.DownloadTool;

import oracle.ucm.client.DownloadTool.DownloadResult;

import oracle.ucm.client.SearchTool;

import oracle.ucm.client.SearchTool.SearchResult;

import oracle.ucm.client.SearchTool.SearchResults;

import oracle.ucm.client.UploadTool;

import oracle.ucm.client.UploadTool.UploadResults;

import oracle.ucm.client.bulk.UploadException;

import oracle.ucm.client.model.response.CheckinResponse;

import oracle.ucm.client.utils.ProgramOptionsProcessor;

/**

* WebCenter Content RIDC-based Transfer Tools

* Programmatic Invocation Test

*/

public class RidcToolTest

{

public static void main(String[] args)

{

List<String> coreArgs = new ArrayList<String>();

coreArgs.add("url=  https://hdnz-test.fs.us6.oraclecloud.com/cs/idcplg");

coreArgs.add("username=username");

coreArgs.add("password=password");

coreArgs.add("silent=true"); // minimal log output

// coreArgs.add("verbose=true"); // verbose log output

List<String> argsList = null;

argsList = new ArrayList<String>();

argsList.addAll(coreArgs);

argsList.add("tool.accountrequired=false");

argsList.add("dSecurityGroup=Public");

argsList.add("directory=/C:/Users/clover/Desktop/AxisBank/TimeRecordGroup");

argsList.add("threads=1");

argsList.add("throwOnThreadException=false"); // run() will not throw an exception should a thread error

String[] uploadArgs = argsList.toArray(new String[0]);

argsList = new ArrayList<String>();

argsList.addAll(coreArgs);

argsList.add("QueryText=dSecurityGroup = `'Public'`"); // explicit query

argsList.add("SortField=dID");

argsList.add("SortOrder=DESC");

argsList.add("ResultCount=1"); // Maximum number of search results to return.

String[] searchArgs = argsList.toArray(new String[0]);

argsList = new ArrayList<String>();

argsList.addAll(coreArgs);

argsList.add("md5Only=true"); // Return an MD5 message-digest of the downloaded stream as a 32 digit hexadecimal

argsList.add("md5lowercase=true"); // Return MD5 message-digest in lower-case

String[] downloadArgs = argsList.toArray(new String[0]);

try

{

UploadTool uploadTool = new UploadTool();

SearchTool searchTool = new SearchTool();

DownloadTool downloadTool = new DownloadTool();

try

{

// Setup the tool's initial configuration from the supplied arguments.

boolean terminateEarly = uploadTool.setup(uploadArgs);

if (terminateEarly)

{

return;

}

// Setup the tool's initial configuration from the supplied arguments.

terminateEarly = searchTool.setup(searchArgs);

if (terminateEarly)

{

return;

}

// Setup the tool's initial configuration from the supplied arguments.

terminateEarly = downloadTool.setup(downloadArgs);

if (terminateEarly)

{

return;

}

UploadResults uploadResults = uploadTool.run();

if (uploadResults != null)

{

Map<Integer, Exception> failedCheckins = uploadResults.getAllFailedCheckinsKeyedByTaskNum();

Map<Integer, UploadException> failedCheckinsDetailed = uploadResults.getFailedCheckinsKeyedByTaskNum();

for (Map.Entry<Integer, Exception> entry : failedCheckins.entrySet())

{

if (failedCheckinsDetailed.containsKey(entry.getKey()))

{

UploadException e = failedCheckinsDetailed.get(entry.getKey());

System.out.println("Checkin with task number " + e.getTaskNumber() + " and identifier "

+ e.getIdentifier() + " failed with message " + e.getMessage());

}

else

{

System.out.println("Checkin with task number " + entry.getKey() + " failed with message "

+ entry.getValue().getMessage());

}

}

Map<Integer, CheckinResponse> successfulCheckins = uploadResults.getSuccessfulCheckinsKeyedByTaskNum();

for (Map.Entry<Integer, CheckinResponse> entry : successfulCheckins.entrySet())

{

CheckinResponse response = entry.getValue();

System.out.println("Checkin with task number " + response.getTaskNumber() + " and identifier "

+ response.getIdentifier() + " succeeded. dID=" + response.getDId());

}

}

SearchResults searchResults = searchTool.run();

if (searchResults != null)

{

for (SearchResult searchResult : searchResults.getResults())

{

String dID = searchResult.getDID();

String dOriginalName = searchResult.getDOriginalName();

System.out.println("\n" + "Obtaining MD5 of Search Result with dID " + dID + " and original filename "

+ dOriginalName + " ...");

ProgramOptionsProcessor processor = downloadTool.getOptionsProcessor();

processor.put("dID", dID);

DownloadResult downloadResult = downloadTool.run();

System.out.println("... MD5 " + downloadResult.getMd5() + " - total bytes read "

+ downloadResult.getBytesRead());

}

}

}

catch (Exception e)

{

                            e.printStackTrace();

throw e;

}

finally

{

uploadTool.logout();

downloadTool.logout();

searchTool.logout();

}

System.exit(0);

}

catch (Exception e)

{

                    e.printStackTrace();

                    System.out.println("Excption is>>>>>>>"+e);

System.exit(1);

}

}

}

Tagged:

Answers

  • User_WJUWB
    User_WJUWB Member Posts: 2 Red Ribbon
    edited Oct 18, 2017 7:20AM

    Hi Vini,

    Your AIM is to upload a file to UCM right ?

  • vini.warde
    vini.warde Member Posts: 9
    edited Nov 13, 2017 9:33AM

    yes i uploaded.

  • vini.warde
    vini.warde Member Posts: 9
    edited Jan 5, 2018 9:54AM

    Hi,

    I done with one part of HCM data loader through java.

    Now I have to doing Automating Payroll Batch Loader. While implementing this I stuck with one error. Can you help me out to resolve this issue.

    For Automating Payroll Batch Loader I am using FlowActionsService.

    Following is the WSDL I used in java program:

    https://hdnz-test.hcm.us6.oraclecloud.com:443/hcmProcFlowCoreController/FlowActionsService?WSDL

    I have implemented upload file part and I am getting Content ID. Now I need to call bellow methods:

    1. submitFlow

    2. performAction

    Below is my java code :

    List Content=new ArrayList();

    Content.add("Content Id");

    Content.add("UCMFA00066145");

    Content.add("Batch");

    Content.add("UCMFA00066145.27");

    Content.add("Transformation Formula");

    Content.add("");

    String filename="Bank"+xmlgc;

    List files=new ArrayList();

    files.add("test");

    files.add("test");

    //response = hcmLoaderService.submitFlow(null, null, null, null, null, null, contentId, null, true, null);

    response = hcmLoaderService.submitFlow("Load Batch from File", Content, "UCMFA00066145.27", "IN", files, "Batch Loader", "test", null, false, null);

    But I am getting following error.

    Is I am doing any mistake while passing the parameters.

    Thanks in advance.

This discussion has been closed.