Call WS from stored procedure (Oracle)

Hi All
I have scenario: JDBC - XI - RFC. It works fine.
Now I want to change it to SOAP - XI - RFC.
I can take wsdl url in Sender Agreement.
I can test it from Web Services Navigator - it is ok.
Can I send message from Oracle using soap_api? Give me a sample plz
Regards,
Andrey.

you need a custom application which can read DB and send the data to XI through exposed webservice.
The custom application can be implemented in any language such as JAVA, C/C++, NET etc..........

Similar Messages

  • "table type" result from stored procedure (Oracle 10g) for physical service

    Hello,
    I'm trying to create a physical service based on a stored procedure which returns a table type like this:
    SQL
    -- create table
    create table myTable ( "col1" VARCHAR2(250) not null enable, "filtercol1" VARCHAR2(250), "filtercol2" VARCHAR2(250), "sortcol1" VARCHAR2(250), "sortcol2" VARCHAR2(250), "sortcol3" VARCHAR2(250))
    -- create return type
    create or replace type myResultType as table of varchar2(250);
    -- create function
    create or replace function getResult(param1 in varchar2, param2 in varchar2, orderby in varchar2) return myResultType as
    query_str VARCHAR2(1000);
    myResult myResultType;
    begin
    query_str := 'select m.col1 from myTable m where m.filtercol1 like :param1 and m.filtercol2 like :param2 order by ' || orderby;
    execute immediate query_str bulk collect into myResult using param1, param2;
    return myResult;
    end getResult;
    The wizard for creating the physical service complains that it can't find the return type and I have to create a schema by myself. How should it look like? I can't find a sample in the documentation.
    Thanks for any help,
    Guido

    Ok, now the wizard produces something like this:
    (::pragma function <f:function xmlns:f="urn:annotations.ld.bea.com" visibility="protected" kind="library" isPrimary="false" nativeName="GETRESULT" nativeLevel2Container="MY_SCHEMA" style="storedProcedure">
    <nonCacheable/>
    <params xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdt="http://www.w3.org/2004/07/xpath-datatypes" xmlns:pn1="ld:physical/SQLServices/MY_TMP_TABLE" >
    <param name="RETURN_VALUE" kind="return" xqueryType="pn1:MY_TMP_TABLE" nativeTypeCode="0" nativeType="RowSet"/>
    <param name="RETURN_VALUE" kind="out" xqueryType="pn1:MY_TMP_TABLE" nativeTypeCode="0" nativeType="RowSet"/>
    <param name="PARAM1" kind="in" xqueryType="xs:string" nativeTypeCode="12" nativeType="VARCHAR2"/>
    <param name="PARAM2" kind="in" xqueryType="xs:string" nativeTypeCode="12" nativeType="VARCHAR2"/>
    <param name="ORDERBY" kind="in" xqueryType="xs:string" nativeTypeCode="12" nativeType="VARCHAR2"/>
    </params>
    </f:function>::)
    declare procedure f1:GETRESULT($PARAM1 as xs:string, $PARAM2 as xs:string, $ORDERBY as xs:string) as schema-element(t1:GETRESULT) external;
    Then WorkSpace Studio complains about: "... error: cos-element-consistent: Type of 'RETURN_VALUE' is inconsistent with another element with the same name in this content model. "
    If I rename one RETURN_VALUE to RETURN_VALUE1 (the param name and in the schema file) the error is gone, but if I try to test the method I get:
    com.bea.dsp.das.exception.DASException: weblogic.xml.query.exceptions.XQuerySagaException: {bea-err}UPD003: Update failure: mixed outcome, update error dispatched (updateid=SAGA_596ba32b1ff8d8a4:181f0b20:11f92ed2529:-7fe2): java.lang.RuntimeException: Konflikt bei Parametertyp
         at com.bea.dsp.das.ejb.EJBClient.invokeOperation(EJBClient.java:160)
         at com.bea.dsp.das.DataAccessServiceImpl.invokeOperation(DataAccessServiceImpl.java:171)
         at com.bea.dsp.das.DataAccessServiceImpl.invoke(DataAccessServiceImpl.java:122)
         at com.bea.dsp.ide.xquery.views.test.QueryExecutor.invokeFunctionOrProcedure(QueryExecutor.java:121)
         at com.bea.dsp.ide.xquery.views.test.XQueryTestViewContent.getFunctionExecutionResult(XQueryTestView.java:1006)
         at com.bea.dsp.ide.xquery.views.test.XQueryTestViewContent.executeFunction(XQueryTestView.java:1134)
         at com.bea.dsp.ide.xquery.views.test.XQueryTestViewContent.widgetSelectedImpl(XQueryTestView.java:1807)
         at com.bea.dsp.ide.xquery.views.test.XQueryTestViewContent.access$300(XQueryTestView.java:159)
         at com.bea.dsp.ide.xquery.views.test.XQueryTestViewContent$3.run(XQueryTestView.java:1535)
         at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
         at com.bea.dsp.ide.xquery.views.test.XQueryTestViewContent.widgetSelectedBusy(XQueryTestView.java:1538)
         at com.bea.dsp.ide.xquery.views.test.XQueryTestViewContent.widgetSelected(XQueryTestView.java:1500)
         at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90)
         at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
         at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
         at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)
         at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)
         at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1930)
         at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1894)
         at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:422)
         at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
         at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95)
         at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
         at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
         at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
         at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
         at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
         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:585)
         at org.eclipse.core.launcher.Main.invokeFramework(Main.java:339)
         at org.eclipse.core.launcher.Main.basicRun(Main.java:283)
         at org.eclipse.core.launcher.Main.run(Main.java:984)
         at org.eclipse.core.launcher.Main.eclipse_main(Main.java:959)
         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:585)
         at com.m7.installer.util.NitroxMain$1.run(NitroxMain.java:39)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    "Konflikt bei Parametertyp" means something like: parameter type conflict
    Best regards,
    Guido

  • Calling DTS package from Stored Procedure

    I am getting error calling DTS package from CF.
    So i want to call DTS package from SQL Server Stored
    Procedure.
    DTS package create text file. So no need of input or output
    parameter.
    What is the syntax?.
    thanks for ur help.

    Ted Kruger explains how this can be done in his blog post
    Run SSIS Package from Stored Procedure
    For every expert, there is an equal and opposite expert. - Becker's Law
    My blog

  • Calling PL/SQL stored procedure from JSP tag

    Hello,
    I need to call a PL/SQL procedure from a JSP tag , I donot want to use any Bean to call the PL/SQL procedure. How would I call PL/SQL stored procedure from within JSP using JSP tag library, need some code.
    Thank you
    Syed

    need to call a PL/SQL procedure from a JSP tag , I donot want to use any Bean to call the PL/SQL procedure. How would I call PL/SQL stored procedure from within JSP using JSP tag library, need some code.
    regards
    Indira Rani Bandi

  • How to generate a report from stored procedure

    I would like to generate a report from stored procedure.
    I used to work on sql server. this can be done as easy as put a select statement at the end of stored procedure.
    The resule can be displayed on the development IDE, like sql developer or consume by Java JDBC client.
    is there equivalent way to do this in Oracle stored procedure?

    Hi,
    What type of report you are looking..for.. ??
    As you said that "I used to work on sql server. this can be done as easy as put a select statement at the end of stored procedure. "
    When you execute it will return the result set and you will display directly on the FrontEnd.. Is my Understanding is correct Up to here.
    See, In oracle you have call some custom stored procedures as you did in SQL Sever, but you have return the Results Sets, with help of Out put paramter, Either Cursors or Varrays..
    or Else you can generate the Html reports based on your requirement, HTML can be used in the stored procedures of Oracle which will generate for your, you need to code it.
    I could not able get the relevant link for your reference.
    I will get back to you on this.
    - Pavan Kumar N

  • SQLException: Cursor is closed while calling a java stored procedure

    Hi,
    I got the following error when trying to read from a cursor of a java stored procedure:
    java.sql.SQLException: Cursor is closed
    The java procedure is stored in the database and wrapped by a sql call. Then another java class executes the sql call.
    The stored procedure looks like this:
    import java.io.Reader; import java.security.MessageDigest; import java.sql.*; import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.List; import oracle.jdbc.OracleCallableStatement; import oracle.jdbc.OracleConnection; public class test { static Connection conn = null; static String username = null; static String password = null; static Integer userid  = null; public static void main(String args[]) throws Exception {     username = "keller";     password = "945435";     login(username, password); }       public static String login(String in_username, String in_password) {     String access = null;     String password = null;         try {             DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());  // Non OracleVM             System.out.print("Verbindung wird initialisiert... ");             conn =         //DriverManager.getConnection("jdbc:default:connection:");           //conn.setAutoCommit(false);             DriverManager.getConnection("jdbc:oracle:thin:@[...]:1521:[...]","[...]","[...]");             System.out.println("OK");                         System.out.print("Logindaten werden ueberprueft... ");             String sql = "SELECT matrikelnr, password FROM student WHERE name = ?";             PreparedStatement pstmt = conn.prepareStatement(sql);             pstmt.setString(1, in_username);             ResultSet rset = pstmt.executeQuery();             while (rset.next())             {             userid = rset.getInt(1);                 password = rset.getString(2);             }             access = "student";                         pstmt = conn.prepareStatement(sql);             if (password == null) {             sql = "SELECT dozentnr, password FROM dozent WHERE name = ?";                 pstmt = conn.prepareStatement(sql);                 pstmt.setString(1, in_username);                 rset = pstmt.executeQuery();                 while (rset.next())                 {             userid = rset.getInt(1);                     password = rset.getString(2);                                     }                 pstmt = conn.prepareStatement(sql);                 if (password == null) {                   throw new SQLException("User nicht gefunden!");                 }                 access = "dozent";             }             //rset.close(); // Resultset schließen             //pstmt.close(); // Statement schließen                         // MD5 Hash vergleichen             MessageDigest md5 = MessageDigest.getInstance("MD5");             md5.reset();             md5.update(in_password.getBytes());             byte[] result = md5.digest();             StringBuffer hexString = new StringBuffer();             for (int i=0; i<result.length; i++) {               if(result[i] <= 15 && result[i] >= 0){                 hexString.append("0");               }               hexString.append(Integer.toHexString(0xFF & result));
    if (password != null) {
    if (password.equals(hexString.toString())) {
    System.out.println("OK");
    } else {
    throw new Exception("Falsches Passwort!");
    catch(SQLException e) {
    System.err.println("SQL Fehler!");
    System.err.println(e.getMessage());
    catch(Exception e) {
    System.err.println("Fehler!");
    System.err.println(e.getMessage());
    return access;
    public static void getLeistungsschein(int matrikelnr, ResultSet[] rout)
    ResultSet rs = null;
    try
    System.out.print("Berechtigung ueberpruefen... ");
    if (userid != matrikelnr)
    throw new Exception("Zugriff verweigert, keine Berechtigung!");
    int mnr = matrikelnr;
    ((OracleConnection)conn).setCreateStatementAsRefCursor(true);
    PreparedStatement ps = conn.prepareStatement("select bezeichnung, note from klausur inner join leistungsschein on klausur.KLAUSURNR=leistungsschein.KLAUSURNR where matrikelnr= ?");
    ps.setInt(1, mnr);
    rs = (ResultSet)ps.executeQuery();
    rout[0]= rs;
    catch(SQLException e) {
    System.err.println("Fehler!");
    System.err.println(e.getMessage());
    catch(Exception e) {
    System.err.println("Fehler!");
    System.err.println(e.getMessage());
    The sql call:
    create or replace
    procedure pgetleistungsschein(matrikelnr in number, cur OUT refcurpkg.refcur_t) is
    language java name 'Klausurverwaltung.getLeistungsschein(int, java.sql.ResultSet[])';
    And finally the wrapper is called by another java programm, see this:
    import java.sql.*;
    import java.util.ArrayList;
    import java.util.List;
    import oracle.jdbc.OracleCallableStatement;
    import oracle.jdbc.OracleResultSet;
    import oracle.jdbc.OracleTypes;
    public class cursortest {
    public static void main(String[] args) {
    try{
    //-- Oracle Treiber laden
    Class.forName( "oracle.jdbc.driver.OracleDriver" );
    Connection c = DriverManager.getConnection( "jdbc:oracle:thin:@sligo.fh-trier.de:1521:ubuntu", "dbsem_java","javajava");
    CallableStatement stmt = null;
    ResultSet rs1 = null;
    int matrnr = 945098;
    // Call PLSQL Stored Procedure
    stmt = (CallableStatement)c.prepareCall("{ call ? := getklausuren(?) }");
    stmt.setInt(2, matrnr);
    // 2nd parameter is OUT paremeter
    stmt.registerOutParameter(1, OracleTypes.CURSOR);
    // Execute the callable statement
    stmt.execute();
    //Cursor in ResultSet einlesen
    rs1 = ((OracleCallableStatement)stmt).getCursor(1);
    ResultSetMetaData rsmd = rs1.getMetaData();
    int anzSpalten = rsmd.getColumnCount();
    List<String[]> zeilen = new ArrayList<String[]>();
    while(rs1.next())
    String[] zeile = new String[anzSpalten];
    for (int i=1; i<=anzSpalten; i++)
    zeile[i-1]=rs1.getString(i);
    zeilen.add(zeile);
    String[][] array_angeb_klaus = (String[][])zeilen.toArray(new String[zeilen.size()][anzSpalten]);
    //**** ENDE
    rs1.close();
    stmt.close();
    //c.close();
    catch (SQLException e){
    System.out.println(e);
    catch (ClassNotFoundException f){
    System.out.println(f);

    On top of what jschell says, this just looks wrong in terms of how Oracle's internal Java works as well.
    [Have a look here |http://www.oracle.com/technology/sample_code/tech/java/codesnippet/jdbc/refcur/index.html] (unless things have changed significantly over the past few years for Oracle Java).
    Is the db you are querying a different one to the one this Java is stored in?

  • How to call PL-SQL/stored procedure in Creator

    Anybody can tell how to call PL-SQL/Stored procedures inside creator...

    Hi!!!
    You can see this topic http://forum.sun.com/jive/thread.jspa?threadID=106046
    There is how to call oracle stored procedures. Also I put a lot of links in these topic doing reference stored procedures. I have one that it tells specially how to call oracle stored procedures from java, is in spanish but you can understand the code.;-)
    http://yoprogramador.vampisol.com/index.php?title=pl_sql_oracle_desde_java&more=1&c=1&tb=1&pb=1
    Byeee

  • Urgent: unable to call a plsql stored procedure with a struts data action

    Hello ALL,
    I'm trying to call a plsql stored procedure within a struts DataAction,
    The scenario is:
    When a user a click on a button, then it should call a specific stored procedure,,
    I create struts data action a class to handle the event which is to call the procedure
    Here is my code:
    public class RequestAction extends DataForwardAction
    public void onCall(DataActionContext ctx)
    String amDef = "model.AppModule";
    String config = "AppModuleLocal";
    ApplicationModule am =
    Configuration.createRootApplicationModule(amDef, config);
    try{
    AppModuleImpl myAm = (AppModuleImpl)am;
    DBTransaction tr = (DBTransaction) myAm.getTransaction();
    CallableStatement stmt = tr.createCallableStatement
    ("begin pkg_test.test; end;", DBTransaction.DEFAULT);
    stmt.execute();
    stmt.close();
    tr.commit();
    catch(Exception e){System.out.println(e.getMessage());}
    Configuration.releaseRootApplicationModule(am,true);
    but when I ran the application and click on the button, I got the following Exception:
    04/07/08 00:45:50 ORA-06550: line 1, column 7:
    PLS-00201: identifier 'PKG_TEST.TEST' must be declared
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    It seems that the DBTransaction object unable to see the stored procedure,
    Am I do something wrong or miss something???
    I've checked the examples on the OTN HOW TO, and searched in the JDeveloper Forum but unable to find an answer,
    Please anyone can help???
    Thanks a lot
    With Regards,
    Hayat

    Here's an example application that illustrates how to do this. I haven't had a chance to writeup a little paper to go with it yet, but will as soon as I have a chance.
    http://otn.oracle.com/products/jdev/tips/muench/storedproc/CallStoredProc.zip
    See the "callStoredProcedure" method in the application module in the Model project.
    See the "callStoredProcedure" method binding in the binding container of the "CallStoredProcedure" data page.
    Notice the name "event_callStoredProcedure" of the (Call Stored Procedure) button on the CallStoredProcedure.jsp page which triggers the declaratively invocation of the method.
    You could also call the method from code in a custom data action.
    The code example illustrates how to create your own JDBC prepared statement for invoking the stored procedure, and doing it in a way that is efficient by keeping the prepared statement around across invocations.

  • Ora-06550 returning data from Stored Procedure and Entity Data Model

    Hi.
    I'm creating an application that uses a WCF Service to return data. I also created a proyect with the EDMX design and mapped most of my DBModel to a classes context. I have added some of the procedures as well. One of them receive some parameters and return a Sys_RefCursor, that is populated according to the parameters.
    I have declared the "<add >" tags in the Web.Config and imported the function of the Procedure. When I call the Asyncronous function I get different exceptions:
    1. If I call the function, with all of the parameters i get:
    Oracle.DataAccess.Client.OracleException: ORA-06550: línea 1, columna 8:
    PLS-00306: número o tipos de argumentos erróneos al llamar a
    'SP_HECHOSJURITER'
    ORA-06550: línea 1, columna 8:
    (wrong number or types of arguments in call to 'SP_HECHOSJURITER')
    2. If i just set 1 parameter in the SP, returning the same type of data, I get:
    Error al recibir la respuesta HTTP a
    http://localhost/Procalculo.CGFM.SIGOC.DatosServices/ServiceDatos.svc.
    (failed to receive http response. error 12152)
    3. If I don't set any parameters in the procedure, it works fine, and return correct data.
    It exclusively happen with one entity.
    Any clue?
    I appreciate any help.

    When you return result sets from stored procedures to Entity Framework, you are very likely using implicit result sets. Implicit result sets don't need to be declared as a parameter in code, only in the <add> tags to define the metadata in the .NET config file.
    For example, in the EF Oracle By Example, you'll see that the stored procedure in the function import has three parameters, but only two are declared in the code. The third one was defined in the config file.
    http://download.oracle.com/oll/obe/EntityFrameworkOBE/EntityFrameworkOBE.htm

  • Shell script execution from stored procedure

    I am working on a project thallt requires a shell script be executed upon the execution of a stored procedure with Oracle 10g. I have researched the matter, but there does not seem to be much out there on how to execute lines of UNIX commands by use of a stored procedure. If anybody has ever gotten this to work, any information would be appreciated. If the task is impossible, let me know, I just could not confirm that it was not something that could be done.

    A combination of things can help you out here - none of which are easy or particularily secure.
    1) From plain PL/SQL, you can call 'external procedures'. That is basically a DLL or .so that the listener can load on demand, and that external procedure (EXTPROC) can run whatever you need from the C program. C can, in turn, call a shell.
    This is fairly well documented, but be aware that 1/2 of the info is in the PL/SQL docco and the other half in the Networking docco.
    A fair bit of info is available in metalink as well - if you have access, simply search on extproc.
    2) You can call a Java stored procedure which in turn has hooks to the outside world. That will probably require a PL/SQL to Java wrapper to make it available in your environment. Oracle has been using this one successfully for a while.
    3) Write the script using UTL_FILE and have a daemon look for, and execute, the script.
    4) Since you are using 10g, use the new job scheduler. It has excellent capability to interact with the OS, and it is available as a PL/SQL package (DBMS_SCHEDULER). I find the interface a bit heavy, but that could be wrapped by a library tailored to your specific needs.
    Let us know what you decide to do in the end (and why) - it is an interesting topic.

  • Out of memory error when calling a java stored procedure multiple times

    Trying to run a PL/SQL loop calling a java stored procedure, I get the following error:
    "ORA-04030: out of process memory when trying to allocate 262188 byte callheap,ioc_allocate free)"
    (with some other error lines).
    The stored procedure does two major things:
    1) Open a socket to communicate with a server, of which it queries some data.
    2) Use JDBC (with the default DB connection it has, as a stored procedure) to write the results to a table.
    All socket connections, statements, etc. are properly closed and all memory should be garbage collected between each call.
    Can anyone offer an explanation or additional checks to make? I'm quite sure the code isn't causing the problem, since I've tried running it as a stand alone application (outside of Oracle) and didn't have any problems.
    Thanks.

    Hi,
    Verify that the database parameters are set correctly.
    EA

  • Error Calling a simple stored procedure

    Hello. I'm using the code below to call a simple stored procedure which returns a number. Why does it throw the exception (Also below)?
    Thank you,
    Alek
    =======================
    Code:
    import java.sql.*;
    public class Connect
    public static void main (String[] args)
    Connection conn = null;
    //CallableStatement stmtMySQL = null;
    long local_callkey = 0;
    try
    Class.forName("com.mysql.jdbc.Driver");
    String userName = "abc";
    String password = "def";
    String url = "jdbc:mysql://mysqlserver/sxma";
    Class.forName ("com.mysql.jdbc.Driver").newInstance ();
    conn = DriverManager.getConnection (url, userName, password);
    System.out.println ("Database connection established");
    String theMySQLCall = "{?=call sxma.sp_getnumber()}";
    CallableStatement stmtMySQL = conn.prepareCall(theMySQLCall);
    stmtMySQL.registerOutParameter(1, Types.INTEGER);
    stmtMySQL.execute();
    int res = stmtMySQL.getInt(1);
    if(res!=0)
    throw new Exception("MySQL Query exception return code: " + String.valueOf(res) + ")");
    else
    local_callkey = stmtMySQL.getLong(1);
    System.out.println("Local key is: " + local_callkey);
    catch (Exception e)
    System.err.println ("Cannot connect to database server!");
    e.printStackTrace();
    finally
    if (conn != null)
    try
    conn.close ();
    System.out.println ("Database connection terminated");
    catch (Exception e) { /* ignore close errors */ }
    ================
    Exception:
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
         at java.lang.String.charAt(String.java:444)
         at com.mysql.jdbc.StringUtils.indexOfIgnoreCaseRespectQuotes(StringUtils.java:951)
         at com.mysql.jdbc.DatabaseMetaData.getCallStmtParameterTypes(DatabaseMetaData.java:1277)
         at com.mysql.jdbc.DatabaseMetaData.getProcedureColumns(DatabaseMetaData.java:3640)
         at com.mysql.jdbc.CallableStatement.determineParameterTypes(CallableStatement.java:506)
         at com.mysql.jdbc.CallableStatement.<init>(CallableStatement.java:401)
         at com.mysql.jdbc.Connection.parseCallableStatement(Connection.java:4072)
         at com.mysql.jdbc.Connection.prepareCall(Connection.java:4146)
         at com.mysql.jdbc.Connection.prepareCall(Connection.java:4120)
         at Connect.main(Connect.java:20)
    Thank you for your help

    Well, there's certainly something about that line that it doesn't like.
    I'm not really familiar enough with MySQL to remote-debug this one for you, but it seems to be dying while trying to reconcile that call to its metadata for the sproc. Check the sproc declaration -does it return a single out value? Or does it have a single out value in the parameter list (not the same thing, I think) ? And so on.
    Also, with the amended call that I provided is the failing stack trace identical, or slightly different? If different, could you post that too please?
    Finally, do you have a known good sproc call that you can sanity check against? Perhaps take one of the examples from the MySQL site and check that that will work with their reference code?

  • Response message from stored procedure

    I have created  the stored procedure(oracle)
    CREATE OR REPLACE PROCEDURE UPDATE_INSERT(sHID IN VARCHAR2,sZNAME IN VARCHAR2,sZDATE IN DATE)IS
    I NUMBER;
    BEGIN
    SELECT COUNT(HID) INTO I FROM ZSO_H WHERE HID = sHID;
    IF I > 0
    THEN
    begin
    DELETE FROM ZSO_H WHERE HID = sHID;
    end;
    END IF;
    INSERT INTO zso_h VALUES(sHID,sZNAME,sZDATE);
    commit;
    END UPDATE_INSERT;
    It's proxy to jdbc synchronous scenario.
    I can see data saved in the table, and sucessfull in communication channel monitoring.
    but sxmn_moni, get error,(SAP system)
    <SAP:AdditionalText>com.sap.aii.af.ra.ms.api.DeliveryException</SAP:AdditionalText>
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack />
      <SAP:Retry>M</SAP:Retry>
    sxmb_moni in XI
      <?xml version="1.0" encoding="utf-8" ?>
    - <ns0:t002_ora_response xmlns:ns0="http://topfine.com/proxy">
      <st3_response />
      <st3_response />
      <st3_response />
      <st3_response />
      <st3_response />
      </ns0:t002_ora_response>
    but structure is
       <st3_response>
          <insert_count/>
          <update_count/>
       </st3_response>
    and the db request message is
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:t002_ora xmlns:ns0="http://topfine.com/proxy">
    - <st3>
    - <spName action="execute">
      <table>UPDATE_INSERT</table>
      <SHID type="VARCHAR">21</SHID>
      <SZNAME type="VARCHAR">21</SZNAME>
      <SZDATE type="DATE">2010-11-21</SZDATE>
      </spName>
      </st3>
    - <st3>
    - <spName action="execute">
      <table>UPDATE_INSERT</table>
      <SHID type="VARCHAR">22</SHID>
      <SZNAME type="VARCHAR">22</SZNAME>
      <SZDATE type="DATE">2010-11-21</SZDATE>
      </spName>
      </st3>
    then how to get update_count in  response message?
    Edited by: Shen Peng on Nov 21, 2010 8:35 AM

    Can you jus let know totally how many are getting Updated and inserted for the Proxy u sent....I am guessin the response from ur DB is
    <?xml version="1.0" encoding="utf-8" ?>
    - <ns0:t002_ora_response xmlns:ns0="http://topfine.com/proxy">
    <st3_response />
    <st3_response />
    <st3_response />
    <st3_response />
    <st3_response />
    </ns0:t002_ora_response>
    So probably four records are getting updated or inserted...
    Check this blog may be helpful
    /people/siva.maranani/blog/2005/09/16/xi-how-to-on-jdbc-receiver-response

  • How to call PL/SQL stored procedure using ODBC?

    Could anyone tell me how can I call PL/SQL stored procedure using
    ODBC? Are there any sample codes?
    Thanx!
    null

    You are correct on all counts, they all should work.
    Oracle Product Development Team wrote:
    : Hi,
    : I don't know the exact syntax in ODBC, but reasoning by analogy
    : with other API's, I'd bet one of the following works
    : (for a call to: procedure my_proc(n1 number, n2 number);):
    : "{ my_proc(1,2); }"
    : "{ call my_proc(1,2); }"
    : "{ begin my_proc(1,2); end }"
    : "begin my_proc(1,2); end;"
    : "begin my_proc(1,2); end"
    : Hope this helps. - Pierre
    : jiangbuf (guest) wrote:
    : : Could anyone tell me how can I call PL/SQL stored procedure
    : using
    : : ODBC? Are there any sample codes?
    : : Thanx!
    : Oracle Technology Network
    : http://technet.oracle.com
    null

  • Error when call sql server stored procedure

    hello everybody,
    I'm working with MII 14 and I want call a SqlServer stored procedure provided from my customer.
    I configured a FixedQuery like this:
    [dbo].[spElencoEntrateUscite_AV] @delta = 0, @daquando='130101', @CompanyID='000002', @Elenco = @MyCursor OUTPUT
    but when i test the query i have back the error:
    com.microsoft.sqlserver.jdbc.SQLServerException: Must declare the scalar variable "@MyCursor".
    I tried also to set the query like this:
    [dbo].[spElencoEntrateUscite_AV]
    and pass Parameters:
    0
    130101
    000002
    OUTPUT
    but i have this error:
    com.microsoft.sqlserver.jdbc.SQLServerException: Procedure or function 'spElencoEntrateUscite_AV' expects parameter '@Elenco', which was not supplied.
    Any suggestion?
    thanks in advance
    Alex

    hello Kuldeep!
    yes i solved.
    I used fixed query in MII and declared the cursor:
    example:
    DECLARE @MyCursor CURSOR
    EXEC [dbo].[spElencoEntrateUscite_AV] @delta = 0,@daquando='[Param.1]', @CompanyID='[Param.2]', @Elenco = @MyCursor OUTPUT
    I hope this may help u
    Alessandro

Maybe you are looking for

  • Photoshop CS2 Quits unexpectaly

    I have an iMac running 10.4.10 and about a week ago I reinstalled tiger. I also fixed permissions and repaired the disk. Then 3 days later I go to open adobe photoshop CS2 and i t loads... then quits! I have had this problem with many applications si

  • How to use a jdbc query result to redirect to a variable html page

    uh, my problem is that i'm making a servlet which should redirect to a variable html page based on jdbc query (I'm really sorry if this is not the correct forum to post it, but since it's jdbc i thought it was). Anyway, the problem is that when a str

  • Problem with interfaces

    Greetings everyone!!! Todays' question has to do with interfaces. Anyone who might be able to help is welcomed!!! This is my main, which constracts new object of the type Rectangle and employee and tries to find the average and the maximum area and s

  • Photoshop Elements 11 not exiting completely

    When I exit from Photoshop Elements 11, I cannot reopen unless I go to task manager and make sure I end the Photoshop Elements process.

  • Making an image page searchable?

    I do not have alot of experience when it comes to making web pages searchable by the likes of Google. I about to create a number of pages that are made up of 4 colour GIF images and image maps. How can I make the pages search engine compatible? Thank