Binding TableName at Runtime!

Hi,
I need to insert data in five different tables with same structure.
I am using a common Prepared Statement to insert values in the tables.
Problem is :
Depending on the table name choosen at run time i need to insert the values.....
How do i bind the table name choosen at runtime to the Prepared Statement, so that the data gets inserted in that perticular table ?
Thanking in Advance.......

Thanks for the response. i have sorted out the result
Iam using 5 tables because, its a Question Bank
k which needs entry in 5 diff. subject tables with
same fields ....No. This design is wrong. They should all be in one table with a field (perhaps a foreign key) that identifies the subject.
You have taken out one the elements that identifies the data from being a column and made that the table name.
That is right out of horrific database design 101.
Why?
What happens when you want to add a subject? A nightmare that's what. If the design was proper (and used a foreign key) then one insert into the foriegn key table that lists the subjects would be all that is required... NO CODE CHANGES. Your design requires coding changes.

Similar Messages

  • [Solved] Named Bind Variables at Runtime - SQL WHERE clause issue

    Hey 'all,
    I've been having this issue today with a Search page using Named Bind Variables at Runtime for the search parameters for the WHERE clause in the view objects SQL.
    I've got everything working except for a clearing method which I've created so that the user can clear the current WHERE clause from the SQL statment and set it as 1=2 (so that it doesn't do a blind query on load).
    The method can clear and set the WHERE clause to 1=2 only when there is already one there.
    Below are the methods: (located in my view object class)
    public void findInvoiceById(Number invoiceId){
        setWhereClause("invoice_id = :P_INVOICE_ID");
        defineNamedWhereClauseParam("P_INVOICE_ID",null,null);
        setNamedWhereClauseParam("P_INVOICE_ID",invoiceId);
        executeQuery();
    public void clearCriteria(){
        setWhereClause("1=2");
        removeNamedWhereClauseParam("P_INVOICE_ID");
        executeQuery();
    }The error which I get is the following - this happens when the button is pressed twice in a row, or when no query has been passed previously.
    1. JBO-29000: Unexpected exception caught: oracle.jbo.NoDefException, msg=JBO-25058: Definition P_INVOICE_ID of type Variable not found in SupplierInvoicesView1
    2. JBO-25058: Definition P_INVOICE_ID of type Variable not found in SupplierInvoicesView1
    Any help with this would be greatly appreciated!
    Cheers,

    Hi Bonnie,
    we have it working ok, but still feel that there is room for improvement in the design.
    For us the key factors are:
    Pages based on the same view object that can be queried multiple ways.
    We don't want to put design time bind variables in because it limits the use of the VO
    We don't wan't multiple VO's with different where clauses.
    The page is displaying the same table columns and fields, but the where clause must be dynamic.
    We only want to query on the search field entered (some of our tables are massive)
    TopLink named queries are really what we are after, but we don't want to forgo all the other ADF BC functionality. The only examples of ViewCriteria in the developer guide had literals in the where clause and no bind variables. The View Criteria may still be an option, but it appeared quite complex compaired to directly adding and removing bind variables at runtime.
    a couple of footnotes:
    the following methods are used to clear the runtime variables prior to reusing the VO (thanks to John Stegman for the pointer on the exception handler):
        public void clearBindVariable(String bindVariableName){
            try
                removeNamedWhereClauseParam(bindVariableName);
            catch (NoDefException e)
        public void clearBindVariables(){
            clearBindVariable("P_INVOICE_ID");
            clearBindVariable("P_INVOICE_NUM");
            clearBindVariable("P_SUPPLIER_NAME");
            clearBindVariable("P_INVOICE_DATE_FROM");
            clearBindVariable("P_INVOICE_DATE_TO");
            clearBindVariable("P_SUPPLIER_NUMBER");
        }We are using 1=1 and 1=2 in the where clause to supress blind querying. 1=2 is applied when ever we are not explicitely searching for something. We had a problem with using the refresh condition ${adfFacesContext.postback == true} which I posted about here:
    executeQuery called twice using ${adfFacesContext.postback == true}
    Would still gladly hear other ideas on a better reuse design.
    regards,
    Brenden

  • Modifying the Data Binding value at runtime

    Hi
    just wondering if there is a programmatic way of adding or removing the Default Binding value at runtime? This is the value that is showing up on the Binding Tab of the Object Tab.
    thanks,
    John

    Have you added teh Label as a text field?
    If you have done that, try replacing the label with a Input/Output type field in the display mode by selecting 'Output Only' in the attributes->Program Tab of Screen Painter.
    Now from the program , when the user presses F7, you can code to change the value of the Label (Input / Output field).
    This will work out. Please let me know if you have any issues.
    Regards,
    Anish Thomas

  • How to change the tablename at runtime?

    Hi
    IN _10gR2_
    I would like to know if there is a way to change the tablename at runtime - other than using dynamic sql.
    These table have similar structure except the tablename iteself.
    For ex. depending on where we get a request we want to look/update different table:
    if request_from x then
    select * from table where ....
    or it could be update or insert statement here
    end if;
    if request from y then
    select * from table_y where ....
    or it could be update or insert statement here
    end if;
    Thanks

    user565033 wrote:
    sorry, this is not an optionWell the best you'll get is something like...
    SQL> select * from emp;
         EMPNO ENAME      JOB              MGR HIREDATE           SAL       COMM     DEPTNO
          7369 SMITH      CLERK           7902 17-DEC-1980        800                    20
          7499 ALLEN      SALESMAN        7698 20-FEB-1981       1600        300         30
          7521 WARD       SALESMAN        7698 22-FEB-1981       1250        500         30
          7566 JONES      MANAGER         7839 02-APR-1981       2975                    20
          7654 MARTIN     SALESMAN        7698 28-SEP-1981       1250       1400         30
          7698 BLAKE      MANAGER         7839 01-MAY-1981       2850                    30
          7782 CLARK      MANAGER         7839 09-JUN-1981       2450                    10
          7788 SCOTT      ANALYST         7566 19-APR-1987       3000                    20
          7839 KING       PRESIDENT            17-NOV-1981       5000                    10
          7844 TURNER     SALESMAN        7698 08-SEP-1981       1500          0         30
          7876 ADAMS      CLERK           7788 23-MAY-1987       1100                    20
          7900 JAMES      CLERK           7698 03-DEC-1981        950                    30
          7902 FORD       ANALYST         7566 03-DEC-1981       3000                    20
          7934 MILLER     CLERK           7782 23-JAN-1982       1300                    10
    14 rows selected.
    SQL> select * from emp2;
         EMPNO ENAME      JOB              MGR HIREDATE           SAL       COMM     DEPTNO
          7369 SMITH      CLERK           7902 17-DEC-1980          0                    20
          7499 ALLEN      SALESMAN        7698 20-FEB-1981          0        300         30
          7521 WARD       SALESMAN        7698 22-FEB-1981          0        500         30
          7566 JONES      MANAGER         7839 02-APR-1981          0                    20
          7654 MARTIN     SALESMAN        7698 28-SEP-1981          0       1400         30
          7698 BLAKE      MANAGER         7839 01-MAY-1981          0                    30
          7782 CLARK      MANAGER         7839 09-JUN-1981          0                    10
          7788 SCOTT      ANALYST         7566 19-APR-1987          0                    20
          7839 KING       PRESIDENT            17-NOV-1981          0                    10
          7844 TURNER     SALESMAN        7698 08-SEP-1981          0          0         30
          7876 ADAMS      CLERK           7788 23-MAY-1987          0                    20
          7900 JAMES      CLERK           7698 03-DEC-1981          0                    30
          7902 FORD       ANALYST         7566 03-DEC-1981          0                    20
          7934 MILLER     CLERK           7782 23-JAN-1982          0                    10
    14 rows selected.
    SQL> with req as (select &required_table as req from dual)
      2  --
      3  select * from emp, req where req = 1 union all
      4  select * from emp2, req where req = 2
      5  /
    Enter value for required_table: 1
    old   1: with req as (select &required_table as req from dual)
    new   1: with req as (select 1 as req from dual)
         EMPNO ENAME      JOB              MGR HIREDATE           SAL       COMM     DEPTNO        REQ
          7369 SMITH      CLERK           7902 17-DEC-1980        800                    20          1
          7499 ALLEN      SALESMAN        7698 20-FEB-1981       1600        300         30          1
          7521 WARD       SALESMAN        7698 22-FEB-1981       1250        500         30          1
          7566 JONES      MANAGER         7839 02-APR-1981       2975                    20          1
          7654 MARTIN     SALESMAN        7698 28-SEP-1981       1250       1400         30          1
          7698 BLAKE      MANAGER         7839 01-MAY-1981       2850                    30          1
          7782 CLARK      MANAGER         7839 09-JUN-1981       2450                    10          1
          7788 SCOTT      ANALYST         7566 19-APR-1987       3000                    20          1
          7839 KING       PRESIDENT            17-NOV-1981       5000                    10          1
          7844 TURNER     SALESMAN        7698 08-SEP-1981       1500          0         30          1
          7876 ADAMS      CLERK           7788 23-MAY-1987       1100                    20          1
          7900 JAMES      CLERK           7698 03-DEC-1981        950                    30          1
          7902 FORD       ANALYST         7566 03-DEC-1981       3000                    20          1
          7934 MILLER     CLERK           7782 23-JAN-1982       1300                    10          1
    14 rows selected.
    SQL> /
    Enter value for required_table: 2
    old   1: with req as (select &required_table as req from dual)
    new   1: with req as (select 2 as req from dual)
         EMPNO ENAME      JOB              MGR HIREDATE           SAL       COMM     DEPTNO        REQ
          7369 SMITH      CLERK           7902 17-DEC-1980          0                    20          2
          7499 ALLEN      SALESMAN        7698 20-FEB-1981          0        300         30          2
          7521 WARD       SALESMAN        7698 22-FEB-1981          0        500         30          2
          7566 JONES      MANAGER         7839 02-APR-1981          0                    20          2
          7654 MARTIN     SALESMAN        7698 28-SEP-1981          0       1400         30          2
          7698 BLAKE      MANAGER         7839 01-MAY-1981          0                    30          2
          7782 CLARK      MANAGER         7839 09-JUN-1981          0                    10          2
          7788 SCOTT      ANALYST         7566 19-APR-1987          0                    20          2
          7839 KING       PRESIDENT            17-NOV-1981          0                    10          2
          7844 TURNER     SALESMAN        7698 08-SEP-1981          0          0         30          2
          7876 ADAMS      CLERK           7788 23-MAY-1987          0                    20          2
          7900 JAMES      CLERK           7698 03-DEC-1981          0                    30          2
          7902 FORD       ANALYST         7566 03-DEC-1981          0                    20          2
          7934 MILLER     CLERK           7782 23-JAN-1982          0                    10          2
    14 rows selected.
    SQL>Otherwise you'll have to perhaps use a few "alter table rename..." ddl's to switch the table names around prior to your query.

  • Binding fault vs Runtime fault

    Hi,
    I am trying to do a http post from a bpel process and I want to retry if I get
    connection errors. When I tried running this with invalid URL I am getting
    a 'connection refused' but it is a binding fault and not runtime fault. I am assuming
    this is the reason that 'retry' configuration is not working. Here are the entries
    in bpel.xml
    <partnerLinkBinding name="PartnerLink_1">
    <property name="wsdlLocation">myService.wsdl</property>
    <property name="retryMaxCount">5</property>
    <property name="retryInterval">60</property>
    </partnerLinkBinding>
    So What decides whether it is a binding fault or a runtime fault? Is there anyway
    to get this as a runtime fault instead? If not what is the right way to do retry in
    this scenario?
    Any information will be of great help
    Thanks
    Raj

    I believe retry only works when there is a runtime fault. As for testing the process you can explicitly throw runtime exception using throw activity for test purpose.
    Dipal

  • How to bind several Rowrepeaters at runtime ?

    Hi Experts,
    I have a context node with the following structure:
    Tests (coordinality: 0..n, singletone: true)
    Results (coordinality: 0..n, singletone: false)
    I need to bind Results node of each TestsElement to its own RowRepeater at runtime.
    I do not know the quantity of Tests elements because each time it is different.
    I thought that the only solution is to create at runtime needed quantity of RowRepeaters and simply bind their datasources to
    Tests.Results  context path. But it does not work and simple shows me all RowRepeaters with the last Test element Results node data.
    Therefore i think that the only solution is to create all  RowRepeaters and Results nodes for each one of them at runtime and bind them at runtime.
    The structure of the context will look like this:
    Tests (coordinality: 0..n, singletone: true)
    Results0 (coordinality: 0..n, singletone: true)
    Resultsn (coordinality: 0..n, singletone: true)
    I think it will work , but is there any other simpler solution for the problem ?
    Regards,
    Slavik.

    Hi
    Since, during design time you have no idea how many element will be there at user Interface, so only solution is in WebDynpro
    is implement the code at WdDoModifyView at runtime based on the database/data source condition it will automatically render the those number of element .
    Now there are too many solution to achieve this ..[best with code help is here|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/47ce9b90-0201-0010-59b5-f70826824eee?quicklink=index&overridelayout=true] and [Dynamic UI Generation |http://wiki.sdn.sap.com/wiki/display/WDJava/DynamicUIGeneration]
    (here UI context are diffent but logic is same for all the version 7.0 /7.1).
    Best Regards
    Satish Kumar

  • Can not Update/Execute Bind Variable in af:Table or items

    Hi Experts,
    it will be very helpfull if any one can help me regarding following issues.
    I am using JDeveloper/ADF11g . created af:Table in jsx page and want to be executed by passing/assigning Bind Variable as runtime backing bean by any event or during form loading event.
    I had write code as below to execute , it works error free but not execute in af:Table .
    Please HELP me.
      public void mtBindAss() {
        String amDef = "CPS.model.CPSAppModule";
        String config = "CPSAppModuleLocal";
        ApplicationModule am =
          Configuration.createRootApplicationModule(amDef, config);
        ViewObject vo = am.findViewObject("EmpBranchView1");
        // Set the two design time named bind variables
       //vUSERID is Bind variable
        vo.setNamedWhereClauseParam("vUSERID", null);
        vo.setNamedWhereClauseParam("vUSERID", "value");I have tried to execute by this way
        vo.executeQuery();// it returns executed amount of row counted value
        System.out.println("Executed Row"+vo.getRowCount());Also I have tried to execute by this way
        oracle.binding.BindingContainer bc;
        bc = BindingContext.getCurrent().getCurrentBindingsEntry();
        OperationBinding op = bc.getOperationBinding("Execute");
        op.execute();
      }VO query
    SELECT VwEmpbank1.ADDR1,
           VwEmpbank1.BANK_NO,
           VwEmpbank1.BRANCH_NAME,
           VwEmpbank1.ROWID,
           VwEmpbank1.RT_NO,
           VwEmpbank1.USER_ID
    FROM VW_EMPBANK VwEmpbank1
    WHERE USER_ID=:vUSERIDThanks.
    zakir
    =======
    Edited by: Zakir Hossain on May 14, 2009 11:21 AM

    Zakir,
    Some brief comments:
    1). Doing this via the binding layer is the "better" way if you can (instead of instatiating an AM like that). However, you need to create a binding for ExecuteWithParameters, not Execute. If you're not able to specify the actual parameter values in the pagedef, you can also get the parameter map from the operation binding and set the values that way.
    2). If you want the query to execute on page load, you can create an invokeAction binding in the page definition to invoke the ExecuteWithParameters action. Just set the proper refreshCondition.
    Hope this gets you going in the right direction.

  • Best Practice for setting bind variable when application loads

    I am using JDeveloper 11.1.2.3.
    When my application loads, the first unbounded page has a table populated by a named query.
    I would like to set the parameter used by the named query when the page loads, to populate the initial data that is displayed.
    What is the best practice for a solution to this issue?

    user6003393 wrote:
    I am using JDeveloper 11.1.2.3.
    When my application loads, the first unbounded page has a table populated by a named query.
    I would like to set the parameter used by the named query when the page loads, to populate the initial data that is displayed.
    What is the best practice for a solution to this issue?Hi,
    You can set the bind variable on VO by overriding prepareSession() method in Application Module check this http://docs.oracle.com/cd/E37975_01/web.111240/e16182/bcservices.htm#sthref357
    Setting bind variable on runtime http://docs.oracle.com/cd/E37975_01/web.111240/e16182/bcquerying.htm#CHDECJHD
    Zeeshan

  • Bind Variable reuse in GROUP BY queries

    We have several queries that are rather large (in are opinion, that is) and they each have 10 '?' place holders for binding JDBC parameters. These queries also use bind variables in the WHERE and GROUP BY clauses. Eventhough there are 10 bind variable place holders ('?'), there are only 3 distinct values needed.
    So...in TOAD or SQL*Plus, we run the queries and "reuse" the same three bind variables and the query works fine. If we use 10 different bind variables, filled with the 3 values, we get a an error, "not a GROUP BY expression."
    We would like to make these calls as JDBC PreparedStatements and bind the parameters at run time, so that we could take advantage of the statement cache and increase performance. But...since JDBC parameter binding seems to be positional, we seem to be getting 10 different bind variables at runtime in the PreparedStatement call. Is there a way to "reuse" the bind variables that JDBC is binding at runtime?
    Regards,

    Yep...that is what we are doing. We have a work around that is to manually replace the ? with string data and then pass the query in complete. It will work fine for us. I was just checking the alternatives. The query is large, but the offending code is:
    ...( select distinct T3.ptcpt_cd,trunc(new_time(T1.start_dt_gmt, 'GMT', ?)) trade_date,
    sum(decode(T1.sttl_item_num, 10, T1.sttl_item_qnty, 0)) DA_CHARGE_MW,
    sum(decode(T1.sttl_item_num, 10, T1.sttl_item_amt, 0)) DA_CHARGE_AMT,
    sum(decode(T1.sttl_item_num, 30, T1.sttl_item_qnty, 0)) BAL_CHARGE_MW,
    sum(decode(T1.sttl_item_num, 30, T1.sttl_item_amt, 0)) BAL_CHARGE_AMT,
    sum(decode(T1.sttl_item_num, 20, T1.sttl_item_qnty, 0)) DA_CREDIT_MW,
    sum(decode(T1.sttl_item_num, 20, T1.sttl_item_amt, 0)) DA_CREDIT_AMT,
    sum(decode(T1.sttl_item_num, 40, T1.sttl_item_qnty, 0)) BAL_CREDIT_MW,
    sum(decode(T1.sttl_item_num, 40, T1.sttl_item_amt, 0)) BAL_CREDIT_AMT,
    T3.source_cd Source
    from nm_sttl_item_dtl T1, nm_settlement T2, nm_sttl_statement T3
    where trunc(new_time(T1.start_dt_gmt, 'GMT', ?)) between to_date(?,'mm/dd/rrrr') and to_date(?,'mm/dd/rrrr')
    and sttl_item_num in (10, 20, 30, 40)
    and (sttl_item_qnty <> 0 and sttl_item_amt <> 0)
    and T1.sttl_id = T2.sttl_id
    and T2.statement_id = T3.statement_id
    and T3.ptcpt_cd = 'FAC'
    and T3.source_cd = AREA'
    group by T3.ptcpt_cd,trunc(new_time(T1.start_dt_gmt, 'GMT', ?)), T3.source_cd)...

  • Error Message When I Invoke my web services : Exception source is: mscorlib' , Stack Trace :System.Runtime.Serialization.SerializationException: Type 'System.ServiceModel.ExceptionDetail' in Assembly 'System.ServiceModel, Version=4.0.0.0, Culture=neutral,

    Exception source is: mscorlib' , Stack Trace :System.Runtime.Serialization.SerializationException: Type 'System.ServiceModel.ExceptionDetail' in Assembly 'System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' is not marked
    as serializable.
       at System.Runtime.Serialization.FormatterServices.InternalGetSerializableMembers(RuntimeType type)
       at System.Runtime.Serialization.FormatterServices.GetSerializableMembers(Type type, StreamingContext context)
       at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitMemberInfo()
       at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter,
    SerializationBinder binder)
       at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Write(WriteObjectInfo objectInfo, NameInfo memberNameInfo, NameInfo typeNameInfo)
       at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck)
       at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck)
       at System.Runtime.Remoting.Channels.CrossAppDomainSerializer.SerializeObject(Object obj, MemoryStream stm)
       at System.AppDomain.Serialize(Object o)
       at System.AppDomain.MarshalObject(Object o)
       at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG&amp; msg)
       at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
       at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
       at System.Windows.Application.RunDispatcher(Object ignore)
       at System.Windows.Application.RunInternal(Window window)
       at System.Windows.Application.Run(Window window)

    Hi,
    The forum is main about installation problem of .NET Framework. Your problem is out of support in the forum. You should post your thread to the forum:
    https://social.msdn.microsoft.com/Forums/en-US/clr/threads
    Best Wishes!
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a
    href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.

  • How to bind variables to a LOV query

    Hi,
    I have a page with a messageLOVInput field. I have attached an external LOV with it. The query attached to the LOVregion has a bind parameter which should be replaced by the logged in Person's Business Group ID.
    I have done all the required LOV Mappings etc for a normal LOV.
    If I hardcode the business group ID and then run the page, its working fine. But if I want to bind the businessgroup id at runtime, I am getting an error saying "all variables not bound"
    I tried the usual method of calling some initMethod in AM from the CO of the external LOV region, and then calling some initQuery in the VO to set the bind parameter, but this doesn't work.
    How do I bind variables at runtime with the LOV VO ?
    Thanks, in advance !!
    -Debojyoty

    Hi Deb,
    Heres what you gotta do.
    By default the query is going to be executed in the EO . In case of a query without any bind variables this works fine. This is because for LOV EO's one doenst' have to explicitly call the the executequery method. In your case, there is one bind variable that needs to be set, before any query is fired, either implicitly or explicitly else you are going to get Bind variable not set exception.
    1. Define an init query method in your EOImpl.
    public void initQuery(String p_param)
    setWhereClause(null);
    setWhereClauseParams(null);
    setWhereClauseParam(0,p_param);
    2. Define a method for initializing the query. In your AM IMPL for the LOV, recieve the EOIMPL and call the initquery method and pass the parameter that you would to base the query upon.
    3. In the CO for the LOV, call the AMimpl Method defined in step 2.
    Let me know if this works ? If you still have problems, I will post some sample code.
    Rgds,
    Venkatesh
    Message was edited by:
    Venkatesh

  • Can I use a VO with Bind Params as an LOV?

    And if so, how can I specify the values to be used for the Bind Params at runtime?
    I am trying to think outside the box for dependent dynamic lists...
    Thanks.

    A little more info...
    I have tried adding an Action to my pageDef Bindings:
    <action IterBinding="DelegationsWithScopeTypeParamIterator"
    id="ExecuteWithParams1"
    InstanceName="EVCServiceDataControl.DelegationsWithScopeTypeParam"
    DataControl="EVCServiceDataControl" RequiresUpdateModel="true"
    Action="95">
    <NamedData NDName="ScopeTypeIdVar" NDValue="${userState.currentType}"
    NDType="oracle.jbo.domain.Number"/>
    <NamedData NDName="CurUserIdVar"
    NDValue="${sessionScope.userState.currentUserId}"
    NDType="oracle.jbo.domain.Number"/>
    </action>
    And an invokeAction to the Executables:
    <invokeAction id="ReloadScopeList" Binds="ExecuteWithParams1"
    Refresh="prepareModel" RefreshCondition="true"/>
    Now, how do I get ReloadScopeList to do its thing when a user selects a value in one selectOneChoice list so the second selectOneChoice list's iterator will be updated? Am I crazy?
    Thanks,.

  • Dynamic Partnerlink with WSIF HTTP Binding

    Hi,
    I have been trying to change the endpoint location details of my HTTP Binding Partnerlink during runtime / deploy-time. AFAIK, there are two ways to do this.
    1. Deployment Descriptor : Change the "location" property in bpel.xml to point to a different location. Ideally this can be done at deployment using ant or use the Java APIs to change them during runtime. This works for partnerlinks which use a SOAP Binding, but does not work for HTTP Get/Post Bindings.
    2. Using WS-Addressing : Again this works with a SOAP WSDL, but no go with HTTP GET/POST WSDLs.
    Has anybody been able to get dynamic partnerlinks working for non SOAP Partnerlinks?
    Regards,
    DK
    Oracle SOA Suite 10.1.3.3.0
    AIA For Communications 2.0.1

    I get a collection of endpoint url and have created a single dummy WSDL and invoked in a parallel flow within a scope.
    I have created partner reference variable, input and out variable for the service within the scope.
    You can find the code snippet below.
    <bpelx:flowN name="FlowN_1"
    N="count(bpws:getVariableData('UserUpdateRoutingService_OutputVariable','payload','/ns9:UserUpdateProviderInfoCollection/ns9:UserUpdateProviderInfo'))"
    indexVariable="flowIndex">
    <sequence name="Sequence_1">
    <scope name="Scope_1">
    <variables>
    <variable name="InvokeEnterprisePingService_pingUserBySmsId_InputVariable"
    messageType="ns5:EnterprisePingServiceRequestMessage"/>
    <variable name="InvokeEnterprisePingService_pingUserBySmsId_OutputVariable"
    messageType="ns5:EnterprisePingServiceResponseMessage"/>
    <variable name="partnerReference"
    element="wsa:EndpointReference"/>
    </variables>
    <sequence name="Sequence_2">
    <assign name="ClearEndpointEnterprisePingService">
    <copy>
    <from>
    <EndpointReference xmlns="http://schemas.xmlsoap.org/ws/2003/03/addressing"
    xmlns:ns7="http://services.otn.com">
    <Address/>
    </EndpointReference>
    </from>
    <to variable="partnerReference"/>
    </copy>
    </assign>
    <assign name="SetEndpointEnterprisePingService">
    <copy>
    <from expression="bpws:getVariableData('UserUpdateRoutingService_OutputVariable','payload','/ns9:UserUpdateProviderInfoCollection/ns9:UserUpdateProviderInfo[bpws:getVariableData(&quot;flowIndex&quot;)]/ns9:enterprisepingurl') "/>
    <to variable="partnerReference"
    query="/ns7:EndpointReference/ns7:Address"/>
    </copy>
    </assign>
    <assign name="DoPartnerlinkEnterprisePingService">
    <copy>
    <from variable="partnerReference"/>
    <to partnerLink="EnterprisePingService"/>
    </copy>
    </assign>
    <assign name="AssignEnterprisePingServiceInput">
    <copy>
    <from variable="inputVariable" part="payload"
    query="/ns2:updatePersonRequest/ns2:person/ns3:userId/ns4:userIdValue"/>
    <to variable="InvokeEnterprisePingService_pingUserBySmsId_InputVariable"
    part="payload"
    query="/ns6:pingUserBySmsId/ns6:smsUserId"/>
    </copy>
    </assign>
    <invoke name="InvokeEnterprisePingService"
    partnerLink="EnterprisePingService"
    portType="ns5:EnterprisePingService"
    operation="pingUserBySmsId"
    inputVariable="InvokeEnterprisePingService_pingUserBySmsId_InputVariable"
    outputVariable="InvokeEnterprisePingService_pingUserBySmsId_OutputVariable"/>
    </sequence>
    </scope>
    </sequence>
    </bpelx:flowN>

  • What is Dynamic Binding ??

    Can anyone help me in telling what is DYNAMIC BINDING with an exmple!!!!
    Thanks
    Pinto

    dynamic binding means binding at run time.it is used in java for achieving runtime polymorphism.
    e.g
    class A
    int i=15;
    void abc()
    System.out.println("in A");
    class B extends A
    int i=20;
    void abc()
    System.out.println("in B");
    class C
    public static void main(String o[])
    A a=new B();
    System.out.println(a.i);
    System.out.println(a.abc);
    this program outputs as
    15
    in B
    this is because the instance methods are bind dynamically at runtime depending upon the object
    not the reference.instance variables and static methods are bind early at compile time so these depends upon the reference not the object.

  • Getting Error while running Sample Tutorial...

    Hi,
    I am working on samples---tutorials---Select All.
    I created "Movies" tables in our test database.I modified oc4j-ra.xml. When i modified partner link to point to my own database i can see "SelectAllServices.wsdl" got changed. I mean it added "1" to all "movies" string. I manually modified wsddl and deployed.
    But when i run the process i am getting error like
    <2006-02-13 11:28:30,888> <ERROR> <default.collaxa.cube.ws> <Database Adapter::O
    utbound> <oracle.tip.adapter.db.DBInteraction executeOutboundRead> unable to exe
    cute the NamedQuery: SelectAll.Movies.SelectAllServiceSelect
    06/02/13 11:28:30 java.lang.NullPointerException
    06/02/13 11:28:30 at oracle.tip.adapter.db.exceptions.DBResourceException.
    isRetriable(DBResourceException.java:114)
    06/02/13 11:28:30 at oracle.tip.adapter.db.exceptions.DBResourceException.
    outboundReadException(DBResourceException.java:337)
    06/02/13 11:28:30 at oracle.tip.adapter.db.DBInteraction.executeOutboundRe
    ad(DBInteraction.java:274)
    06/02/13 11:28:30 at oracle.tip.adapter.db.DBInteraction.execute(DBInterac
    tion.java:141)
    06/02/13 11:28:30 at oracle.tip.adapter.fw.wsif.jca.WSIFOperation_JCA.exec
    uteRequestResponseOperation(WSIFOperation_JCA.java:469)
    06/02/13 11:28:30 at com.collaxa.cube.ws.WSIFInvocationHandler.invoke(WSIF
    InvocationHandler.java:445)
    06/02/13 11:28:30 at com.collaxa.cube.ws.WSInvocationManager.invoke2(WSInv
    ocationManager.java:310)
    06/02/13 11:28:30 at com.collaxa.cube.ws.WSInvocationManager.invoke(WSInvo
    cationManager.java:184)
    06/02/13 11:28:30 at com.collaxa.cube.engine.ext.wmp.BPELInvokeWMP.__invok
    e(BPELInvokeWMP.java:601)
    06/02/13 11:28:30 at com.collaxa.cube.engine.ext.wmp.BPELInvokeWMP.__execu
    teStatements(BPELInvokeWMP.java:316)
    06/02/13 11:28:30 at com.collaxa.cube.engine.ext.wmp.BPELActivityWMP.perfo
    rm(BPELActivityWMP.java:185)
    06/02/13 11:28:30 at com.collaxa.cube.engine.CubeEngine.performActivity(Cu
    beEngine.java:3398)
    06/02/13 11:28:30 at com.collaxa.cube.engine.CubeEngine.handleWorkItem(Cub
    eEngine.java:1905)
    06/02/13 11:28:30 at com.collaxa.cube.engine.dispatch.message.instance.Per
    formMessageHandler.handleLocal(PerformMessageHandler.java:75)
    06/02/13 11:28:30 at com.collaxa.cube.engine.dispatch.DispatchHelper.handl
    eLocalMessage(DispatchHelper.java:100)
    06/02/13 11:28:30 at com.collaxa.cube.engine.dispatch.DispatchHelper.sendM
    emory(DispatchHelper.java:185)
    06/02/13 11:28:30 at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEng
    ine.java:5410)
    06/02/13 11:28:30 at com.collaxa.cube.engine.CubeEngine.createAndInvoke(Cu
    beEngine.java:1300)
    06/02/13 11:28:30 at com.collaxa.cube.engine.ejb.impl.CubeEngineBean.creat
    eAndInvoke(CubeEngineBean.java:117)
    06/02/13 11:28:30 at com.collaxa.cube.engine.ejb.impl.CubeEngineBean.syncC
    reateAndInvoke(CubeEngineBean.java:146)
    06/02/13 11:28:30 at ICubeEngineLocalBean_StatelessSessionBeanWrapper0.syn
    cCreateAndInvoke(ICubeEngineLocalBean_StatelessSessionBeanWrapper0.java:486)
    06/02/13 11:28:30 at com.collaxa.cube.engine.delivery.DeliveryHandler.init
    ialRequestAnyType(DeliveryHandler.java:493)
    06/02/13 11:28:30 at com.collaxa.cube.engine.delivery.DeliveryHandler.init
    ialRequest(DeliveryHandler.java:426)
    06/02/13 11:28:30 at com.collaxa.cube.engine.delivery.DeliveryHandler.requ
    est(DeliveryHandler.java:133)
    06/02/13 11:28:30 at com.collaxa.cube.ejb.impl.DeliveryBean.request(Delive
    ryBean.java:97)
    06/02/13 11:28:30 at IDeliveryBean_StatelessSessionBeanWrapper22.request(I
    DeliveryBean_StatelessSessionBeanWrapper22.java:288)
    06/02/13 11:28:30 at com.oracle.bpel.client.delivery.DeliveryService.reque
    st(DeliveryService.java:101)
    06/02/13 11:28:30 at com.oracle.bpel.client.delivery.DeliveryService.reque
    st(DeliveryService.java:65)
    06/02/13 11:28:30 at ngDoInitiate.jspService(_ngDoInitiate.java:253)
    06/02/13 11:28:30 at com.orionserver.http.OrionHttpJspPage.service(OrionHt
    tpJspPage.java:56)
    06/02/13 11:28:30 at oracle.jsp.runtimev2.JspPageTable.service(JspPageTabl
    e.java:347)
    06/02/13 11:28:30 at oracle.jsp.runtimev2.JspServlet.internalService(JspSe
    rvlet.java:509)
    06/02/13 11:28:30 at oracle.jsp.runtimev2.JspServlet.service(JspServlet.ja
    va:413)
    06/02/13 11:28:30 at javax.servlet.http.HttpServlet.service(HttpServlet.ja
    va:853)
    06/02/13 11:28:30 at com.evermind.server.http.ServletRequestDispatcher.inv
    oke(ServletRequestDispatcher.java:810)
    06/02/13 11:28:30 at com.evermind.server.http.ServletRequestDispatcher.inc
    lude(ServletRequestDispatcher.java:121)
    06/02/13 11:28:30 at com.evermind.server.http.EvermindPageContext.include(
    EvermindPageContext.java:267)
    06/02/13 11:28:30 at displayProcess.jspService(_displayProcess.java:700)
    06/02/13 11:28:30 at com.orionserver.http.OrionHttpJspPage.service(OrionHt
    tpJspPage.java:56)
    06/02/13 11:28:30 at oracle.jsp.runtimev2.JspPageTable.service(JspPageTabl
    e.java:347)
    06/02/13 11:28:30 at oracle.jsp.runtimev2.JspServlet.internalService(JspSe
    rvlet.java:509)
    06/02/13 11:28:30 at oracle.jsp.runtimev2.JspServlet.service(JspServlet.ja
    va:413)
    06/02/13 11:28:30 at javax.servlet.http.HttpServlet.service(HttpServlet.ja
    va:853)
    06/02/13 11:28:30 at com.evermind.server.http.ServletRequestDispatcher.inv
    oke(ServletRequestDispatcher.java:810)
    06/02/13 11:28:30 at com.evermind.server.http.ServletRequestDispatcher.for
    wardInternal(ServletRequestDispatcher.java:322)
    06/02/13 11:28:30 at com.evermind.server.http.ServletRequestDispatcher.for
    ward(ServletRequestDispatcher.java:220)
    06/02/13 11:28:30 at com.collaxa.cube.fe.DomainFilter.doFilter(DomainFilte
    r.java:152)
    06/02/13 11:28:30 at com.evermind.server.http.ServletRequestDispatcher.inv
    oke(ServletRequestDispatcher.java:649)
    06/02/13 11:28:30 at com.evermind.server.http.ServletRequestDispatcher.for
    wardInternal(ServletRequestDispatcher.java:322)
    06/02/13 11:28:30 at com.evermind.server.http.HttpRequestHandler.processRe
    quest(HttpRequestHandler.java:798)
    06/02/13 11:28:30 at com.evermind.server.http.HttpRequestHandler.run(HttpR
    equestHandler.java:278)
    06/02/13 11:28:30 at com.evermind.server.http.HttpRequestHandler.run(HttpR
    equestHandler.java:120)
    06/02/13 11:28:30 at com.evermind.util.ReleasableResourcePooledExecutor$My
    Worker.run(ReleasableResourcePooledExecutor.java:192)
    06/02/13 11:28:30 at java.lang.Thread.run(Thread.java:534)
    <2006-02-13 11:28:30,920> <ERROR> <default.collaxa.cube.ws> <AdapterFramework::O
    utbound> file:/C:/OraBPELPM_1/integration/orabpel/domains/default/tmp/.bpel_Sele
    ctAll_1.2.jar/SelectAllService.wsdl [ SelectAllService_ptt::SelectAllServiceSele
    ct(SelectAllServiceSelect_inparameters,MoviesCollection) ] - Could not invoke op
    eration 'SelectAllServiceSelect' against the 'Database Adapter' due to:
    ORABPEL-11614
    DBReadInteractionSpec Execute Failed Exception.
    Query name: [SelectAllServiceSelect], Descriptor name: [SelectAll.Movies].
    See root exception for the specific exception. Caused by Exception [TOPLINK-4002
    ] (OracleAS TopLink - 10g (9.0.4.5) (Build 040930)): oracle.toplink.exceptions.D
    atabaseException
    Exception Description: java.sql.SQLException: ORA-00942: table or view does not
    exist
    Internal Exception: java.sql.SQLException: ORA-00942: table or view does not exi
    st
    Error Code: 942.
    <2006-02-13 11:28:30,920> <INFO> <default.collaxa.cube.ws> <AdapterFramework::Ou
    tbound> Change logging level for Logger 'default.collaxa.cube.ws' to DEBUG to se
    e full error stack.
    Please help me.
    Thanks

    Thanks for instant reply.
    <?xml version="1.0" encoding="UTF-8"?>
    <definitions
    name="SelectAllService"
    targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/db/SelectAllService"
    xmlns:tns="http://xmlns.oracle.com/pcbpel/adapter/db/SelectAllService"
    xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
    xmlns:jca="http://xmlns.oracle.com/pcbpel/wsdl/jca/"
    xmlns:pc="http://xmlns.oracle.com/pcbpel/"
    xmlns:top="http://xmlns.oracle.com/pcbpel/adapter/db/top/SelectAll"
    xmlns="http://schemas.xmlsoap.org/wsdl/">
    <types>
    <schema xmlns="http://www.w3.org/2001/XMLSchema">
    <import namespace="http://xmlns.oracle.com/pcbpel/adapter/db/top/SelectAll"
    schemaLocation="Movies_table.xsd"/>
    </schema>
    </types>
    <message name="MoviesCollection_msg">
    <part name="MoviesCollection" element="top:MoviesCollection"/>
    </message>
    <message name="SelectAllServiceSelect_inparameters">
    <part name="SelectAllServiceSelect_inparameters" element="top:SelectAllServiceSelectInputParameters"/>
    </message>
    <message name="Movies_msg">
    <part name="Movies" element="top:Movies"/>
    </message>
    <portType name="SelectAllService_ptt">
    <operation name="SelectAllServiceSelect">
    <input message="tns:SelectAllServiceSelect_inparameters"/>
    <output message="tns:MoviesCollection_msg"/>
    </operation>
    <operation name="queryByExample">
    <input message="tns:Movies_msg"/>
    <output message="tns:MoviesCollection_msg"/>
    </operation>
    </portType>
    <binding name="SelectAllService_binding" type="tns:SelectAllService_ptt">
    <jca:binding />
    <operation name="SelectAllServiceSelect">
    <jca:operation
    InteractionSpec="oracle.tip.adapter.db.DBReadInteractionSpec"
    DescriptorName="SelectAll.Movies"
    QueryName="SelectAllServiceSelect"
    MappingsMetaDataURL="toplink_mappings.xml" />
    </operation>
    <operation name="queryByExample">
    <jca:operation
    InteractionSpec="oracle.tip.adapter.db.DBReadInteractionSpec"
    DescriptorName="SelectAll.Movies"
    IsQueryByExample="true"
    MappingsMetaDataURL="toplink_mappings.xml" />
    <input/>
    </operation>
    </binding>
    <!-- Your runtime connection is declared in
    J2EE_HOME/application-deployments/default/DbAdapter/oc4j-ra.xml
    These 'mcf' properties here are from your design time connection and
    save you from having to edit that file and restart the application server
    if eis/DB/BPELSamples is missing.
    These 'mcf' properties are safe to remove.
    -->
    <service name="SelectAllService">
    <port name="SelectAllService_pt" binding="tns:SelectAllService_binding">
    <jca:address location="eis/DB/BPELSamples"
    UIConnectionName="TestDB"
    ManagedConnectionFactory="oracle.tip.adapter.db.DBManagedConnectionFactory"
    mcf.DriverClassName="oracle.jdbc.driver.OracleDriver"
    mcf.PlatformClassName="oracle.toplink.oraclespecific.Oracle9Platform"
    mcf.ConnectionString="jdbc:oracle:thin:@xxx.xx.xxx.com:1521:develop"
    mcf.UserName="scott"
    mcf.Password="22F7AFE6F6B9672475468EABDDFF8ABDD62D1A19DF561D1E"
    />
    </port>
    </service>
    <plt:partnerLinkType name="SelectAllService_plt" >
    <plt:role name="SelectAllService_role" >
    <plt:portType name="tns:SelectAllService_ptt" />
    </plt:role>
    </plt:partnerLinkType>
    </definitions>
    Thanks
    CMB
    CA USA

Maybe you are looking for