Call the PL/SQL procedure with different parameters?

I use PL/SQL for web development. I have a page of PL/SQL which collects information and returns the user off site with one return url (another PL/SQL procedure).

I have the return procedure with every documented return variable (default null) in order to always take the return. However, there are (reported... cannot reproduce because of the nature of the business) cases where a 404 error is returned because of the incompatibility of parameter.

Is it possible to proceed regardless of the parameters? Someone at - it suggestions?

Thank you!

user2960509 wrote:

My problem is that they sometimes send back of settings that do not match what I expect.

Use the interface "+ flexible +" mod_plsql - see the Oracle® HTTP Server mod_plsql user's Guide for the documented details.

The signature of the procedure parameter is as follows (it is called by mod_plsql using tables of name value pairs):

create or replace procedure Scott.MyWebProc( name_array owa.vc_arr, value_array owa.vc_arr) is
...

In your code, you just browse the berries to get the name values passed query string. You can even filled an associative array in your code (a table indexed by string and no number, where the index string represents the name of param)-this approach can make it pretty easy for the code make reference to a parameter, with little effort on your part to provide an interface to query by name for code to get the value of a parameter name.

To enable the flexible (aka parameter 2) call interface, precede the call to web with an exclamation character. For example

http://my-webserbver.my-domain.com/pls/dad/!scott.mywebproc?name-1=val-1&name-2=val-2..,name-n=val=n

Tags: Database

