I have a need to create DCRs from a remote java application. I have searched, but the samples I have found typically use JNI rather than SOAP. So, I've been attempting to work my way through using APIs, yet I'm coming up with a "No Archive Found" error with most file operations I attempt.
I have no idea what that error means: I know the server error code is 2005, but that's the most helpful information I could get from the doc I have. Here is the pertinent code snippet, where I attempt to grab an existing file and perform some operations on it:
Properties props = new Properties();
props.setProperty("com.interwoven.cssdk.factory.CSFactory","com.interwoven.cssdk.factory.CSSOAPFactory");
props.setProperty("serviceBaseURL", "
http://myserver:6060");
AxisFactory factory = (AxisFactory)CSFactory.getFactory(props);
CSClient client = factory.getClient("myuser", "", "mypassword", Locale.getDefault(), "test", "");
String target = "//myserver/default/main/www/products/WORKAREA/shared/templatedata/pressreleases/pressrelease/data/test_press_release.xml";
CSVPath targetPath = new CSVPath(target);
CSFile targetFile = client.getFile(targetPath);
//targetFile.rename("test.xml", true);
//targetFile.lock( "Locking the target file" );
//targetFile.delete();
System.out.println("targetFile owner: " + targetFile.getOwner());
System.out.println("targetFile kind: " + targetFile.getKind());
The commented-out lines all gave me the "No Archive Found" message when they were live. However, the getOwner and getKind methods return data that looks correct.
What am I doing wrong? One guess is that my port might not be correct, but I would expect that to throw an exception rather than giving me the CSClient object. Also, the getOwner data sure looks right. Any help would be appreciated.