cancel
Showing results for 
Search instead for 
Did you mean: 

How to hardcode username/pwd in the open doc function.

Former Member
0 Kudos

How to hardcode username/pwd in the open doc function.

can you please provide the complete opendoc function

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

hi,

Using SDK, logon token can be passed along with OpenDoc URL.

Sample code is as follows:

String openDocumentToken() throws SDKException, Unsup

portedEncodingException

{

IEnterpriseSession sess = CrystalEnterprise.getSessionMgr().logon ("username", "password", "<cms>:</port>",

"secEnterprise");

String token = sess.getLogonTokenMgr().createLogonToken("",120,100);

String tokenEncode = URLEncoder.encode(token, "UTF-8");

return ("http://<server>:<port>/OpenDocument/opendoc/openDocument.jsp?iDocID=Aa6GrrM79cRAmaOSMGoadKI&sID

Type=CUID&token=" + tokenEncode);

}

Regards,

Vamsee

former_member186586
Active Participant
0 Kudos

hi.

i want opendoc without user-pass credentials..

where to write this code for take token?