package openD import com businessobjects ras21 clientsdk serialization

 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
package openD;
import com.businessobjects.ras21.clientsdk.serialization.oburl.URLEncoder;
import com.crystaldecisions.sdk.exception.SDKException;
import com.crystaldecisions.sdk.framework.CrystalEnterprise;
import com.crystaldecisions.sdk.framework.IEnterpriseSession;
public class OpenDocument {
public String getURL() throws SDKException {
IEnterpriseSession sess = CrystalEnterprise.getSessionMgr().logon("Administrator", "2349885Ad", "esx-vm033:6400", "secEnterprise");
String token = sess.getLogonTokenMgr().createLogonToken("", 120, 100);
String tokenEncode = URLEncoder.encode(token);
sess.logoff();
return ("http://esx-vm033:6400/BOE/OpenDocument/opendoc/openDocument.jsp?iDocID=Aa6GrrM79cRAmaOSMGoadKI&sIDType=CUID&token=" + tokenEncode);
}
public static void main(String[] args) {
System.out.println(getURL());
System.out.println("Done");
}
}