on 05-08-2006 10:00 PM
Hello All:
I'm trying to execute a RFC during the afterInit() function of my custom portal service. I've gotten the
call to work properly in an AbstractPortalComponent. However my problem is that when I put it in a service,
I don't have access to the request object and therefore I don't have an authenticated user for the
ConnectionProperties constructor.
IConnection con = null;
try {
Object tempCon = PortalRuntime.getRuntimeResources().getService(IConnectorService.KEY);
IConnectorGatewayService cgService = (IConnectorGatewayService) tempCon;
ConnectionProperties prop = new ConnectionProperties(local,user);
con = cgService.getConnection(connectionString, prop);
} catch (Exception ex) {
ex.printStackTrace(System.err);
}
In the portal Service, I create my own IUser object:
IUserFactory userFactory = UMFactory.getUserFactory();
IUser user = userFactory.getUserByLogonID("myuserid");
and pass that user to the ConnectionProperties Constructor, but the getConnection() fails. Is there
some service user I can use? Or is there a way that I can force the IUser object in the service to be
authenticated (I would know the password).
Thanks
pass that user to the ConnectionProperties Constructor, but the getConnection() fails
Fails how exactly? The IPrincipal /IUser object passed isn't correct or does the backend not permit the connection? In the later case: is the SSO or user mapping for the system and user correctly configured?
Tobias
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.