Similar Questions

  • Call the PL/SQL procedure with in out parameter of OIC clob

    Hello

    For a few days, I am facing a problem. I have to call the pl/sql procedure with colb parameter out. I use c ++ and OIC (don't ask me why :)).

    I use a pl/sql problem test procedure:

    create or replace function Test (longField outside clob) return number is
    Number of result;
    Start
    longField: = 'prefix ';
    Result: = 12;
    Return (result);
    end Test;

    So I do all the stuff with the connection to the DB,

    I prepare the statement: "start: res: = test(:param); end; »
    So I OCIHandleAlloc (m_pCtx-> hpEnv,
    (void *) & m_hpStatement,.
    OCI_HTYPE_STMT,
    0,
    (NULL);
    and
    OCIStmtPrepare (m_hpStatement,
    m_pCtx-> hpErr,
    (...),
    (...),
    OCI_NTV_SYNTAX,
    OCI_DEFAULT);

    Before the binding I prepare parameters. For a clob I devote to the lob Locator:

    OCIDescriptorAlloc ((dvoid *) m_pCtx-> hpEnv, (dvoid *) & m_pLobLocator,)
    (ub4) OCI_DTYPE_LOB (size_t) 0, (dvoid *) 0);
    OCILobEnableBuffering (m_pCtx-> hpContext, m_pCtx-> hpErr, (OCILobLocator *) m_pLobLocator);

    that I bind parameters using OCIBindByName and OCIStmtExecute statement execution.

    I get an error
    ---------------------------
    Microsoft Visual C++
    ---------------------------
    Unhandled exception in... (ORAOCIEI11. (DLL): 0xC0000005: Access Violation.

    My question is: is it possible to call the pl/sql procedure with parameter BEAK clob?
    If Yes, what steps I need to do to succeed?

    Thank you for your response.

    Hello

    Of course, it is possible :)

    Show that you are your piece of code that is binding.
    Are you sure you had correctly the lob descriptor in the call to bind?

  • FND_REQUEST PL/SQL procedure with parameters

    Hi guys

    I created a concurrent program, using the PL/SQL procedure that has 2 parameters. I try to call the concurrent program to help

    v_req_id: = FND_REQUEST. SUBMIT_REQUEST ('INV', 'OMS_POP_INVVALUES_P',

    NULL, SYSDATE, FALSE, l_on_date, l_org_id,.

    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,

    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,

    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,

    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,

    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,

    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,

    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,

    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,

    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,

    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL

    );

    COMMIT;

    However, the competitor programming always fail with

    * Starts * August 26, 2013 14:02:31 error ORACLE 6550 for Cause of FDPSTP: FDPSTP failed due to the ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in the call to 'OMS_POP_INVVALUES_P' ORA-06550: line 1, column 7: PL/SQL: statement ignored

    and I doubt that it is because the database procedure call is not correct.

    I put four parameters with the simultaneous program, as they were with the procedure itself, which are

    p_on_date BY DATE, NUMBER, errbuff OUT VARCHAR2, OUT VARCHAR2 retcode p_org_id

    Help, please

    Kind regards

    REDA

    Okay I solved the problem of

    1. change the order of the parameters in the procedure

    CREATE OR REPLACE PROCEDURE OMS_POP_INVVALUES_P)

    errbuff OUT VARCHAR2, retcode ON NUMBER, p_on_date AS, p_org_id in NUMBER)

    IS

    and by changing the call of simultaneous program as follows

    l_req_id: =.

    fnd_request.submit_request ('INV', 'OMS_POP_INVVALUES_P',

    NULL, SYSDATE, FALSE, l_in_date, l_org_id, CHR (0));

    : SYSTEM. Message_Level: = '25';

    COMMIT;

    After removing all the parameters of the list of program parameters. No need to pass a value for errbuff and retcode, just pass other parameters and put an end to the list of parameters with CHR (0). Hope it's useful for someone else there.

    Kind regards

    REDA

  • Cannot see the table in the p/sql procedure but can in normal sql

    Hello

    using 11.2.0.3

    that sql format

    Select schema_owner. < table > - it works in good sql and pl/sql get message table or view does not exist.

    Other fine tables.

    Y at - it a permission to have reference to the table in the pl/sql procedure rather than sql?

    Thank you

    Hello

    I'm glad you solved the problem!

    Don't forget to mark it as "answered".  It will help others with a similar problem, and it will save time for people answering questions on this forum.

  • Two sequences with different parameters?

    In the first Pro CS6, is it possible to use two sequences with different parameters?

    Yes, no problem.

    You can make as many sequences with different settings as you want.

  • How to call the pl/sql function in application of the ADF

    Hi Experts,

    I need to call the pl/sql function in application of ADF, I have logic written in my AM

    Method:

    public String reportStoredProcedure (locationID customerID, number,
    String tailNum) {}

    CallableStatement st = null;
    String v_sanctioned = null;
    If (locationID! = null & & customerID! = null & & tailNum! = null) {}
    System.out.println (locationID + "" + customerID + "" + tailNum);
    Tail string = "TAIL";
    String result = "N";

    try {}
    String stmt =
    "start XXWFS_SANCTIONS_PKG. CHECK_SANCTION(:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11); end; « ;
    St = getDBTransaction () .createCallableStatement (stmt, 0);
    st.setNull (1, Types.VARCHAR);
    st.setNull (2, Types.NUMERIC);
    st.setObject (3, customerID);
    st.setNull (4, Types.NUMERIC);
    st.setNull (5, Types.NUMERIC);
    st.setObject (6, locationID);
    st.setNull (7, Types.NUMERIC);
    st.setNull (8, Types.NUMERIC);
    st.setObject (9, tail);
    st.setObject (10, tailNum);
    st.setObject (11, result);
    St.Execute ();
    System.out.println ("v_sanctioned in AM:" + v_sanctioned);
    } catch (Exception e) {}
    e.printStackTrace ();
    return "N";
    } {Finally
    If (st! = null)
    try {}
    St.Close ();
    } catch (Exception e1) {}
    E1. PrintStackTrace();
    return "N";
    }
    }
    } else {}
    System.out.println ("v_sanctioned is null");
    v_sanctioned = "N";
    }
    Return v_sanctioned;
    }


    Error:

    java.sql.SQLException: ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in the call to 'CHECK_SANCTION '.
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored

    at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
    at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:206)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
    at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1035)
    at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:191)
    at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:950)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1224)
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3386)
    at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3487)
    at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:3858)
    at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1374)
    at weblogic.jdbc.wrapper.PreparedStatement.execute(PreparedStatement.java:99)
    at model.view.CardAMImpl.reportStoredProcedure(CardAMImpl.java:182)
    at com.emboss.bean.ReadyToPrint.invokeVSanctioned(ReadyToPrint.java:485)
    at com.emboss.bean.ReadyToPrint.PrintingCards(ReadyToPrint.java:434)
    at com.emboss.bean.ReadyToPrint.printCards(ReadyToPrint.java:204)
    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 com.sun.el.parser.AstValue.invoke(AstValue.java:157)
    at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
    at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1259)
    at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183)
    at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
    at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:97)
    to oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$ 1.run(ContextSwitchingComponent.java:90)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:309)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:94)
    at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:91)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:812)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:292)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:177)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
    to weblogic.servlet.internal.StubSecurityHelper$ ServletServiceAction.run (StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:97)
    to org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$ FilterListChain.doFilter (TrinidadFilterImpl.java:420)
    at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
    to org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$ FilterListChain.doFilter (TrinidadFilterImpl.java:420)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    to oracle.security.jps.ee.http.JpsAbsFilter$ 1.run(JpsAbsFilter.java:94)
    at java.security.AccessController.doPrivileged (Native Method)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:414)
    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138)
    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:159)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:330)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.doIt (WebAppServletContext.java:3684)
    to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.run (WebAppServletContext.java:3650)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

    Can someone help me how to call...

    Call it in function, not as a procedure you do

    try {
    String stmt =
    "begin :1 := XXWFS_SANCTIONS_PKG.CHECK_SANCTION(:2,:3,:4,:5,:6,:7,:8,:9,:10,:11,:12); end;";
    st = getDBTransaction().createCallableStatement(stmt, 0);
    st.registerOutParameter(1, Types.VARCHAR);
    st.setNull(2, Types.VARCHAR);
    st.setNull(3, Types.NUMERIC);
    st.setObject(4, customerID);
    st.setNull(5, Types.NUMERIC);
    st.setNull(6, Types.NUMERIC);
    st.setObject(7, locationID);
    st.setNull(8, Types.NUMERIC);
    st.setNull(9, Types.NUMERIC);
    st.setObject(10, tail);
    st.setObject(11, tailNum);
    st.setObject(12, result);
    st.execute();
     = st.getString(1);
    
  • How to call sql loader control file with in the pl/sql procedure

    Hi friends,

    I am doing a project in relation to the transfer data using queues. In the queue, I'll get a data delimited by tabs in the form of CLOB variable/message. I don't want to keep this dat in the oracle table.
    During the updating of the data in the table.

    1. don't want to write data to a file. (You want to access directly after the specific queue).

    2. as the data is in the form of delimited by tabs, I want to use sql loader concept.

    How can I call the ctrl charger sql file with in my pl/sql procedure. When I searched, most forums recommending the external procedure or a Java program.

    Please guide me on this issue. My preferrence is pl sql, but don't know the external procedure. If no other way, I'll try Java.

    I'm using oracle 9.2.0.8.0.

    Thanks in advance,
    Vimal...

    Or SQL * Loader, or external tables are designed to read data from a CLOB stored in the database. They both work on files stored on the file system. If you don't want the data to be written to a file, you have to roll your own parsing code. It is certainly possible. But it will be much less effective than SQL * Loader or external tables. And it is likely to lead to a little more code.

    The simplest possible thing that might work would be to use something like Tom Kyte string tokenization package to read a line in the CLOB, divide the component parts and save the different chips in a significant collection (i.e. an object type or a record type that matches the table definition). Of course, you need manage things like the conversion of strings to numbers or dates, rejecting the lines, writing to log files, etc.

    Justin

  • What is the syntax to call a procedure with named parameters?

    I should know this, but I can't seem to remember how to do it and did not find reference.

    If I have a procedure like this:

    CREATE or REPLACE myProc (inParam1 IN VARCHAR2, inParam2 in NUMBERS)...

    If I want to call this stored proc with a call control and the name of the parameters instead of having to go through position, how should I do that?

    That is to say, I know that I can do: call the myProc('somevalue'1)

    But I want to be able to do something like this: call myproc (inParam1: = "somevalue", inParam2: = 1)-which doesn't seem to work. Anyone know the syntax I'm looking for?

    Thank you!

    I don't know if you are referring to the call to the procedure according to the parameters.

    His

    Call MyProc (inParam1-online "somevalue", inParam2-online 1)

    call MyProc (inParam2-online 1, inParam1-online "somevalue")

    Hopefully it's that you make reference to.

  • Run the statement in a stored procedure with Out parameters and

    Hi all

    I have a stored procedure that calls a select statement. Here it is...

    CREATE OR REPLACE PROCEDURE BLABLA_VIEW_PROCEDURE

    * (BLABLA_KEY IN NUMBER, *)
    XML_OUTPUT ON VARCHAR)
    AS
    BEGIN
    SELECT SYS. XMLTYPE.getStringVal (OBJECT_VALUE) in XML_OUTPUT FROM BLABLA_VIEW WHERE extractValue (OBJECT_VALUE, ' / BLABLA_TYPE/BLABLA_KEY ') = 2876;
    END;

    Is to have both IN and OUT parameters as described above. I am able to compile and run the procedure.

    The problem I want to share with everyone is...
    I want to run the stored procedure together with a single EXEC command.

    I tried different ways using the EXEC command but of no use.

    Could someone help me?
    Thanks in advance.

    Published by: user10763276 on June 3, 2010 15:47

    Please visit the following...

    sudhakar@ORCL>CREATE OR REPLACE PROCEDURE BLABLA_VIEW_PROCEDURE
      2  (BLABLA_KEY IN NUMBER,
      3  XML_OUTPUT OUT VARCHAR)
      4  AS
      5  BEGIN
      6  XML_OUTPUT := BLABLA_KEY || ' and whatever else...';
      7  END;
      8  /
    
    Procedure created.
    
    sudhakar@ORCL>
    sudhakar@ORCL>var XML_OUTPPUT varchar2(100);
    sudhakar@ORCL>exec BLABLA_VIEW_PROCEDURE (9151, :XML_OUTPPUT);
    
    PL/SQL procedure successfully completed.
    
    sudhakar@ORCL>print XML_OUTPPUT;
    
    XML_OUTPPUT
    --------------------------------------------------------------------------------
    9151 and whatever else...
    
    sudhakar@ORCL>
    

    Post tells you...

    var OUTPUT VARCHAR
    exec BLABLA_VIEW_PROCEDURE (9151, :OUTPUT);
    print OUTPUT
    

    VARCHAR is not a valid TYPe to declare. Use VARCHAR2 (nnn) where nnn is a number.
    VR,
    Sudhakar B.

  • How to call the PL/SQL of EntityImpl procedure

    Hello

    I have a page that can create/update visitors. When a new customer is created themselves, a line gets inserted into the database table. I use EO for this feature.

    I need to create lines to two or three other table also when a new line is created in the main table. What is the best practice for this feature?

    The 2 options that I know:

    1 create a trigger on the main table and the appeal of trigger for inserting rows in other tables.

    2. call a PL/SQL of EntityImpl procedure after the permanent data is committed to the table. (If this is the best approach, could you please let me know how to get there)

    See you soon

    AJ

    In fact, Java Mail API is included in WLS and JDev, then you can simply add %MIDDLEWARE_HOME%\Oracle_Home\oracle_common\modules\javax.mail_2.0.0.0_1-4-4.jar to your project.

    Dario

  • The problem with ampersand in the PL/SQL procedure

    Dear Oracle experts,

    Please, help me to understand this case. I have the following code
    V_RESPONSE := UTL_HTTP.GET_RESPONSE (V_REQUEST);
    
          LOOP
             UTL_HTTP.READ_LINE (V_RESPONSE, V_BUFFER, FALSE);
             DATA_OUT := DATA_OUT || V_BUFFER;
          --DBMS_OUTPUT.PUT_LINE (V_BUFFER);
          END LOOP;
    And I'm getting DATA_OUT as
    <?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body><ns:chargeSubscriberResponse xmlns:ns="http://ws.cube.az"><ns:return>&lt;?xml version="1.0" encoding="UTF-8"?>
    &lt;response>
         &lt;retval>-2200003&lt;/retval>
         &lt;retmsg>Invalid Service&lt;/retmsg>
         &lt;quantity>&lt;/quantity>
         &lt;cube-transaction-id>&lt;/cube-transaction-id>
    &lt;/response></ns:return></ns:chargeSubscriberResponse></soapenv:Body></soapenv:Envelope>
    A don't have to '&' in this output. I need to analyze this variable to clear all ampersands. How can I do?

    Just replace does not work... I tried
    PROCEDURE Clean_up_xml (v_xml IN OUT VARCHAR2)
       IS
       BEGIN
          WHILE INSTR (v_xml, 'lt;') > 0
          LOOP
             v_xml :=
                SUBSTR (v_xml, 1, INSTR (v_xml, 'lt;') - 2)
                || SUBSTR (v_xml, INSTR (v_xml, 'lt;') + 4);
          END LOOP;
       END;
    But no luck...

    Does not erase the procedure '& '. How can I disable ampersand in PL/SQL procedure?

    Thanks in advance.

    PS: I know SET DEFINE OFF. But it only works in SQL * MORE.
    SQL> declare
      2
      3    data_out clob :=
      4  '<?xml version="1.0" encoding="UTF-8"?>
      5  <response>
      6       <retval>-2200003</retval>
      7       <retmsg>Invalid Service</retmsg>
      8       <quantity></quantity>
      9       <cube-transaction-id></cube-transaction-id>
     10  > </response>' ;
     11
     12  begin
     13
     14    for rec in (
     15        select r.*
     16        from xmltable(
     17               xmlnamespaces(
     18                 'http://www.w3.org/2003/05/soap-envelope' as "soap"
     19               , 'http://ws.cube.az' as "ns"
     20               )
     21             , '/soap:Envelope/soap:Body/ns:chargeSubscriberResponse'
     22               passing xmlparse(document data_out)
     23               columns xml_return clob path 'ns:return'
     24             ) x
     25           , xmltable('/response'
     26               passing xmlparse(document x.xml_return)
     27               columns retval              number       path 'retval'
     28                     , retmsg              varchar2(30) path 'retmsg'
     29                     , quantity            number       path 'quantity'
     30                     , cube_transaction_id varchar2(30) path 'cube-transaction-id'
     31             ) r
     32    )
     33    loop
     34
     35      dbms_output.put_line('retval = '||rec.retval);
     36      dbms_output.put_line('retmsg = '||rec.retmsg);
     37      dbms_output.put_line('quantity = '||rec.quantity);
     38      dbms_output.put_line('cube_transaction_id = '||rec.cube_transaction_id);
     39
     40    end loop ;
     41
     42  end;
     43  /
    
    retval = -2200003
    retmsg = Invalid Service
    quantity =
    cube_transaction_id = 
    
    PL/SQL procedure successfully completed
     
    
  • Need to call the PL/SQL Package in the group dynamics of approval class that implements IDynamicApprovalGroup

    Hi all

    This is regarding the approval of invoice AP I need in my project where the user selects the users/people approval when creating the invoice based on logic. There may be any number of users who could be part of the approval group.

    Approval users information is stored in a table with a single Bill.

    When the user initiates invoice approval, approval of the Bill should go to all the people/users selected in the invoice.

    I created the dynamic of approval group which is the result of a java class. This java class implements IDynamicApprovalGroup. (what is the oracle Developer Guide).

    I called PL/SQL to java class package to get all the details of users of custom for the current invoice table.

    I used the DriverManager.getConnection method by hard coding (JDBC URL, Username, Pwd) connection details that works perfectly fine.

    But I don't want to hard-code the connection details because it will change in bodies SIT/UAT/PROD.

    Please ask you to guide me if there is no solution for the information of connection without hard coding it.

    Following code used to get the connection details

    try {}

    Class.forName ("oracle.jdbc.driver.OracleDriver");

    System.out.println ("= class loaded");

    }

    catch (ClassNotFoundException ex) {}

    System.out.println ("= class loading error");

    ex.printStackTrace ();

    }

    Fitting out = null;

    CallableStatement cstmt = null;

    Try

    {

    connection = DriverManager.getConnection ("jdbc:oracle:thin:@xxhostname:1521/SID", "FUSION", "*");

    Connection = GetConnection ();

    System.out.println ("= connection =" + connection);

    prepare the call

    cstmt = connection.prepareCall ("{call XX_AP_INV_DYN_APPROVAL_PKG. {GET_GROUP_PARTICIPANTS (?,?)} ») ;

    cstmt.setString (1, '12345');   ID on invoice

    Exit of the register

    cstmt.registerOutParameter (2, java.sql.Types.VARCHAR);

    Call the stored procedure

    cstmt. Execute();

    System.out.println ("= procedure being executed");

    approvalGroupMembers = cstmt.getString (2).split("#");

    System.out.println ("= output:" + cstmt.getString (2));

    }

    catch (Exception ex) {}

    ex.printStackTrace ();

    }

    Finally

    {

    Try

    {

    If (cstmt! = null)

    close the callable statement

    {

    cstmt. Close();

    cstmt = null;

    }

    System.out.println ("= stmt closed");

    }

    catch (SQLException ex)

    {

    System.out.println ("= stmt close err");

    ex.printStackTrace ();

    }

    Try

    {

    If (connection! = null)

    close the connection

    {

    Connection.Close;

    connection = null;

    }

    System.out.println ("= closed conn");

    }

    catch (SQLException ex)

    {

    System.out.println ("= Close conn err");

    ex.printStackTrace ();

    }

    }

    Thank you

    Dipak.

    HI Dembélé - you should be able to call the provider database from the java class. Documentation is here. However, you need to specify the name of the data provider that is the same in all environments. Do you know what it is? If it's not I'll take a look and get back to you.

    __

    Peter Maurer

    Relationship with the developers of Applications in fusion

    https://blogs.Oracle.com/fadevrel/

  • Call the PL/SQL shell script

    Hi all

    I've seen several links and options for calling a PL/SQL shell script. I was wondering if there is something like DBMS_SCHEDULER. CREATE_PROGRAM-> executable that calls an external program in 11 GR 2.

    Here's what I have to. I have 11 GR 2 database with Dataguard. I have START triggering who begins a DBMS_SERVICE when the role becomes PRIMARY. In the same instance, I would stop the VIP on the former primary database and start the VIP on the new primary database.

    Thanks for the advice and assistance.

    Jan S.

    The URL below links to ask Tom. Inside, he talks about creating a Java procedure in your database that allows you to execute commands from the host OS (PL/SQL calls the proc of Java that runs the host command). There are several ways to run the OS commands, but this one is very flexible. I needed to use it for a task that I have who didn't fit one of the other methods very well.

    http://asktom.Oracle.com/pls/Apex/f?p=100:11:0:no:P11_QUESTION_ID:3069633370832

  • Call the file sql plsql

    Hello
    I'm stuck for several days in this issue. Hope someone help me.

    I'm using Oracle 11.

    I am writing a utility to purge the data from the database based on certain criteria.
    We do not have physical (actual) the partitions present on our system (since we do not use Enterprise edition).
    We have 57 paintings representing 57 partitions. Then, we create a view of all of these 57 tables-

    CREATE or REPLACE VIEW MY_VIEW AS
    Select [column_names] from table1
    UNION ALL
    Select [column_names] in table2
    UNION ALL
    Select [column_names] in table 3
    UNION ALL
    :
    :
    :
    Select [column_names] of table57
    ;

    This superior query is saved in the 'body' of user_views.

    Now when a user wants to delete a partition-
    -I read the body of the request in the .sql file.
    -Edit the .sql file that is, remove the unwanted ' select * from many '
    -Loss of vision.
    -Recreate the view from the edited .sql file.


    The question is in the creation of the view on the fly of the procedure-
    -I'm not EXECUTE IMMEDIATE 'CREATE VIEW... ' and ' DBMS_SQL. PARSE' the request body exceeds 32,767 characters.


    So I chose the option of filing to write. In the file, I write the query VIEW and then I want to create the view from this file.

    Now, I'm not able to call the .sql that contains
    CREATE OR REPLACE VIEW MYVIEW AS
    Select...
    UNION ALL
    Select...
    :
    :
    Select...

    Length of character of this file is about 90000.



    Please guide me in this issue.
    Any new idea to manage very large display in the long term is also welcome...


    Thanks in advance
    Micheline
    ARGE view at run time is also welcome...


    Thanks in advance
    Micheline

    When you use DBMS_SQL, the declaration must not end with a semicolon, or you will get ora - 911.

    ---------
    Sybrand Bakker
    Senior Oracle DBA

  • How do I call the interactive report procedure?

    Hello
    Is possible that call the procedure in an interactive report on the APEX?
    Because
    in the source of the region, he asked only the sql statement so I'm confused and I don't know how to call procedure interactive report?

    Published by: esra aktas on 12.May.2011 11:04

    Published by: esra aktas on 12.May.2011 12:05

    And your procedure returns the data? Why you don't run in an area of pl/sql?

    Or better yet, a page with two 2 areas of installation

    Region one is of html with your controls to display, and then select the procedure to run from a selection list. When your selection list returns and have a running process that takes this value, select the code you want on your table and he published on a page element.

    second region would be a region of sql report, which uses a function returns sql to select necessary sql, using the code met at step 1...

    Thank you

    Tony Miller
    Webster, TX

    On the road of life... He has "windshield", and there are "bugs".
    (splat!)
    "Squeegees wanted."

    If you answer this question, please mark the thread as closed and give points where won...

