Can we avoid specifying User ID & password for connecting to LiveCycle server through code?

Avatar

04-09-2008

Hi,



I am developing a JAVA program that connects to the LiveCycle ES server to assemble two PDF files. Here is some part of the code I am using. The code works fine.



Properties connectionProps = new Properties();

connectionProps.setProperty(ServiceClientFactoryProperties.DSC_DEFAULT_EJB_ENDPOINT, "jnp://localhost:1099");

connectionProps.setProperty(ServiceClientFactoryProperties.DSC_TRANSPORT_PROTOCOL,ServiceClientFactoryProperties.DSC_EJB_PROTOCOL);

connectionProps.setProperty(ServiceClientFactoryProperties.DSC_SERVER_TYPE, "JBoss");

connectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_USERNAME, "administrator");

connectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_PASSWORD, "password");



ServiceClientFactory myFactory = ServiceClientFactory.createInstance(connectionProps);



AssemblerServiceClient assemblerClient = new AssemblerServiceClient(myFactory);



If I do not use the credential info (user ID and password) I get some credential exceptions. Is there a way that I can avoid providing the credential information? The reason for this is I do not want to hardcode the user ID and password information as the password can change. Is there any other way to solve this issue?



Regards,

Ragha

Replies

Avatar

Avatar
Coach
Level 10
Jasmin_Charbonn
Level 10

Likes

149 likes

Total Posts

2,154 posts

Correct reply

97 solutions
Top badges earned
Coach
Give Back 1000
Give back 900
Give Back 800
Give back 600
View profile

Avatar
Coach
Level 10
Jasmin_Charbonn
Level 10

Likes

149 likes

Total Posts

2,154 posts

Correct reply

97 solutions
Top badges earned
Coach
Give Back 1000
Give back 900
Give Back 800
Give back 600
View profile
Jasmin_Charbonn
Level 10

09-09-2008

You can turn security off from your process.



Go under adminui under Services/Application and Services/Service Management.



Search for your process and under the security tab you can disable the security or use the 'Run As' feature to run under a specific user context.



Jasmin