Sunday 29 September 2013

Adapter not recognizing my java class

Adapter not recognizing my java class

I want to invoke a java class in an adapter. I have created a class called
com.wl.poc.LdapUserCreator and successfully get it working in WL server.
In my adapter's code I put this :
var url = WL.Server.configuration['com.wl.poc.ldap.providerUrl'];
var uidExpression =
WL.Server.configuration['com.wl.poc.ldap.uidExpression'];
var base = WL.Server.configuration['com.wl.poc.ldap.ldapSearchBase'];
var managerDn = WL.Server.configuration['com.wl.poc.ldap.managerDn'];
var managerPwd = WL.Server.configuration['com.wl.poc.ldap.managerPwd'];
var service = com.wl.poc.LdapUserCreator.getServiceInstance( url,
uidExpression, base, managerDn, managerPwd);
I have this error
ReferenceError: "com" is not defined (.../IntegrationAdapter-impl.js#373)
Another question : If is it possible to have an instance of service class
in the adapter (which is a java instance) and call it after like this
(Haven't yet tried it) ?
var service = com.wl.poc.LdapUserCreator.getServiceInstance( url,
uidExpression, base, managerDn, managerPwd);
service.addNewUser(...) ?

No comments:

Post a Comment