Maybe you are looking for

  • Thunderbird won't allow 2 different addresses with the same user name

    I have a website ( www.pcxt-micro.com ) and I have 2 two addresses: 1 [email protected] (username: pcxtmicro) and 2. [email protected] (username: pcxtmicro). Problem is that I had no problem with the above configuration (using Eudora7), bu

  • Cards SDHC in Libretto U100

    Hi I have just become the proud owner of a Libretto U100. I have a number of SDHC cards 4 GB/8 GB/16 GB. These do not seem to be recognized by the SD card reader in the U100. I installed Microsoft Hotfix:WindowsXP-KB934428-v3 - x 86 and cards have be

  • Photosmart 7520: Photosmart 7520 and cartridge 564XL

    My documentation of the printer, the output of SureSupply and 564XL box (black) cartridge all indicate that the 564XL black cartridge is compatible with my printer Photosmart 7520.   I took out the cartridge configuration and does not have the XL car

  • problem with a block of memory in labview 2009

    Hi all I have "ERROR: MapLib:979 - LUT4 symbol" during the compilation process (lots of errors like this), and I discovered that the reason of my problem is block of MEMORY. To be sure that the problem is in this block, I did a very simple project in

  • I broke my (computer desktop m9351 Pavilion) wireless - 2.4 GHz receiver

    Hello I can't find a replacement for, other than to buy a combination of mouse/receiver, which is expensive. HP parts are of no use at all. Does anyone know if a generic 2.4 GHz receiver would work? Or where to find an original HP one? The mouse/rece