7 Replies Latest reply on Nov 21, 2012 10:27 PM by 926363

    Custom notification resolver in OIM

      Hello OIM experts, I have written custom resolver since base template for ForgottenUsername is not providing user firstname and lastname access within the template.

      In fusionsecurity blog, in plugin.xml , the plugin point menioned is NotificationEventResolver. But I do not think I should mention this one. I am thinking I should provide oracle.iam.selfservice.notification.ForgottenUsernameResolver as the plugin point. If I mention NotificationEventResolver, is not that I am going to extend the top level class with my custom class ?

      Can you please guide me.


      Edited by: 923360 on Nov 22, 2012 5:16 AM
        • 1. Re: Custom notification resolver in OIM
          Kevin Pinsky
          Your plugin.xml file should be in this format:

          <?xml version="1.0" encoding="UTF-8"?>
          <oimplugins xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
          <plugins pluginpoint="oracle.iam.notification.impl.NotificationEventResolver">
          <plugin name="ForgottenUsernameResolver" pluginclass="xxx.xxx.xxx.ForgottenUsernameResolver" version="1.0"/>
          </oimplugins >

          Replace the xxx's with your own package name.

          Your class should start with:

          public class ForgottenUsernameResolver implements NotificationEventResolver {

          1 person found this helpful
          • 2. Re: Custom notification resolver in OIM
            wow...I need to overwrite the base class ForgottenUsernameResolver itself !! I had given CustomForgottenUsernameResolver as my class name. May be that's the reason my registration did not go success.

            thank you Kevin. I will update you if any issue with registration.
            • 3. Re: Custom notification resolver in OIM
              Kevin Pinsky
              I thought you were just updated the resolver class that is getting called already from your previous post. Are you creating your own plugin to send the email now or use the existing? If you use the existing, you are only updating your XML file that defines the resolver class to replace the one that existed already.

              <Resolver class="com.myproject.notification.CustomForgottenUsernameResolver">

              Your code doesn't need to be deployed in a plugin, you should be able to just use the UploadJar tool and put the jar file into the repository.

              • 4. Re: Custom notification resolver in OIM
                thank you for your quick reply. I am going to use existing template but only resolver class is separately written. Because the base resolver class ForgottenUsernameResolver is not showing up first name, last name etc.

                public class CustomForgottenUsernameResolver implements NotificationEventResolver.

                What I understood from you now is, import updated ForgottenUsername.xml in which I need to specify <Resolver class="com.myproject.notification.CustomForgottenUsernameResolver"> and then upload my jar having CustomForgottenUsernameResolver .

                Please let me know if I am missing anything. Thank you for your great support.
                • 5. Re: Custom notification resolver in OIM
                  Kevin Pinsky
                  You should update this file /metadata/iam-features-selfservice/notification/ForgottenUsername.xml and replace the code being called with your own class that you have uploaded through a jar file.

                  There is no need to create a new plugin and register it because one already exists that is calling the resolver class listed in the xml file above. By changing the class being called, it will call your class instead.

                  1 person found this helpful
                  • 6. Re: Custom notification resolver in OIM
                    thank you Kevin. I think I have the issue now that oim does not recognize my resolver.

                    Appreciate your help.


                    Edited by: 923360 on Nov 22, 2012 5:12 AM
                    • 7. Re: Custom notification resolver in OIM
                      When I am invoking notifyForgottenUsername(email, null) and getting below exception :

                      SEVERE: Internal server error in sending forgotten username by e-mail.
                      oracle.iam.notification.exception.NotificationException: Internal server error in sending forgotten username by e-mail.
                           at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:237)
                           at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:348)
                           at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)
                           at oracle.iam.selfservice.uself.uselfmgmt.api.UnauthenticatedSelfService_7ogm8n_UnauthenticatedSelfServiceRemoteImpl_1036_WLStub.notifyForgottenUsernamex(Unknown Source)
                           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                           at java.lang.reflect.Method.invoke(Method.java:597)
                           at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:85)
                           at $Proxy0.notifyForgottenUsernamex(Unknown Source)
                           at oracle.iam.selfservice.uself.uselfmgmt.api.UnauthenticatedSelfServiceDelegate.notifyForgottenUsername(Unknown Source)
                      Caused by: oracle.iam.notification.exception.NotificationResolverNotFoundException: Cannot find resolver for {0}.

                      I have uploaded the jar as you instructed and got below message from the tool :

                      Upload jar executed successfully

                      Now, I do not know why OIM is unable to read this resolver in place of ForgottenUserNameResolver.
                      thank you for your help.

                      Edited by: 923360 on Nov 21, 2012 2:25 PM

                      Edited by: 923360 on Nov 21, 2012 2:25 PM