Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Hard code username-password to connect to back-end

Hi

I'm using this piece of code to connect to the back-end via a defined system (system alias = CN)

IConnectorGatewayService cgservice =(IConnectorGatewayService) PortalRuntime								.getRuntimeResources()						                .getService(IConnectorService.KEY);
		
ConnectionProperties cp = new ConnectionProperties(request.getLocale(), request.getUser());

try {
	con = cgservice.getConnection("CN", cp);
	}
	catch (Exception e)
 {
			   e.printStackTrace();
  }

Is there a way I can pass hard-coded username/password in "ConnectionProperties(__,__)" instead of retrieving the logged-on user? i don't want to do user-mapping on the portal for connecting to the backend.

Thanks,

Prerana

Points will be awarded generously for helpful answers

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question