You can find the source code in an appendix of the WFM guide (on Datasources). IWOV never officially provided it as part of the UITK -- now you just have to compile it yourself.
use the CSJavaFactory to get the client. You have examples on how to do that in the javadoc for the cssdk
you should be able to find the cssdk docs under iw-home/cssdk/docs/cssdk_doc.jaryou can also find sample code that is using the CSJavaFactory under iw-home/cssdk/samples/java/dev/src
try { String serviceBaseURL = "http://teamsite:6060/iw/services/cm/2.0/accessservice"; String accessBaseURL = "http://teamsite:6060"; Properties properties = new Properties(); properties.setProperty("com.interwoven.cssdk.factory.CSFactory", "com.interwoven.cssdk.factory.CSSOAPFactory"); properties.setProperty("serviceBaseURL", serviceBaseURL); properties.setProperty("accessBaseURL", accessBaseURL); // using SOAP CSFactory csFactory = CSFactory.getFactory(properties); CSClient client = csFactory.getClient("username", "", "password", Locale.getDefault(), "JavaTSClient", serviceBaseURL); } catch (CSFactoryInitializationException e) { logger.error("ERROR connecting to teamsite...\nCSFactoryInitializationException: " + e.getMessage()); e.printStackTrace(); } catch (CSConfigException e) { logger.error("ERROR connecting to teamsite...\nCSConfigException: " + e.getMessage()); e.printStackTrace(); } catch (Exception e) { logger.error("ERROR connecting to teamsite: " + e.getMessage()); e.printStackTrace(); }
try this, i used this in 6.7.2 and never tried it in 7.x but you should be able to troubleshoot it. try { String serviceBaseURL = "http://teamsite:6060/iw/services/cm/2.0/accessservice"; String accessBaseURL = "http://teamsite:6060"; Properties properties = new Properties(); properties.setProperty("com.interwoven.cssdk.factory.CSFactory", "com.interwoven.cssdk.factory.CSSOAPFactory"); properties.setProperty("serviceBaseURL", serviceBaseURL); properties.setProperty("accessBaseURL", accessBaseURL); // using SOAP CSFactory csFactory = CSFactory.getFactory(properties); CSClient client = csFactory.getClient("username", "", "password", Locale.getDefault(), "JavaTSClient", serviceBaseURL); } catch (CSFactoryInitializationException e) { logger.error("ERROR connecting to teamsite...\nCSFactoryInitializationException: " + e.getMessage()); e.printStackTrace(); } catch (CSConfigException e) { logger.error("ERROR connecting to teamsite...\nCSConfigException: " + e.getMessage()); e.printStackTrace(); } catch (Exception e) { logger.error("ERROR connecting to teamsite: " + e.getMessage()); e.printStackTrace(); }
package com.autonomy.interwoven.cso.workflow.urltask;import java.util.Locale;import java.util.Properties;import com.interwoven.cssdk.common.CSClient;import com.interwoven.cssdk.factory.CSConfigException;import com.interwoven.cssdk.factory.CSFactoryInitializationException;import com.interwoven.cssdk.factory.CSJavaFactory;public class testGetCSClient { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub try { String configFilePath = "sample.properties"; Properties properties = new Properties(); properties.setProperty("cssdk.cfg.path", configFilePath); CSJavaFactory csFactory = (CSJavaFactory) CSJavaFactory.getFactory(properties); if(csFactory != null){ CSClient client = csFactory.getClient("root","root","mypass", Locale.getDefault(),"TeamSite","TS_Server_IP"); if(client == null){ System.out.println("you suck!"); }else{ System.out.println("Client: " + client.toString()); } }else{ System.out.println("you failed!"); } } catch (CSFactoryInitializationException e) { System.out.println("ERROR connecting to teamsite...\nCSFactoryInitializationException: " + e.getMessage()); e.printStackTrace(); } catch (CSConfigException e) { System.out.println("ERROR connecting to teamsite...\nCSConfigException: " + e.getMessage()); e.printStackTrace(); } catch (Exception e) { System.out.println("ERROR connecting to teamsite: " + e.getMessage()); e.printStackTrace(); } }}
serviceBaseURL=http://TS_Server_IP:6060/iw/services/cm/2.0/accessservicecom.interwoven.cssdk.factory.CSFactory=com.interwoven.cssdk.factory.CSJavaFactoryts.server.os=lints.server.endian=little
ahh Sorry I thought you have some java experience. that error should be fixed by replacing all logger.error( with System.out.println(.
I have some, but i guess i wasn't thinking, with changes made. I get the real problem , I have problem connecting to TeamSite server.here is the error message.ERROR connecting to teamsite: java.net.ConnectException: Connection refused: connectcom.interwoven.cssdk.common.CSException: (java.net.ConnectException: Connection refused: connect) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ...com.interwoven.cssdk.factory.CSFactory.getFactory(CSFactory.java:118) at cssdk1.CSHelloWorld.main(CSHelloWorld.java:44)Thanks
This sort of error processing is questionable, to put it mildly. Some flavor of logging like inyour original sample feels much safer.With STDOUT approach Errors will become all but invisible if the Class is used in a DataSource.It *may* break if used in URL Task. It will break CGI output if used for CGI coding (Task or GUI), etc...