How to invoke AM method that accepts parameter other than string

Hi
I need to pass 2 date parameters to my AM method.
I checked the jdev doc and found the below method that can be used for any of the parameter other than String
public Serializable invokeMethod(String methodName,
Serializable[] methodParams,
Class[] methodParamTypes)
one thing i am not able to understand is how to pass multiple dates in a single Class parameter.
can anyone tell me the invoke method syntax for passing 2 dates.

Hi,
Suppose you have a string and two date parameters
String test;
Date date1;
Date date2;
then pass it like this
OAApplicationModule am = pageContext.getApplicationModule(webBean);
Serializable parameters[] = {test,date1,date2};
Class paramTypes[] = {String.class,Date.class,Date.class};
am.invokeMethod("initSummary", parameters, paramTypes);
Thanks,
Gaurav

Similar Messages

  • How to invoke a service on a server other than local bpel server?

    Hi,
    Im trying to invoke a service on a server other than the local bpel server thats installed by default. Any pointers to how this can be achieved? My jedevelper does not show "Bpel process Manager server" under the connections navigator and hence I cannot create a new connection to a different server(other than the default one). Appreciate yr help.
    Thanks,
    -L

    If you only want to just invoke the service, you dont need a new connection.
    Cant you just point to the wsdl of the service in the partnerlink ?
    If you need a new connection in jdeveloper to the other server, you first need to make the new applicationserver connection and after that the integrationserver connection.
    After this you can connect to an other bpelserver, besides the default.

  • How to invoke a method in application module or view objects interface?

    Hi,
    perhaps a stupid RTFM question, but
    How can i invoke a method that i have published in the application modules or view objects interfaces using uiXml with BC4J?
    Only found something how to invoke a static method (<ctrl:method class="..." method="..." />) but not how to call a method with or without parameters in AM or VO directly with a uix-element.
    Thanks in advance, Markus

    Thanks for your help Andy, but i do not understand why this has to be that complicated.
    Why shall i write a eventhandler for a simple call of a AM or VO method? That splatters the functionality over 3 files (BC4J, UIX, handler). Feature Request ;-)?
    I found a simple solution using reflection that can be used at least for parameterless methods:
    <event name="anEvent">
      <bc4j:findRootAppModule name="MyAppModule">
         <!-- Call MyAppModule.myMethod() procedure. -->
          <bc4j:setPageProperty name="MethodName" value="myMethod"/>
          <ctrl:method class="UixHelper"
                  method="invokeApplicationModuleMethod"/>
       </bc4j:findRootAppModule>
    </event>The UixHelper method:
      public static EventResult invokeApplicationModuleMethod( BajaContext context,
                                                               Page page,
                                                               PageEvent event ) {
        String methodName = page.getProperty( "MethodName" );
        ApplicationModule am = ServletBindingUtils.getApplicationModule( context );
        Method method = null;
        try {
          method = am.getClass(  ).getDeclaredMethod( methodName, null );
        } catch( NoSuchMethodException e ) {
          RuntimeException re = new RuntimeException( e );
          throw re;
        try {
          method.invoke( am, null );
        } catch( InvocationTargetException e ) {
          RuntimeException re = new RuntimeException( e );
          throw re;
        } catch( IllegalAccessException e ) {
          RuntimeException re = new RuntimeException( e );
          throw re;
        return null;
      }Need to think about how to handle parameters and return values.
    Btw. Do i need to implement the EventHandler methods synchronized?
    Regards, Markus

  • How to create a program that accepts 5 digits from the user between 0 and 9

    how to create a program that accepts 5 digits from the user between 0 and 9 then put them in ascending order using link-list method..

    You can use a scanner to get user input from the command line.
    import java.util.*;
    public class Test {
        private List<Integer> list;
        private Scanner in;
        public static void main (String... args) {
            new Test ();
        public Test () {
            list = new LinkedList<Integer> ();
            in = new Scanner (System.in);
            for (int i = 0; i < 5; i ++) {
                System.out.format ("Please enter a number (%d more): ", (5 - i));
                list.add (in.nextInt ());
            Collections.sort(list, new Comparator<Integer> () {
                public int compare (Integer i1, Integer i2) {
                    return i2 - i1;
            System.out.println (list);
    }

  • Question on "How-to invoke a method once upon application start"

    Hello everyone.
    I'm trying to implement what the article "How-to invoke a method once upon application start" by Frank suggests.
    https://blogs.oracle.com/jdevotnharvest/entry/how_to_invoke_a_method
    Suppose that I'm having a single point of entry, so in my login.jpsx I have the below:
    <f:view beforePhase="#{login.onBeforePhase}">In the method "onBeforePhase" I have to pass the phaseEvent, since the signature is the following:
    public void onBeforePhase(PhaseEvent phaseEvent)but how do I know the phaseEvent when calling the login.onBeforePhase? How the call should be?
    Thanks a lot!
    ps. I'm using jDev 11.1.2.1.0

    You need not pass anything to this method , this method will get called before every Phase except ReStore View
    Just write the logic as Frank suggested for the phase in which you want the code to execute. You can get the PhaseId's like
    PhaseId.RENDER_RESPONSE
    public void onBeforePhase(PhaseEvent phaseEvent) {// from Frank's doc
    //render response is called on an initial page request
      if(phaseEvent.getPhaseId() == PhaseId.RENDER_RESPONSE){
    ... etc

  • How to enable remote debugging for a session other than the current one

    Hi all,
    I am trying to figure out how to enable remote debugging for a session other than the one I am currently using.
    More specifically, we have an application that is making database calls to Oracle 11gR2. Something is causing an exception during this invocation. My system is currently not set up to recompile said application, so I can't just add the debug call to the code and recompile. Therefore I would like to be able to log into the database (as sys, if necessary) and invoke dbms_debug_jdwp.connect_tcp on the desired session.
    The docs indicate that I should be able to do so:
    dbms_debug_jdwp.connect_tcp(
    host IN VARCHAR2,
    port IN VARCHAR2,
    session_id IN PLS_INTEGER := NULL,
    session_serial IN PLS_INTEGER := NULL,
    debug_role IN VARCHAR2 := NULL,
    debug_role_pwd IN VARCHAR2 := NULL,
    option_flags IN PLS_INTEGER := 0,
    extensions_cmd_set IN PLS_INTEGER := 128);
    But when I try (even as sys), I get the following:
    exec dbms_debug_jdwp.connect_tcp('1.2.3.4',5678,<session id>,<session serial>);ORA-00022: invalid session ID; access denied
    ORA-06512: at "SYS.DBMS_DEBUG_JDWP", line 68
    ORA-06512: at line 1
    00022. 00000 - "invalid session ID; access denied"
    *Cause:    Either the session specified does not exist or the caller
    does not have the privilege to access it.
    *Action:   Specify a valid session ID that you have privilege to access,
    that is either you own it or you have the CHANGE_USER privilege.
    I've tried granting the 'BECOME USER' privilege for the relevant users, but that didn't help. I read something about having to set some kind of ACL as of 11gR1, but the reference documentation was very confusing.
    Would someone be able to point me in the right direction? Is this even possible, or did I misread the documentation?

    Interesting deduction, that would be very useful indeed. I hate recompiling just to add the debug call, and it can't be done in our production environment. But it seems unlikely to me it would be implemented this way.
    I would cross-post this in the SQL AND PL/SQL forum though, as this is really a database issue, not with the SQL Developer tool. Do add the links to the other posts in each.
    Regards,
    K.

  • How do i install reader to a drive other than the boot drive?

    how do i install reader to a drive other than the boot drive?

    Hi nicksdaddy,
    There is an offline version:
    http://get.adobe.com/reader/enterprise/
    Hope that helps!
    Stacy

  • How to install ovi suite to a drive other than C:?...

    how to install ovi suite to a drive other than c:??? my c: drive is almost full with other partitions perfectly free to install it, how do i do that? can i use previous versions of ovi suite to use with my e63? at this point, i'm unable to use ovi suite at all, because there's no room to install it on my c: drive.
    allllllllso there's one more thing, when i originally had tried installing ovi suite on my computer i had more than 1gb free. after installing it i on'ly had 500mb free. i had only intended for it to use a very small amount of space, and since i also use my c: drive for virtual memory i quickly uninstalled it, looking for an option i'd maybe skipped over while installing it the first time. no luck. anyways, when i looked in the add/remove programs control panel the installed size of ovi suite was only 40-50mb. even after uninstalling ovi suite the extra memory space that seemed to all of a sudden taken up by the installation stayed used.
    when looking at the file sizes of everything on my hard drive, (including system files and paging file) there is still a descreprency between the amount of memory used and the size of all files total on the drive. at this point im quite disgusted and disapointed in ovi suite as i'm mostly unable to use it to connect my phone to my computer and i'm also having problems with the CA101 cable as well. i guess i'll have to go check for another cable.
    nokia!!! wake up and fix yo **bleep**!!!!
    anyone have any solutions for the main problem? (installing to a drive other than c? is there support for this option in any of the new beta versions? can that be included in the newest betas? i'm suuuuuure i'm not the only one begging for this option!!!

    Hi ostrenga4, sorry to hear about your experiences.
    When installing Nokia Ovi Suite to PC, Windows makes "system restoration points", which are available to restore operating system to previous condition, if something goes wrong, for example in driver installation.
    You can change install location of Nokia Ovi Suite with following:
    - Download Nokia Ovi Suite install package from Nokia Ovi Suite pages
    - Start Windows Command prompt
    - From Command prompt, navigate to folder containing Nokia Ovi Suite install package, which you downloaded
    - Start Nokia Ovi Suite install package with command line "Nokia_Ovi_Suite_webinstaller.exe /TARGET="D:\TestDir\Test"
    - This results, that Nokia Ovi Suite installer creates folder D:\TestDir\Test (if that doesn't exist) and installs Nokia Ovi Suite there.
    - Unfortunately, Windows Installer still keeps installer cache files and system restoration points in C: drive (or whatever your system drive is)
    As you can see, this is possible, but it is very much recommend to have enough space for installing software into system drive.
    Cheers, Samuli

  • How can i transfer songs from another itunes other than mine

    how can i transfer songs from another itunes other than mine

    Purchases made under 1 Apple ID are permanently associated with that Apple ID and CANNOT be transferred to another Apple ID.  So if you want to keep those songs, you'll need to always have access to your dad's account.
    B-rock

  • Bpel deployment fails for all processes that have revision other than 1.0.

    Using: Release *10.1.3.3.1*
    Hello All,
    Bpel deployment fails for all processes that have revision other than *1.0*.
    We have been attempting to deploy several BPEL projects via ANT script to a target environment and are encountering failures to deploy for every project which isn’t a (revision 1.0). We are getting the following error whenever we try to deploy a process with a revision other than 1.0:
    D:\TJ_AutoDeploy\BPEL_AutoDeploy_BETA\build.xml:65: BPEL archive doesnt exist in directory "{0}"
         at com.collaxa.cube.ant.taskdefs.DeployRemote.getJarFile(DeployRemote.java:254)
         at com.collaxa.cube.ant.taskdefs.DeployRemote.deployProcess(DeployRemote.java:409)
         at com.collaxa.cube.ant.taskdefs.DeployRemote.execute(DeployRemote.java:211)
         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
         at org.apache.tools.ant.Task.perform(Task.java:364)
         at org.apache.tools.ant.Target.execute(Target.java:341)
         at org.apache.tools.ant.Target.performTasks(Target.java:369)
         at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
         at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
         at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
         at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
         at org.apache.tools.ant.Main.runBuild(Main.java:668)
         at org.apache.tools.ant.Main.startAnt(Main.java:187)
         at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
         at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
    The structure of our automated deployment script is as follows:
    First, a batch script calls (Jdeveloper_BPEL_Prompt.bat) in order to set all necessary environment variables i.e. ORACLE_HOME, BPEL_HOME, ANT_HOME, etc for ant.
    Next, the script lists every .jar file within the directory to an .ini file called BPEL_List.ini. Furthermore, BPEL_DIR, ADMIN_USER and ADMIN_PSWD variables are set and initialized respectively to:
    -     “.” – point to directory where script is running from because all the BPEL processes are located here
    -     “oc4jadmin”
    -     “*********” (whatever the password for out environment is)
    We’ve developed a method to have the script prompt the user to select the target environment to deploy to. Once the user selects the appropriate environment, the script goes through the BPEL_List.ini files and a loop tells it that for every BPEL process listed:
    DO ant
    -Dprocess.name=%%b
    -Drev= !Rev!
    -Dpath=%BPEL_DIR%
    -Ddomain=default
    -Dadmin.user=%ADMIN_USER%
    -Dadmin.password=%ADMIN_PWD%
    -Dhttp.hostname=%HOST%
    -Dhttp.port=%PORT%
    -Dverbose=true
    (What’s happening is that the variables in the batch file are being passed on to the ANT script where *%%b* is the process name, !rev! is revision #, and so on…)
    The loop goes through each line in the BPEL_List.ini and tokenizes the BPEL process into 3 parts *(%%a, %%b, and %%c)* but we only extract 2 parts: *%%b* (process name) and *%%c* which becomes !Rev! (revision number).
    Example:
    Sample BPEL process:
    bpel_ThisIsProcess1_1.0.jar
    bpel_ThisIsProcess2_SOAv2.19.0.001B.jar
    After tokenizing:
    %%a     %%b     %%c
    bpel     ThisIsProcess1     1.0.jar
    bpel     ThisIsProcess2     SOAv2.19.0.001B.jar
    *!Rev!* and not *%%c* because *%%c* will return whatever the revision number is + the “.jar” file extension as illustrated above. So to circumvent this, we parse *%%c* so that the last 4 characters are stripped. Such is done like this:
    set RevN=%%c
    set RevN=!RevN:~0,-4!
    Hence, the usage of !Rev!.
    Below is a screenshot post of the ANT build.xml that goes with our script:
    <!--<?xml version="1.0"?>-->
    <!--BUILD.XML-->
    <project name="bpel.deploy" default="deployProcess" basedir=".">
         <!--
         This ant build file was generated by JDev to deploy the BPEL process.
         DONOT EDIT THIS JDEV GENERATED FILE. Any customization should be done
         in default target in user created pre-build.xml or post-build.xml
         -->
         <property name="process.dir" value="${basedir}" />
              <!-- Set BPEL process name -->
              <!--
              <xmlproperty file="${process.dir}/bpel/bpel.xml"/>
              <property name="process.name" value="${BPELSuitcase.BPELProcess(id)}"/>
              <property name="rev" value="${BPELSuitcase(rev)}"/>
              -->
         <property environment="env"/>
         <!-- Set bpel.home from developer prompt's environment variable BPEL_HOME -->
              <condition property="bpel.home" value="${env.BPEL_HOME}">
                   <available file="${env.BPEL_HOME}/utilities/ant-orabpel.xml" />
              </condition>
         <!-- show that both bpel and oracle.home are located (TESTING purposes ONLY) -->
         <!-- <echo>HERE:${env.BPEL_HOME} ${env.ORACLE_HOME}</echo> -->
         <!-- END TESTING -->
         <!--If bpel.home is not yet using env.BPEL_HOME, set it for JDev -->
         <property name="oracle.home" value="${env.ORACLE_HOME}" />
         <property name="bpel.home" value="${oracle.home}/bpel" />
         <!--First override from build.properties in process.dir, if available-->
         <property file="${process.dir}/build.properties"/>
         <!--import custom ant tasks for the BPEL PM-->
         <import file="${bpel.home}/utilities/ant-orabpel.xml" />
         <!--Use deployment related default properties-->
         <property file="${bpel.home}/utilities/ant-orabpel.properties" />
         <!-- *************************************************************************************** -->
         <target name="deployProcess">
              <tstamp>
                   <format property="timestamp" pattern="MM-dd-yyyy HH:mm:ss" />
              </tstamp>
              <!-- WRITE TO LOG FILE #tjas -->
              <record name="build_verbose.log" loglevel="verbose" append="true" />
              <record name="build_debug.log" loglevel="debug" append="true" />
              <echo></echo>
              <echo>####################################################################</echo>
              <echo>BPEL_AutoDeploy initiated @ ${timestamp}</echo>
              <echo>--------------------------------------------------------------------</echo>
              <echo>Deploying ${process.name} on ${http.hostname} port ${http.port} </echo>
              <echo>--------------------------------------------------------------------</echo>
              <deployProcess
                   user="${admin.user}"
                   password="${admin.password}"
                   domain="${domain}"
                   process="${process.name}"
                   rev="${rev}"
                   dir="${process.dir}/${path}"
                   hostname="${http.hostname}"
                   httpport="${http.port}"
                   verbose="${verbose}" />
              <sleep seconds="30" />
              <!--<echo message="${process.name} deployment logged to ${build_verbose.log}"/>
              <echo message="${process.name} deployment logged to ${build.log}"/> -->
         </target>
         <!-- *************************************************************************************** -->
    </project>
    SUMMARY OF ISSUE AT HAND:
    ~ Every bpel process w/ 1.0 revision deploys with no problems
    ~ At first I would get an invalid character error most likely due to the “!” preceding “Rev”, but then I decided to set rev=”false” in the build.xml file. That didn’t work quite well. In another attempt, I decided to leave the –Drev= attribute within the batch script blank. That still led to 1.0s going through. My next thought was deploying something other than a 1.0, such as 1.2 or 2.0 and that’s when I realized that if it wasn’t a 1.0, it refused to go through.
    QUESTIONS:
    1.     IS THERE A WAY TO HAVE ANT LOOK INTO THE BPEL PROCESS AND PULL THE REVISION ID?
    2.     WHAT ARE WE DOING WRONG? ARE WE MISSING ANYTHING?
    3.     DID WE GO TOO FAR? MEANING, IS THERE A MUCH EASIER WAY WE OVERLOOKED/FORGOT/OR DON’T KNOW ABOUT THAT EXISTS?
    Edited by: 793292 on Jul 28, 2011 12:38 PM

    Only thing i can think of is instead of using a MAC ACL , u cud jus use the default class
    Policy Map Test
    class class-default
    police 56000 8000 exceed-action drop
    Class Map match-any class-default (id 0)
    Match any
    You would be saving a MAC-ACL ;-).

  • How do we connect two databases in Oracle other than Database Link?

    Good Morning,
    How do we connect two databases in Oracle other than Database Link?
    I am using Oracle 10g, I heard that we can connect two database in Oracle through ODBC. Is it possible? How?
    Thanks
    Nihar

    See if this helps.
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:4406709207206#18830681837358

  • Some albums I put on my Mac to later sync with a Touch appears as seperate tracks and not a single album.  How do I get them back together again other than a playlist.  I do not want the tracks showing up as albums on the Touch?

    Some albums I put on my Mac to later sync with a Touch appears as seperate tracks and not a single album.  How do I get them back together again other than a playlist.  I do not want the tracks showing up as albums on the Touch?

    Are your tracks pat of a collection? Different artists, but still one album? Then mark them a s acollection or set the album artist. See this guide on how to group separate tracks into albums:
    iTunes: Grouping Tracks Into Albums

  • How do I burn files into a CD other than by burning music through iTunes?

    How do I burn files into a CD other than by burning music through iTunes?

    Hi,
    see here: http://support.apple.com/kb/HT1328
    Happy New Year
    Stefan

  • HT5232 does ipad mini have a usb port? if not then how can i share my documents with devices other than apple?

    does ipad mini have a usb port? if not then how can i share my documents with devices other than apple?

    Wireless Flash Drive (tap to enlarge image)

  • How to Call a method that takes in a parameter from JSF Fragment

    Hi,
    When we want to call the getter method of a backingbean field in a JSF Fragment we merely do a #{bean.fieldName} which will ensure that a getFieldName () will be invoked on the bean....and the value is returned.
    Now Suppose i have a method say
    String method1(String) and i wnt use this method in the JSFF. How woudl i do that because this method is taking a parameter so i cannot do a plain #{bean.fieldName}
    Any ideas
    Thanks
    Karthik

    Hello Karthik,
    You can achieve it using an EL hack. If the managed bean implements map, then an expression like #{bean[myParameter]} will call bean.get(myParameter) and you can then redispatch to your other method.
    Regards,
    ~ Simon

Maybe you are looking for

  • Do I need to replace my iPod battery?

    I've had my video iPod since Christmas of 2006. Earlier this year my laptop crashed so I've just now started using my iPod on a new one. Even after putting the new updates onto my iPod it still has pretty low battery life, even after charging for mor

  • Can I open CS4 on a pc that has CS6 loaded?

    I have CS4 but after I purchased the cs6 suite, I can't open the old cs4. When I try to open it, it says the licensing for this product has stopped working and gives the error code 148:3. I have a really old flash file that needs a few link revisions

  • Parsing a string of values in an expression

    I have a string being passed into my report (SSRS 2008R2) That I need to parse for display purposes. O know that I can do it with a SWITCH Statement, however there are enough different possible combinations of the string that It would become cumberso

  • Attaching large amounts of text as either a file or or pdf document.

    Good Evening! I would like to attach a file (.txt, .rtf, .doc, or .pdf) to provide additional information to a database record. I'm wondering what is the most efficient way to do this. It would also be nice to be able to search the document. I know t

  • Album artwork not copying over to ipod touch

    Hi there, run into a bit of a problem, I upgraded to 1.1.3 (not 1.1.4 just yet), when I came to re-load my entire library back onto my ipod, it copies the tracks over but fails to transfer the album artwork for abou 98% of the albums. On my PC EVERY