Error invoking external WS from pl/sql ( 11i10 Appls DB)

I stuck when I'm trying to call a WebService from pl/sql. I get error : "...'Element' is an invalid node type. Line 6, position 7...."
what i did: Wrote a plsql, assembled envelop, body(hardcoded with xml data) etc and used utl_http functions to begin soap request. When i run this plsql, then i get above errror.
Question: Why did i get this error, especialy when I'm not using Element characters in my code ? Are there any specific java class or pl/sql pkgs that need to be installed in 11i10 DB (9.2.0.5.0) inorder for DB to be compatible in invoking a Webservice (SOAP over http)? If so,what are they and Doesn't these pkgs come when you install 11i10? Are there any preparations/setups that I need to do to DB to invoke WS from plsql?
Please guide me as this is the first time we are invoking a Webserivce from plsql
Thanks
Message was edited by:
[email protected]
Message was edited by:
[email protected]

Thank you very much, Tugdual, for pointing to right documents. I have read thru them and now have an understanding what jar files need to be present.
Yes, I have looked at WS Doc but it was Version 10g (9.0.4) where there is not much info. The newer version 10g Release 3 (10.1.3) has changed a lot :)
Just to jott here : The delta files from base 11i10 to jars needed by webservice are (min) 1. soap.jar, 2. dms.jar 3. servlet.jar
4. jssl-1_1.jar [Only if we are using SSL on both endpoints)
Thanks                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Similar Messages

  • [SOLVED]Built pacman in Debian, getting 'error invoking external downl

    Hi, I've built pacman in Debian and now whenever I try to run any pacman command involving repositories, I get 'error invoking external downloader'. I've configured repositories, but I feel like the problem is with libfetch. I could only build libdownload which is a fork of libfetch.
    Here is the output of 'pacman -Syv --verbose':
    debug: config: attempting to read file /usr/local/etc/pacman.conf
    debug: config: new section 'options'
    debug: config: HoldPkg: pacman
    debug: config: HoldPkg: glibc
    debug: config: SyncFirst: pacman
    debug: config: Architecture: i686
    debug: config: new section 'main'
    debug: registering sync database 'main'
    debug: adding new server URL to database 'main': http://cake.lib.fit.edu/archlinux/main/os/i686
    debug: setlibpaths() called
    debug: option 'cachedir' = /usr/local/var/cache/pacman/pkg/
    debug: config: finished parsing /usr/local/etc/pacman.conf
    Root : /
    Conf File : /usr/local/etc/pacman.conf
    DB Path : /usr/local/var/lib/pacman/
    Cache Dirs: /usr/local/var/cache/pacman/pkg/
    Lock File : /usr/local/var/lib/pacman/db.lck
    Log File : /usr/local/var/log/pacman.log
    Targets : None
    :: Synchronizing package databases...
    debug: database path for tree local set to /usr/local/var/lib/pacman/local/
    debug: local database version 2
    debug: returning error 47 from download : error invoking external downloader
    debug: failed to sync db: error invoking external downloader
    error: failed to update main (error invoking external downloader)
    error: failed to synchronize any databases
    debug: unregistering database 'local'
    debug: unregistering database 'main'
    And here is my pacman.conf file:
    # /usr/local/etc/pacman.conf
    # See the pacman.conf(5) manpage for option and repository directives
    # GENERAL OPTIONS
    [options]
    # The following paths are commented out with their default values listed.
    # If you wish to use different paths, uncomment and update the paths.
    #RootDir = /
    #DBPath = /usr/local/var/lib/pacman/
    #CacheDir = /usr/local/var/cache/pacman/pkg/
    #LogFile = /usr/local/var/log/pacman.log
    HoldPkg = pacman glibc
    # If upgrades are available for these packages they will be asked for first
    SyncFirst = pacman
    #XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
    #XferCommand = /usr/bin/curl -C - -f %u > %o
    #CleanMethod = KeepInstalled
    Architecture = auto
    # Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
    #IgnorePkg =
    #IgnoreGroup =
    #NoUpgrade =
    #NoExtract =
    # Misc options (all disabled by default)
    #UseSyslog
    #ShowSize
    #UseDelta
    #TotalDownload
    #CheckSpace
    # REPOSITORIES
    # - can be defined here or included from another file
    # - pacman will search repositories in the order defined here
    # - local/custom mirrors can be added here or in separate files
    # - repositories listed first will take precedence when packages
    # have identical names, regardless of version number
    # - URLs will have $repo replaced by the name of the current repo
    # - URLs will have $arch replaced by the name of the architecture
    # Repository entries are of the format:
    # [repo-name]
    # Server = ServerName
    # Include = IncludePath
    # The header [repo-name] is crucial - it must be present and
    # uncommented to enable the repo.
    # An example of a disabled remote package repository with multiple servers
    # available. To enable, uncomment the following lines. You can add preferred
    # servers immediately after the header and they will be used before the
    # default mirrors.
    #[core]
    #Server = ftp://ftp.example.com/foobar/$repo/os/$arch/
    # The file referenced here should contain a list of 'Server = ' lines.
    #Include = /usr/local/etc/pacman.d/mirrorlist
    # An example of a custom package repository. See the pacman manpage for
    # tips on creating your own repositories.
    #[custom]
    #Server = file:///home/custompkgs
    [main]
    Server = http://cake.lib.fit.edu/archlinux/$repo/os/$arch
    My pacman is version v.3.5.4 and libalpm v.6.0.4
    Thanks for any help again!
    Last edited by aabmass (2011-12-23 17:26:52)

    libdownload is our ancient fork of libfetch -- do not use it. It's not even the same library, and it required buildsys changes to use. Honestly, I don't recommend libfetch either. Looks to me like you didn't build pacman with internal downloader support at all.
    You won't find a tarball of libfetch anywhere because its part of NetBSD core. Arch keeps a snapshot, which you can download.
    Regardless, I suggest looking at our PKGBUILDs for sane build time options: 4.0.1, 3.5.4

  • Invoking Web Service From PL SQL package

    Below is the sample code to invoke web service from pl/sql package using UTL_HTTP:
    Declare
    http_req UTL_HTTP.req;
    http_resp UTL_HTTP.resp;
    Begin
    http_req :=
    UTL_HTTP.begin_request
    'http://'
    || lv_hosturl
    -- || '.net/soa-infra/services/finance_rt/Payments/paymentsprocess_client_ep',
    --new url
    || '.net/soa-infra/services/finance_rt/PaymentsReq/paymentsprocess_client_ep?WSDL',
    'POST',
    'HTTP/1.1'
    UTL_HTTP.set_header (http_req, 'Content-Type', 'text/xml');
    -- since we are dealing with plain text in XML documents
    UTL_HTTP.set_header (http_req,
    'Content-Length',
    LENGTH (lv_soap_request)
    UTL_HTTP.set_header (http_req, 'SOAPAction', '');
    -- required to specify this is a SOAP communication
    UTL_HTTP.write_text (http_req, lv_soap_request);
    http_resp := UTL_HTTP.get_response (http_req);
    UTL_HTTP.read_text (http_resp, lv_soap_respond);
    UTL_HTTP.end_response (http_resp);
    resp := XMLTYPE.createxml (lv_soap_respond);
    End;

    Hi,
    there are a lot of option to make plsql web services .
    First you can stay with jdev 10.1.3
    Use the xmldb servlets
    use jdev 11g tp4 to create plsql ws and upgrade to jdev 11g production
    And I think in the next release of jdev it will be back , there are more options which disappeared like the adf bc sdo ws or jmx datacontrol etc.
    thanks Edwin

  • No Class Found Error on invoking java class from PL/SQL

    Hi There,
    I have followed instructions on how to create a java proc in the DB to invoke it from PL/SQL.
    I get a 'java.lang.NoClassDefFoundError' error because it cannot access 'org.apache.axis.description.TypeDesc' in this case. The instuctions say to add the supporting jars which contain the additional classes to the project's Additional Classpath's which I have done.
    I deploy the java classes and create the java stored proc using JDev.
    Can someone please tell me how to go about resolving this?
    I can see 'org.apache.axis.description.TypeDesc' in the DB via JDev's Databse connection in the Java Classes tree?
    Thanks,
    Anthony

    Hi There,
    I have followed instructions on how to create a java proc in the DB to invoke it from PL/SQL.
    I get a 'java.lang.NoClassDefFoundError' error because it cannot access 'org.apache.axis.description.TypeDesc' in this case. The instuctions say to add the supporting jars which contain the additional classes to the project's Additional Classpath's which I have done.
    I deploy the java classes and create the java stored proc using JDev.
    Can someone please tell me how to go about resolving this?
    I can see 'org.apache.axis.description.TypeDesc' in the DB via JDev's Databse connection in the Java Classes tree?
    Thanks,
    Anthony

  • Error while retrieving data from PL/SQL Table using SELECT st. (Urgent!!!)

    Hi Friends,
    I am using Oracle 8.1.6 Server, & facing problems while retrieving data from a PL/SQL Table:
    CREATE or REPLACE PROCEDURE test_proc IS
    TYPE tP2 is TABLE of varchar2(10); --declared a collection
    dt2 tP2 := tP2('a','b','c');
    i NUMBER(8);
    begin
    SELECT COUNT(*) INTO i FROM TABLE(CAST(dt2 as tP2));
    DBMS_OUTPUT.PUT_LINE('**'||i);
    end;
    While executing the above procedure, I encountered foll. error:
    ERROR at line 1:
    ORA-00600: internal error code, arguments: [15419], [severe error during PL/SQL execution], [], [],
    ORA-06544: PL/SQL: internal error, arguments: [pfrrun.c:pfrbnd1()], [], [], [], [], [], [], []
    ORA-06553: PLS-801: internal error [0]
    Can anyone please help me, where the problem is??
    Is it Possible to retrieve data from PL/SQL TABLE using SELECT statement? & How ?
    Thanks in advance.
    Best Regards,
    Jay Raval.

    Thanks Roger for the Update.
    It means that have to first CREATE TYPE .. TABLE in database then only I can fire a Select statement on that TYPE.
    Actually I wanted to fire a Select statement on the TABLE TYPE, defined & declared in PLSQL stored procedure using DECLARE TYPE .. TABLE & not using CREATE TYPE .. TABLE.
    I was eager to know this, because my organization is reluctant in using CREATE TYPE .. TABLE defined in the database, so I was looking out for another alternative to access PL/SQL TABLE using Select statement without defining it database. It would have been good if I could access a PLSQL TABLE using Select statement Declared locally in the stored procedure.
    Can I summarize that to access a PL/SQL TABLE using SELECT statement, I have to first CREATE TYPE .. TABLE?
    If someone have any other idea on this, please do let me know.
    Thanks a lot for all help.
    Best Regards,
    Jay Raval.
    You have to define a database type...
    create type tP2 is table of varchar2(10)
    CREATE OR REPLACE PROCEDURE TEST_PROC
    IS
    dt2 tP2 := tP2('a','b','c');
    i NUMBER(8);
    begin
    SELECT COUNT(*) INTO i FROM TABLE(CAST (dt2 AS tP2));
    DBMS_OUTPUT.PUT_LINE('**'||i);
    end;
    This will work.
    Roger

  • How to run an external application from PL/SQL code?

    Hi,
    I want to call an application like "Notepad" from PL/SQL code in a Windows2000 server. Is there any way to do that?
    Thanks, best regards.
    Paulo.

    declare
    r varchar(4000);
    begin
    dbms_java.set_output(10000);
    system_util.runshell('sh /ora9/runBackup.sh', r);
    dbms_output.put_line(r);
    end;
    System_util package is
    CREATE OR REPLACE PACKAGE System_Util IS
    *System: Generic
    *Package Name: System_util
    *Description: This is an open source package which holds regular used
         * methods by developers and dba's.
    *Created by:         Rae Smith
    *Created Date:       27/06/2001
    *Notes: This ia an free open source package that holds no warranty and
    * therefore no-one connected to the development of this package
    * can be made reasponsible for any outcomes by it's use.
    MODIFICATION LOG**************************************************************
    *DETAILS                                    DATE          VERS          CHANGED BY
    *===============================================================================
    *Created                                 27-06-2001     1.0           Rae Smith
         /********************************* Public Methhods ***************************************/
         --- getDir returns the first directory value held in the init.ora file
         FUNCTION getDir RETURN VARCHAR2;
         --- getPrev.. returns the prevoise day from a gievn date
         FUNCTION getPrevSat(pDate IN DATE) RETURN DATE;
         FUNCTION getPrevSun(pDate IN DATE) RETURN DATE;
         FUNCTION getPrevMon(pDate IN DATE) RETURN DATE;
         FUNCTION getPrevTue(pDate IN DATE) RETURN DATE;
         FUNCTION getPrevWed(pDate IN DATE) RETURN DATE;
         FUNCTION getPrevThu(pDate IN DATE) RETURN DATE;
         FUNCTION getPrevFri(pDate IN DATE) RETURN DATE;
         --- isNumber returns TRUE or FALSE depending on a datatype passed
         FUNCTION isNumber(pnumber IN VARCHAR2) RETURN BOOLEAN;
         FUNCTION isNumber(pnumber IN NUMBER) RETURN BOOLEAN;
         FUNCTION isNumber(pnumber IN DATE) RETURN BOOLEAN;
         --- The writeFile allow you to write data to a file
         --- writeFile has 2 Versions
         --- v1 pass in the file name and the text to write to a file.
         --- v2 pass in the file name, dbms_sql.varhar2s object
         --- and the amount of rows to procces at a time
         --- This enables you to write to afile in batch mode
         PROCEDURE writeFile(pName IN VARCHAR2, pText IN VARCHAR2);
         PROCEDURE writeFile(pName IN VARCHAR2, pText IN DBMS_SQL.VARCHAR2S, pRows IN PLS_INTEGER);
         --- The appendFile methods allow you to append data to a file
    --- This also has the inteligents to create the file if ts does not exist.
         --- appendFile has 2 Versions
         --- v1 pass in the file name and the text to write to a file.
         --- v2 pass in the file name, dbms_sql.varhar2s object
         --- and the amount of rows to procces at a time
         --- This enables you to write to afile in batch mode
         PROCEDURE appendFile(pName IN VARCHAR2, pText IN DBMS_SQL.VARCHAR2S, pRows IN PLS_INTEGER);
         PROCEDURE appendFile(pName IN VARCHAR2, pText IN VARCHAR2);
         --- The clearFile clears the data from a file.
         PROCEDURE clearFile(pName IN VARCHAR2);
         --- checkSyntax is a quick syntax checker for sql statements the is a limit to
         --- the size used in the statement. If you have a error with
         --- a statement then pass in the statement watch as it displays
         --- the point where the error arose.
         PROCEDURE checkSyntax(pSql IN VARCHAR2);
         --- isEmpty this returns TRUE or FALSE
         FUNCTION isEmpty(pValue IN VARCHAR2) RETURN BOOLEAN;
         --- getTimeInMins returns the time in minutes for a specified date
         FUNCTION getTimeInMins (pDate IN DATE) RETURN NUMBER;
         --PROCEDURE get_time_in_mins (pDate IN DATE);
         --- incDate returns a specified date incremented by value
         FUNCTION incDate(pInc IN NUMBER DEFAULT .999999, pDate IN DATE DEFAULT SYSDATE) RETURN DATE;
         --- decDate returns a specified date decremented by value
         FUNCTION decDate(pInc IN NUMBER DEFAULT .999999, pDate IN DATE DEFAULT SYSDATE) RETURN DATE;
         --- getTime returns the time in milliseconds
         FUNCTION getTime RETURN NUMBER;
         --- daysDiff returns the amount of days between two values
         FUNCTION daysDiff(pHigh IN DATE, pLow IN DATE) RETURN NUMBER;
         --- difference returns the diffeence between two numbers always
         --- taking the lowest away from the highest
         FUNCTION difference(pAnum IN NUMBER,pBnum IN NUMBER)RETURN NUMBER;
         --- total returns the value of two numbers added together
         FUNCTION total(pAnum IN NUMBER, pBnum IN NUMBER)RETURN NUMBER;
         --- numberToWords returns the string for a number passed in
         FUNCTION numberToWords(pNumb IN NUMBER) RETURN VARCHAR2;
         --- runShell allows you to run operating commands from pl/sql
         --- Only available with 8i
         --- PROCEDURE runShell(pCmnd IN VARCHAR2, pErrMsg IN OUT VARCHAR2);
         /**************************** Public Vaiables *******************************/
         --- Public variable that holds the operating system directory
         --- that the can be written to from withing the database.
         vDir VARCHAR2(50);
    END;
    CREATE OR REPLACE PACKAGE BODY System_Util IS
         FUNCTION getDir RETURN VARCHAR2
         IS
         BEGIN
              RETURN vDir;
         EXCEPTION
              WHEN OTHERS THEN
                   dbms_output.put_line('ERROR...ERROR...System_Util.getDir');
                   RAISE;
         END getDir;
         /**** Private module to get the first directory for utl_file to use ****/
         PROCEDURE getDir
         IS
              CURSOR cDir(p1 IN VARCHAR2)
              IS
              SELECT DECODE(INSTR(value, ','), 0, value, SUBSTR(value, 1, INSTR(value, ',')-1)) dir
              FROM v$parameter
              WHERE name = p1;
         BEGIN
              FOR rDir IN cDir('utl_file_dir') LOOP
                   vDir := rDir.dir;
              END LOOP;
         EXCEPTION
              WHEN OTHERS THEN
                   dbms_output.put_line('ERROR...ERROR...System_Util.getDir');
                   RAISE;
         END getDir;
         FUNCTION getPrevDate(pDate IN DATE, pDay IN VARCHAR2) RETURN DATE
         IS
         BEGIN
              RETURN NEXT_DAY(pDate - 7, pDay);
         EXCEPTION
              WHEN OTHERS THEN
                   RAISE;
         END getPrevDate;
         FUNCTION getPrevSat(pDate IN DATE) RETURN DATE
         IS
         BEGIN
              RETURN getPrevDate(pDate, 'saturday');
         EXCEPTION
              WHEN OTHERS THEN
                   RAISE;
         END getPrevSat;
         FUNCTION getPrevSun(pDate IN DATE) RETURN DATE
         IS
         BEGIN
              RETURN getPrevDate(pDate, 'sunday');
         EXCEPTION
              WHEN OTHERS THEN
                   RAISE;
         END getPrevSun;
         FUNCTION getPrevMon(pDate IN DATE) RETURN DATE
         IS
         BEGIN
              RETURN getPrevDate(pDate, 'monday');
         EXCEPTION
              WHEN OTHERS THEN
                   RAISE;
         END getPrevMon;
         FUNCTION getPrevTue(pDate IN DATE) RETURN DATE
         IS
         BEGIN
              RETURN getPrevDate(pDate, 'tuesday');
         EXCEPTION
              WHEN OTHERS THEN
                   RAISE;
         END getPrevTue;
         FUNCTION getPrevWed(pDate IN DATE) RETURN DATE
         IS
         BEGIN
              RETURN getPrevDate(pDate, 'wednesday');
         EXCEPTION
              WHEN OTHERS THEN
                   RAISE;
         END getPrevWed;
         FUNCTION getPrevThu(pDate IN DATE) RETURN DATE
         IS
         BEGIN
              RETURN getPrevDate(pDate, 'thursday');
         EXCEPTION
              WHEN OTHERS THEN
                   RAISE;
         END getPrevThu;
         FUNCTION getPrevFri(pDate IN DATE) RETURN DATE
         IS
         BEGIN
              RETURN getPrevDate(pDate, 'friday');
         EXCEPTION
              WHEN OTHERS THEN
                   RAISE;
         END getPrevFri;
         FUNCTION isNumber(pNumber IN VARCHAR2) RETURN BOOLEAN
         IS
         BEGIN
              IF TO_NUMBER(pNumber)> 0 THEN
                   RETURN TRUE;
              ELSE
                   RETURN FALSE;
              END IF;
         EXCEPTION
              WHEN OTHERS THEN
                   RETURN FALSE;
         END isNumber;
         FUNCTION isNumber(pNumber IN NUMBER) RETURN BOOLEAN
         IS
         BEGIN
              IF TO_NUMBER(pNumber) > 0 THEN
                   RETURN TRUE;
              ELSE
                   RETURN FALSE;
              END IF;
         EXCEPTION
              WHEN OTHERS THEN
              RETURN FALSE;
         END isNumber;
         FUNCTION isNumber(pNumber IN DATE) RETURN BOOLEAN
         IS
         BEGIN
              IF TO_NUMBER(TO_CHAR(pNumber, 'YYYYMMDD')) > 0 THEN
                   RETURN TRUE;
              ELSE
                   RETURN FALSE;
              END IF;
         EXCEPTION
              WHEN OTHERS THEN
                   RETURN FALSE;
         END isNumber;
         PROCEDURE writeFile(pName IN VARCHAR2, pText IN VARCHAR2)
         IS
              vFtype utl_file.file_type;
         BEGIN
              vFtype := UTL_FILE.FOPEN(vDir, pName,'w');
              UTL_FILE.PUT_LINE(vFtype,pText);
              UTL_FILE.FCLOSE(vFtype);
         EXCEPTION
              WHEN OTHERS THEN
                   UTL_FILE.FCLOSE(vFtype);
                   RAISE;
         END writeFile;
         PROCEDURE writeFile(pName IN VARCHAR2, pText IN VARCHAR2, pFtyp IN OUT utl_file.file_type)
         IS
              vFtype utl_file.file_type;
         BEGIN
              vFtype := UTL_FILE.FOPEN(vDir, pName,'w');
              UTL_FILE.PUT_LINE(vFtype,pText);
              UTL_FILE.FCLOSE(vFtype);
         EXCEPTION
              WHEN OTHERS THEN
                   UTL_FILE.FCLOSE(vFtype);
                   RAISE;
         END writeFile;
         PROCEDURE writeFile(pName IN VARCHAR2, pText IN DBMS_SQL.VARCHAR2S, pRows IN PLS_INTEGER)
         IS
              vFtype utl_file.file_type;
              vText VARCHAR2(2000);
              vCnt BINARY_INTEGER;
              vRem BINARY_INTEGER;
              vRowcnt PLS_INTEGER := 0;
         BEGIN
              vRem := MOD(pText.COUNT, pRows);
              vFtype := UTL_FILE.FOPEN(vDir, pName, 'w');
              vCnt := pText.FIRST;
              LOOP
                   EXIT WHEN vCnt IS NULL;
              vRowcnt := vRowcnt + 1;
                   IF vCnt = pText.LAST THEN
                        vText := vText||pText(vCnt);
                        UTL_FILE.PUTF(vFtype,vText);
                        UTL_FILE.FFLUSH(vFtype);
                        vText := '';
                   ELSIF MOD(vCnt, pRows) = 0 THEN
                        vText := vText||pText(vCnt)||'\n';
                        UTL_FILE.PUTF(vFtype,vText);
                        UTL_FILE.FFLUSH(vFtype);
                        vText := '';
                   ELSIF vRowcnt = vRem THEN
                        vText := vText||pText(vCnt)||'\n';
                        UTL_FILE.PUTF(vFtype,vText);
                        UTL_FILE.FFLUSH(vFtype);
                   ELSE
                        vText := vText||pText(vCnt)||'\n';
                   END IF;
                   vCnt := pText.NEXT(vCnt);
              END LOOP;
              UTL_FILE.FCLOSE(vFtype);
         EXCEPTION
              WHEN OTHERS THEN
                   dbms_output.put_line('ERROR...ERROR...SYSTEM_UTIL.WRITE_FILE');
                   UTL_FILE.FCLOSE(vFtype);
                   RAISE;
         END writeFile;
         PROCEDURE appendFile(pName IN VARCHAR2, pText IN DBMS_SQL.VARCHAR2S, pRows IN PLS_INTEGER)
         IS
              vFtype utl_file.file_type;
              vText VARCHAR2(2000);
              vCnt BINARY_INTEGER;
              vRem BINARY_INTEGER;
              vMode VARCHAR2(2) := 'a';
              vRowcnt PLS_INTEGER := 0;
         BEGIN
              vRem := MOD(pText.COUNT, pRows);
              vFtype := UTL_FILE.FOPEN(vDir, pName, vMode);
              vCnt := pText.FIRST;
              LOOP
                   EXIT WHEN vCnt IS NULL;
                   vRowcnt := vRowcnt + 1;
                   IF vCnt = pText.LAST THEN
                        vText := vText||pText(vCnt);
                        UTL_FILE.PUTF(vFtype,vText);
                        UTL_FILE.FFLUSH(vFtype);
                        vText := '';
                   ELSIF MOD(vCnt, pRows) = 0 THEN
                        vText := vText||pText(vCnt)||'\n';
                        UTL_FILE.PUTF(vFtype,vText);
                        UTL_FILE.FFLUSH(vFtype);
                        vText := '';
                   ELSIF vRowcnt = vRem THEN
                        vText := vText||pText(vCnt)||'\n';
                        UTL_FILE.PUTF(vFtype,vText);
                        UTL_FILE.FFLUSH(vFtype);
                   ELSE
                        vText := vText||pText(vCnt)||'\n';
                   END IF;
                   vCnt := pText.NEXT(vCnt);
              END LOOP;
                   UTL_FILE.FCLOSE(vFtype);
         EXCEPTION
              WHEN UTL_FILE.INVALID_OPERATION THEN
                   IF vMode = 'a' THEN
                        writeFile(pName, pText, pRows);
                   ELSE
                        RAISE;
              END IF;
         WHEN OTHERS THEN
              dbms_output.put_line('ERROR...ERROR...SYSTEM_UTIL.APPENDFILE');
              UTL_FILE.FCLOSE(vFtype);
              RAISE;
         END appendFile;
         PROCEDURE appendFile(pName IN VARCHAR2, pText IN VARCHAR2)
         IS
              vFtype utl_file.file_type;
              vMode VARCHAR2(2) := 'a';
         BEGIN
              vFtype := UTL_FILE.FOPEN(vDir, pName, vMode);
              UTL_FILE.PUTF(vFtype, pText);
              UTL_FILE.FFLUSH(vFtype);
              UTL_FILE.FCLOSE(vFtype);
         EXCEPTION
         WHEN UTL_FILE.INVALID_OPERATION THEN
         IF vMode = 'a' THEN
              writeFile(pName, pText);
         ELSE
              RAISE;
         END IF;
         WHEN OTHERS THEN
              dbms_output.put_line('ERROR...ERROR...SYSTEM_UTIL.APPENDFILE');
              UTL_FILE.FCLOSE(vftype);
              RAISE;
         END appendFile;
         PROCEDURE clearFile(pName IN VARCHAR2)
         IS
              vFtype utl_file.file_type;
              vText VARCHAR2(2000);
              vCnt BINARY_INTEGER;
              vRem BINARY_INTEGER;
              vRowcnt PLS_INTEGER := 0;
         BEGIN
              vFtype := UTL_FILE.FOPEN(vDir, pName, 'w');
              UTL_FILE.PUTF(vFtype,'');
              UTL_FILE.FFLUSH(vFtype);
              UTL_FILE.FCLOSE(vFtype);
         EXCEPTION
         WHEN OTHERS THEN
         dbms_output.put_line('ERROR...ERROR...System_Util.CLEARFILE');
         UTL_FILE.FCLOSE(vFtype);
         RAISE;
         END clearFile;
         PROCEDURE checkSyntax(pSql IN VARCHAR2)
         IS
         sqlCur PLS_INTEGER := DBMS_SQL.OPEN_CURSOR;
         errPos PLS_INTEGER;
         sqlStmt VARCHAR2(2000);
         BEGIN
              sqlStmt := pSql;
              DBMS_SQL.PARSE(sqlCur, sqlStmt, DBMS_SQL.NATIVE);
         EXCEPTION
              WHEN OTHERS THEN
                   errPos := DBMS_SQL.LAST_ERROR_POSITION;
                   DBMS_OUTPUT.PUT_LINE(SQLERRM);
                   DBMS_OUTPUT.PUT_LINE(sqlStmt);
                   DBMS_OUTPUT.PUT_LINE(' ');
                   DBMS_OUTPUT.PUT_LINE(LPAD('^', errPos, '-'));
                   DBMS_SQL.CLOSE_CURSOR(sqlCur);
         END checkSyntax;
         FUNCTION isEmpty(pValue IN VARCHAR2) RETURN BOOLEAN
         IS
         BEGIN
              IF pValue IS NULL OR pValue = '' OR pValue = ' ' THEN
                   RETURN TRUE;
              ELSE
                   RETURN FALSE;
              END IF;
         END isEmpty;
         FUNCTION getTimeInMins (pDate IN DATE) RETURN NUMBER
         IS
              vHours NUMBER;
              vMins NUMBER;
              vRetval PLS_INTEGER;
         BEGIN
              vHours := TO_NUMBER(TO_CHAR(pDate,'HH24'));
              vMins := TO_NUMBER(TO_CHAR(pDate,'MI'));
              vRetval := ((60 * vHours) + vMins);
              RETURN vRetval;
         EXCEPTION
              WHEN OTHERS THEN
                   RAISE;
         END getTimeInMins;
         PROCEDURE getTimeInMins (pDate IN DATE)
         IS
              vHours NUMBER;
              vMins NUMBER;
              vRetval PLS_INTEGER;
         BEGIN
              vHours := TO_NUMBER(TO_CHAR(pDate,'HH24'));
              vMins := TO_NUMBER(TO_CHAR(pDate,'MI'));
              vRetval := ((60 * vHours) + vMins);
              DBMS_OUTPUT.PUT_LINE('The time IN minutes IS: '||vRetval);
         EXCEPTION
              WHEN OTHERS THEN
                   RAISE;
         END getTimeInMins;
         FUNCTION incDate(pInc IN NUMBER DEFAULT .999999, pDate IN DATE DEFAULT SYSDATE) RETURN DATE
         IS
         BEGIN
         RETURN (TO_DATE(TO_CHAR(pDate + pInc, 'DD/MM/YYYY HH24:MI:SS'), 'DD/MM/YYYY HH24:MI:SS'));
         EXCEPTION
              WHEN OTHERS THEN
                   RAISE;
         END incDate;
         FUNCTION decDate(pInc IN NUMBER DEFAULT .999999, pDate IN DATE DEFAULT SYSDATE) RETURN DATE
         IS
         BEGIN
         RETURN (TO_DATE(TO_CHAR(pDate - pInc, 'DD/MM/YYYY HH24:MI:SS'), 'DD/MM/YYYY HH24:MI:SS'));
         EXCEPTION
              WHEN OTHERS THEN
                   RAISE;
         END decDate;
         FUNCTION getTime RETURN NUMBER
         IS
         BEGIN
              RETURN dbms_utility.get_time;
         END getTime;
         FUNCTION daysDiff(pHigh IN DATE, pLow IN DATE) RETURN NUMBER
         IS
              vHighdate DATE;
              vLowdate DATE;
         BEGIN
         IF pHigh > pLow THEN
                   vHighdate := TO_DATE(TO_CHAR(pHigh, 'YYYYMMDD'), 'YYYYMMDD');
                   vLowdate := TO_DATE(TO_CHAR(pLow, 'YYYYMMDD'), 'YYYYMMDD');
         ELSIF pLow > pHigh THEN
                   vHighdate := TO_DATE(TO_CHAR(pLow, 'YYYYMMDD'), 'YYYYMMDD');
                   vLowdate := TO_DATE(TO_CHAR(pHigh, 'YYYYMMDD'), 'YYYYMMDD');
         END IF;
              RETURN (vHighdate - vLowdate);
         EXCEPTION
              WHEN OTHERS THEN
                   RAISE;
         END daysDiff;
         PROCEDURE dateCheck(pDateFrom IN OUT DATE, pDateTo IN OUT DATE)
         IS
              /* Declare the variable to hold the "from" date */
              vDateFrom DATE;
         BEGIN
              /* If either date_from or date_to is null then set to todays date **
              ** using the sysdate **
              ** today's DATE AND IN the correct format */
              pDateFrom := NVL(pDateFrom, SYSDATE);
              pDateTo := NVL(pDateTo, SYSDATE);
              /* Check that the from date is not greater than the to date if so **
              ** use the system_util.incDate to Increment the date by 1 day */
              IF (pDateFrom > pDateTo) THEN
              vDateFrom := pDateFrom;
              pDateTo := System_Util.incDate(1, vDateFrom);
              END IF;
         EXCEPTION
              WHEN OTHERS THEN
              RAISE;
         END;
         /* calculates the difference of two numbers always taken the high from the low*/
         FUNCTION difference(pAnum IN NUMBER, pBnum IN NUMBER)RETURN NUMBER
         IS
              vTotal NUMBER;
         BEGIN
              IF (pAnum > pBnum )OR (pAnum = pBnum)THEN
                   vTotal := (pAnum - pBnum);
              ELSIF (pAnum < pBnum) THEN
                   vTotal := (pBnum - pAnum);
              END IF;
              RETURN (vTotal);
         EXCEPTION
              WHEN OTHERS THEN
                   RAISE;
         END difference;
         /* calculates the Total of two numbers*/
         FUNCTION total(pAnum IN NUMBER, pBnum IN NUMBER)RETURN NUMBER
         IS
              vTotal NUMBER;
         BEGIN
              vTotal := (pAnum + pBnum);
         RETURN (vTotal);
         EXCEPTION
              WHEN OTHERS THEN
                   RAISE;
         END total;
         FUNCTION numberToWords(pNumb IN NUMBER) RETURN VARCHAR2
         IS
              vRetval VARCHAR2(255);
              vNumb PLS_INTEGER;
         BEGIN
              vNumb := pNumb;
              vRetval := REPLACE(TO_CHAR(TO_DATE(vNumb,'j'),'jsp'),'-',' ');
              RETURN (vRetval);
         EXCEPTION
              WHEN OTHERS THEN
              RAISE;
         END;
    /*************** Only Available on 8i ********************************\
         FUNCTION Catcherr(pStr IN VARCHAR2) RETURN VARCHAR2
         IS
              LANGUAGE JAVA
              NAME 'catchErr.run(java.lang.String) return String';
         PROCEDURE runShell(pCmnd IN VARCHAR2, pErrMsg IN OUT VARCHAR2)
         IS
         BEGIN
              pErrMsg := Catcherr(pCmnd);
         EXCEPTION
         WHEN OTHERS THEN
              RAISE;
         END runShell;
    BEGIN
    getDir;
    END;

  • Invoke external application from Oracle Application Form

    Hi,
    I need to invoke external application such as AutoCAD from Oracle Apps Form. Does anyone know how this could be done.
    Form Version : 12.0.11.12010000.2
    Oracle Applications Release R12.
    Thanks,
    Ash

    You can use DDE.App_Begin to open apps such as MS word.
    Try and see if it works for you.
    The other option is you add a menu option (called Launch Autocad) using personalization.
    And then use personalization to launch a web page. This assumes that Autocad app is available as a web service.
    Hope this helps,
    Sandeep Gandhi

  • Invoke External programs from inside App Server

    hi,
    How can I invoke an external program from a session bean (or from an MDB)?
    Can I use Runtime.exec() directly from a bean?
    If so, are there any security considerations?
    thanks,
    Sundar

    I found this article rather helpful:
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

  • Calling external program from PL/SQL

    Does anyone know whether it's possible to call an external program living outside of Oracle from PL/SQl eg. a from a stored procedure?
    Specifically i want to call back into my java appserver (ejb server) when a trigger/stored proc. is executed.
    The call does not have to be synchronous, some sort of queue will do - eg JMS??
    Any help greatly appreciated.
    null

    Hi
    Which version of oracle you are using.
    If it 8i, you can use external procedures/libraries. REfer to ORacle PLSQL documentation.
    If you are using Oracle 7+ you can use dbms pipes to post your command string and a cron job to read the pipe and execute the string.
    An alternate ugly way is to write to a file and some process reading the file at a regular interval.
    HTH
    Arvind Balaraman

  • Please help with error message invoking external service from BPEL

    Yes, I'm new to Oracle SOA Suite and BPEL Process manager. I've searched the forums, OTN, and Google and have not found any description of this error message:
    "oracle.fabric.common.FabricException: Number of SOAP body elements and parts do not match in operation: <operation-name>"
    Using JDeveloper 11.1.1.2.0 and WebLogic/SOA 10.3.2.0.
    The BPEL process was built completely using JDeveloper's graphical tools... I haven't done any raw editing of the BPEL files yet. What types of things might I possibly be doing wrong that would cause this error to occur? Any idea what two things the server is comparing and deciding that there's a mismatch? It doesn't look like it is even attempting to invoke the external service, but bailing out before that, thinking that it's going to send bad data. Below is a bit more detail.
    Also, I loaded up the WSDL (same one that I gave to JDeveloper) into SOAPUI. Then I took the payload that SOA was about to send (see below) and pasted it into SOAPUI. SOAPUI didn't complain and the target web service accepted the message and produced a "success" response. It looks like the payload is correct, so I don't know why SOA is complaining.
    Thanks for any help you can offer.
    =====================================================
    Faulted while invoking operation "UpsertEmp" on provider "SiebelUSEmployeeIntegration".
    <messages>
    <input>
    <UpsertEmpInput>
    <part name="SiebelMessage">
    <SiebelMessage>
    <ns1:USEmployment>
    <ns1:globalId>123456abcdef</ns1:globalId>
    <ns1:employeeId>000123456</ns1:employeeId>
    <ns1:effDt>1/1/2009</ns1:effDt>
    <ns1:emplStatus>A</ns1:emplStatus>
    <ns1:supported>N</ns1:supported>
    <ns1:employed>Y</ns1:employed>
    <ns1:activeStatus>Y</ns1:activeStatus>
    <ns1:hrEditOnly>Y</ns1:hrEditOnly>
    <ns1:paygroup/>
    <ns1:statusCode/>
    <ns1:origHireDate/>
    <ns1:termDate/>
    <ns1:latestHireDate/>
    <ns1:locationCode/>
    <ns1:locationDescr>Somewhere</ns1:locationDescr>
    <ns1:positionCode/>
    <ns1:jobCode/>
    <ns1:jobDescr/>
    <ns1:supervisorEmplid>000654321</ns1:supervisorEmplid>
    <ns1:deptCode>ITG</ns1:deptCode>
    <ns1:deptDescr>Information Technology Group</ns1:deptDescr>
    <ns1:ministryCode/>
    <ns1:ministryDescr>Core Services</ns1:ministryDescr>
    <ns1:subministryCode/>
    <ns1:subministryDescr>Information Technology Group</ns1:subministryDescr>
    <ns1:wwcFreeSubFlag>N</ns1:wwcFreeSubFlag>
    <ns1:lakeHartMC>1234</ns1:lakeHartMC>
    <ns1:testFlag>Y</ns1:testFlag>
    </ns1:USEmployment>
    </SiebelMessage>
    </part>
    </UpsertEmpInput>
    </input>
    <fault>
    <bpelFault>
    <faultType>
    <message>0</message>
    </faultType>
    <remoteFault>
    <part name="summary">
    <summary>oracle.fabric.common.FabricException: Number of SOAP body elements and parts do not match in operation: UpsertEmp</summary>
    </part>
    <part name="detail">
    <detail>Number of SOAP body elements and parts do not match in operation: UpsertEmp</detail>
    </part>
    </remoteFault>
    </bpelFault>
    </fault>
    <faultType>
    <message>0</message>
    </faultType>
    </messages>

    Welcome to BPEL. Take a moment, and write "it's a namespace issue" on a sheet of paper. Post it near your monitor. It won't always be a namespace issue, but it's usually a good thing to suspect first! Is the namespace prefix ns1: defined somewhere? Does your XML that is being sent really match what the WSDL has for input to the UpsertEmp operation? The namespaces for each element level in the XML need to match, not just the lowest level.
    When problems like this get really sticky, you can use TCP tunneling (obtunnel shell?) to capture what is really being sent to the server, and compare that to what is sent from SOAPUI. That's more useful if it's a subtle header problem, but you may get better error messages if you catch the BPEL message and send it using SOAPUI.
    Good Luck, Andy

  • Error invoking Web Service from Web application in BEA

    I have a web service wich run fine at bea weblogic.
    If i invoke it from webapp in sunappserver no problem , from plain client no problem , from oc4j no problem, but if a invoke from same webapp from weblogic i get this error:
    <b>java.rmi.RemoteException: Failed to invoke; nested exception is:
    javax.xml.rpc.JAXRPCException: web service invoke failed: javax.xml.soap.SOAPException: failed to ser
    ialize interface javax.xml.soap.SOAPElementweblogic.xml.schema.binding.SerializationException: mapping lookup
    failure. class=interface javax.xml.soap.SOAPElement class context=TypedClassContext{schemaType=['http://ejb.ds
    ic.pucv.cl/types/']:getMatriculaElement}
    at jrockit.reflect.NativeConstructorInvoker.newInstance([Ljava.lang.Object;)Ljava.lang.Object;(Unknown
    Source)
    at java.lang.reflect.Constructor.newInstance([Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
            at weblogic.webservice.core.rpc.StubImpl.throwRemoteException(StubImpl.java:269)
            at weblogic.webservice.core.rpc.StubImpl.invoke(StubImpl.java:254)
            at $Proxy46.getMatricula(Ljava.lang.String;)Ljava.lang.String;(Unknown Source)
            at cl.pucv.dsic.ws.cliente.ClienteWebService.getMatricula(ClienteWebService.java:100)
            at cl.pucv.dsic.consulta.queryBtn_action(consulta.java:667)
            at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.
    Object;(Unknown Source)
            at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown S
    ource)
            at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
            at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)
            at com.sun.rave.web.ui.appbase.faces.ActionListenerImpl.processAction(ActionListenerImpl.java:57)
            at javax.faces.component.UICommand.broadcast(UICommand.java:312)
            at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
            at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
            at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)
            at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:221)
            at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
            at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:225)
            at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:127)
    Caused by: javax.xml.rpc.JAXRPCException: web service invoke failed: javax.xml.soap.SOAPException:  failed to
    serialize interface javax.xml.soap.SOAPElementweblogic.xml.schema.binding.SerializationException: mapping look
    up failure. class=interface javax.xml.soap.SOAPElement class context=TypedClassContext{schemaType=['http://ejb
    .dsic.pucv.cl/types/']:getMatriculaElement}
    at weblogic.webservice.core.rpc.StubImpl._invoke(StubImpl.java:334)
    at weblogic.webservice.core.rpc.StubImpl.invoke(StubImpl.java:250)
    at $Proxy46.getMatricula(Ljava.lang.String;)Ljava.lang.String;(Unknown Source)
    at cl.pucv.dsic.ws.cliente.ClienteWebService.getMatricula(ClienteWebService.java:100)
    at cl.pucv.dsic.consulta.queryBtn_action(consulta.java:667)
    at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.
    Object;(Unknown Source)
    at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown S
    ource)
            at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
            at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)
            at com.sun.rave.web.ui.appbase.faces.ActionListenerImpl.processAction(ActionListenerImpl.java:57)
            at javax.faces.component.UICommand.broadcast(UICommand.java:312)
            at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
            at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
            at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)
            at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:221)
            at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
            at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:225)
            at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:127)
            at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
            at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
            at com.sun.rave.web.ui.util.UploadFilter.doFilter(UploadFilter.java:194)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
            at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.jav
    a:3212)
            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:1983)
            at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1890)</b>
    the WSDL for this ws is:
    <b> <?xml version="1.0" encoding="UTF-8" ?>
    - <definitions name="WSMatricula" targetNamespace="http://ejb.dsic.pucv.cl/" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:s0="http://ejb.dsic.pucv.cl/types/" xmlns:s1="http://ejb.dsic.pucv.cl/" xmlns:s2="http://schemas.xmlsoap.org/wsdl/soap/">
    - <types>
    - <xsd:schema elementFormDefault="qualified" targetNamespace="http://ejb.dsic.pucv.cl/types/" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:ns1="http://ejb.dsic.pucv.cl/types/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:tns="http://ejb.dsic.pucv.cl/types/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <xsd:element name="getMatriculaElement" nillable="true" type="string" />
      <xsd:element name="getMatriculaResponseElement" nillable="true" type="string" />
      </xsd:schema>
      </types>
    - <message name="EJBConsultaWebService_getMatricula">
      <part element="s0:getMatriculaElement" name="parameters" />
      </message>
    - <message name="EJBConsultaWebService_getMatriculaResponse">
      <part element="s0:getMatriculaResponseElement" name="result" />
      </message>
    - <portType name="WSMatricula">
    - <operation name="getMatricula">
      <input message="s1:EJBConsultaWebService_getMatricula" />
      <output message="s1:EJBConsultaWebService_getMatriculaResponse" />
      </operation>
      </portType>
    - <binding name="WSMatriculaSoapHttp" type="s1:WSMatricula">
      <s2:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
    - <operation name="getMatricula">
      <s2:operation soapAction="http://ejb.dsic.pucv.cl//getMatricula" />
    - <input>
      <s2:body parts="parameters" use="literal" />
      </input>
    - <output>
      <s2:body parts="result" use="literal" />
      </output>
      </operation>
      </binding>
    - <service name="WSMatricula">
    - <port binding="s1:WSMatriculaSoapHttp" name="WSMatriculaSoapHttpPort">
      <s2:address location="http://ip:port/EJB-WebServicesDSIC/WSMatriculaSoapHttpPort" />
      </port>
      </service>
      </definitions></b>
    and the client is
    <b>
    package cl.pucv.dsic.ws.cliente;
    import com.ac.util.MyDOMParser;
    import java.util.Hashtable;
    import java.util.ArrayList;
    import com.ac.util.Config;
    import java.net.URL;
    import javax.xml.rpc.Service;
    import javax.xml.rpc.JAXRPCException;
    import javax.xml.namespace.QName;
    import javax.xml.rpc.ServiceFactory;
    import org.w3c.dom.Document;
    import org.w3c.dom.NodeList;
    import java.io.*;
    public class ClienteWebService implements Serializable  {
    private String UrlString    = "";
    private String nameSpaceUri = "";
    private String serviceName  = "";
    private String portName     = "";
        public ClienteWebService() {
    public String getMatricula(String servicename, String param) throws Exception
    try
    Hashtable ht = (Hashtable)Config.getInstance().getHashtable("WS","Nombre",servicename);
    setUrlString((String)ht.get("EndPoint"));
    setNameSpaceUri((String)ht.get("URI"));
    setServiceName((String)ht.get("ServiceName"));
    setPortName((String)ht.get("PortName"));
    URL wsdlUrl = new URL(getUrlString() + "?WSDL");
    ServiceFactory serviceFactory = ServiceFactory.newInstance();
    Service helloService =
    serviceFactory.createService(wsdlUrl,
    new QName(getNameSpaceUri(), getServiceName()));
    WebServiceDSICIF myProxy =
    (WebServiceDSICIF) helloService.getPort(new QName(getNameSpaceUri(),
    getPortName()),
    WebServiceDSICIF.class);
    return myProxy.getMatricula(param);
    catch (Exception ex)
    ex.printStackTrace();
    return "<ERROR>"+ ex.getMessage()+"</ERROR>";
    public static void main(String[] args) {
    try {
    ClienteWebService clws = new ClienteWebService();
    ArrayList l = new ArrayList();
    String xml = "";
    if (args.length>0)
    xml = clws.getMatricula("WsSQL",args[0]);
    System.out.println("Rut : " + args[0] + " = " + xml);
    else
    DataInputStream input = new DataInputStream( System.in );
    String bufferIn;
    while((bufferIn = input.readLine()) != null){
    xml = clws.getMatricula("WsSQL",bufferIn);
    System.out.print("Rut : " + bufferIn + " = " + xml);
    } catch (Exception ex) {
    ex.printStackTrace();
    public String getUrlString() {
    return UrlString;
    public void setUrlString(String _UrlString) {
    this.UrlString = _UrlString;
    public String getNameSpaceUri() {
    return nameSpaceUri;
    public void setNameSpaceUri(String _nameSpaceUri) {
    this.nameSpaceUri = _nameSpaceUri;
    public String getServiceName() {
    return serviceName;
    public void setServiceName(String _serviceName) {
    this.serviceName = _serviceName;
    public String getPortName() {
    return portName;
    public void setPortName(String _portName) {
    this.portName = _portName;
    }</b>
    and the external config for this service is:
    <b><Webservices>
    <WS>
         <Nombre>WsSQL</Nombre>     
         <EndPoint>http://ip:port/EJB-WebServicesDSIC/WSMatriculaSoapHttpPort</EndPoint>
         <URI>http://ejb.dsic.pucv.cl/</URI>
         <ServiceName>WSMatricula</ServiceName>
              <PortName>WSMatriculaSoapHttpPort</PortName>
    </WS>
    </Webservices></b>
    please helpme, four days in that :S

    Hi,
    Can you provide the pl/sql function or the web service wsdl generated from it, so that we can try to reproduce it.
    Also, in an earlier post, I saw a workaround of changing it so the function returned defined type as :
    type ListCursor is ref cursor return ListRecord
    You can also see if this works out if possible.
    Regards,
    Sunil..

  • Error Invoking Java class from Stored proc

    We are getting this error while calling a stored procedure that invokes a
    static function of a java class from inside Oracle 8.1.7.
    ORA-29516: Aurora assertion failure: Java thread deadlock detected
    ORA-06512: at "APPS.SERVICECONSUMERINVOKE", line 0
    ORA-06512: at line 40
    In a Toad SQL Window, when I execute the stored procedure that invokes the
    java function, it executes successfully on the first attempt. When I try to
    execute it again on the same SQL Window, it gives the above error. The java
    class is part of a package and indirectly makes a JMS request-reply call
    via other helper classes.
    The same package works fine from other web containers and
    unlike the Oracle JVM Aurora, the JVMs don't detect a deadlock.
    Why does the Aurora throw an error?

    Did you try issusing a commit and then trying again in Toad SQL Window?
    The advice is to contact support:
    ORA-29516: Aurora assertion failure: string
    Cause: An internal error occurred in the Aurora module.
    Action: Contact Oracle Worldwide Support.

  • ERROR: Invoking BPEL PROCESS FROM ADF APP

    hi guys ,
    I have made a simple bpel process with invokes a webservice (This service only gets a string and returns the string).
    I have tested this bpel process and web service it works fine. when tested with bpel console.
    I copied the wsdl of bpel and created the datacontrol.
    the problem is that when i hit start the process from ADF App. it raises the error
    Sep 7, 2009 1:24:49 PM oracle.wsm.common.logging.WsmMessageLogger logSevere
    SEVERE: Failure in looking up EJB component PolicyAccessService#oracle.wsm.policymanager.ejb.IStringPolicyAccessServiceRemote.
    Sep 7, 2009 1:24:49 PM oracle.wsm.common.logging.WsmMessageLogger logSevere
    SEVERE: Failure in looking up EJB component PolicyAccessService#oracle.wsm.policymanager.ejb.IStringPolicyAccessServiceRemote.
    Sep 7, 2009 1:24:49 PM oracle.adf.model.connection.webservice.impl.WebServiceConnectionMessages debugExecuteFailure
    SEVERE: Failed to execute a SAAJ interaction.
    javax.xml.ws.WebServiceException: oracle.fabric.common.PolicyEnforcementException
         at oracle.j2ee.ws.client.jaxws.DispatchImpl.invoke(DispatchImpl.java:741)
         at oracle.j2ee.ws.client.jaxws.OracleDispatchImpl.synchronousInvocationWithRetry(OracleDispatchImpl.java:226)
         at oracle.j2ee.ws.client.jaxws.OracleDispatchImpl.invoke(OracleDispatchImpl.java:97)
         at oracle.adf.model.connection.webservice.impl.SaajInteractionImpl.execute(SaajInteractionImpl.java:87)
         at oracle.adfinternal.model.adapter.webservice.provider.soap.SOAPProvider.execute(SOAPProvider.java:323)
         at oracle.adfinternal.model.adapter.webservice.WSDataControl.invokeOperation(WSDataControl.java:251)
         at oracle.adf.model.bean.DCBeanDataControl.invokeMethod(DCBeanDataControl.java:427)
         at oracle.adf.model.binding.DCInvokeMethod.callMethod(DCInvokeMethod.java:256)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1437)
         at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2120)
         at oracle.adf.model.bean.DCBeanDataControl.invokeOperation(DCBeanDataControl.java:464)
         at oracle.adf.model.adapter.AdapterDCService.invokeOperation(AdapterDCService.java:307)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:693)
         at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.executeEvent(PageLifecycleImpl.java:394)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding._execute(FacesCtrlActionBinding.java:217)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding.execute(FacesCtrlActionBinding.java:176)
         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:1245)
         at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:673)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:273)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:165)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         at 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:292)
         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:85)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:54)
         at 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)
         at oracle.security.jps.wls.JpsWlsFilter$1.run(JpsWlsFilter.java:96)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.wls.util.JpsWlsUtil.runJaasMode(JpsWlsUtil.java:146)
         at oracle.security.jps.wls.JpsWlsFilter.doFilter(JpsWlsFilter.java:140)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:70)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:202)
         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)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3588)
         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:2200)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2106)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1428)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: oracle.fabric.common.PolicyEnforcementException
         at oracle.integration.platform.common.InterceptorChainImpl.createPolicyEnforcementException(InterceptorChainImpl.java:161)
         at oracle.integration.platform.common.InterceptorChainImpl.processRequest(InterceptorChainImpl.java:97)
         at oracle.integration.platform.common.mgmt.InterceptorChainManager.processRequest(InterceptorChainManager.java:216)
         at oracle.j2ee.ws.client.mgmt.runtime.SuperClientInterceptorPipeline.handleRequest(SuperClientInterceptorPipeline.java:96)
         at oracle.j2ee.ws.client.jaxws.DispatchImpl.handleRequest(DispatchImpl.java:524)
         at oracle.j2ee.ws.client.jaxws.DispatchImpl.handleRequest(DispatchImpl.java:508)
         at oracle.j2ee.ws.client.jaxws.DispatchImpl.invoke(DispatchImpl.java:693)
         ... 64 more
    Caused by: java.lang.NullPointerException
         at oracle.j2ee.ws.rm.interceptor.WSRMClientInterceptor.processRequest(WSRMClientInterceptor.java:169)
         at oracle.integration.platform.common.InterceptorChainImpl.processRequest(InterceptorChainImpl.java:89)
         ... 69 more
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://xmlns.oracle.com/SOAApp1/Project1/BPELProcess1"><env:Header/><env:Body><ns1:process><ns1:input>Shakeel Anjum</ns1:input></ns1:process></env:Body></env:Envelope>
    Kindly help
    Regards,
    Tariq

    Hi,
      Check if your wsdl endpoint can accessed properly. If yes, check the soap-binding address is properly pointing to the server hosting the webservice.
    Regards,
    Harikiran.

  • Invoke Interface Scenario from PL/SQL (using ODIInvoke)

    Hi,
    I wanted to invoke an interface scenario (using ODIInvoke, public web service) from a PL/SQL program. I have already created the Interface Scenario and an Agent. I an using the following PL/SQL for invoking the web-service.
    declare
    soap_request varchar2(2000);
    soap_respond varchar2(2000);
    http_req utl_http.req;
    http_resp utl_http.resp;
    resp XMLType;
    i integer;
    begin
    soap_request:= '<?xml version = "1.0" encoding = "UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">';
    soap_request:= soap_request || '<SOAP-ENV:Body><invokeScenarioRequest><invokeScenarioRequest><RepositoryConnection>';
    soap_request:= soap_request || '<JdbcDriver>oracle.jdbc.driver.OracleDriver</JdbcDriver>';
    soap_request:= soap_request || '<JdbcUrl>jdbc:oracle:thin:@amskolbluapp008.in.ibm.com:1528:vis</JdbcUrl>';
    soap_request:= soap_request || '<JdbcUser>apps</JdbcUser><JdbcPassword>apps</JdbcPassword>';
    soap_request:= soap_request || '<OdiUser>SUPERVISOR</OdiUser><OdiPassword>SUNOPSIS</OdiPassword>';
    soap_request:= soap_request || '<WorkRepository>WorkRepository</WorkRepository></RepositoryConnection>';
    soap_request:= soap_request || '<Command><ScenName>ALTINTERFACE</ScenName><ScenVersion>001</ScenVersion>';
    soap_request:= soap_request || '<Context>Global</Context><SyncMode>1</SyncMode></Command>';
    soap_request:= soap_request || '<Agent><Host>9.182.220.48</Host><Port>20910</Port></Agent>';
    soap_request:= soap_request || '</invokeScenarioRequest></invokeScenarioRequest></SOAP-ENV:Body></SOAP-ENV:Envelope>';
    dbms_output.put_line('After 1');
    http_req:= utl_http.begin_request
    ( 'http://9.182.220.206:8888/axis2/services/OdiInvoke?invokeScenario'
    , 'POST'
    , 'HTTP/1.1'
    dbms_output.put_line('After 2');               
    utl_http.set_header(http_req, 'Content-Type', 'text/xml'); -- since we are dealing with plain text in XML documents
    utl_http.set_header(http_req, 'Content-Length', length(soap_request));
    utl_http.set_header(http_req, 'SOAPAction', ''); -- required to specify this is a SOAP communication
    dbms_output.put_line('After 3');
    utl_http.write_text(http_req, soap_request);
    dbms_output.put_line('After 4');
    http_resp:= utl_http.get_response(http_req);
    dbms_output.put_line('After 5');
    utl_http.read_text(http_resp, soap_respond);
    dbms_output.put_line('After 6');
    utl_http.end_response(http_resp);
    dbms_output.put_line('After 7');
    resp:= XMLType.createXML(soap_respond);
    dbms_output.put_line('After 8');
    resp:= resp.extract('/soap:Envelop/soap:Body/child::node()'
    , 'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"'
    i:=0;
    loop
    dbms_output.put_line(substr(soap_respond,1+ i*255,250));
    i:= i+1;
    if i*250> length(soap_respond)
    then
    exit;
    end if;
    end loop;
    end;
    Unfortunately after running the program, the SOAP response is like below.
    <?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Header><wsa:Action>http://www.w3.org/2005/08/addressing/soap/fault</wsa:Action><
    env:Header><soapenv:Body><soapenv:Fault><soapenv:Code><soapenv:Value>soapenv:Sender</soapenv:Value></soapenv:Code><soapenv:Reason><soapenv:Text xml:lang="en-US">java.lang.StringIndexOutOfBoundsException: String index out of range: 0</soapenv:Text></s
    v:Reason><soapenv:Detail></soapenv:Detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>
    Any kind of help to resolve this issue will be very much appreciated.
    Regards.
    Tapas

    Frankly, I can't find a good reference that lists exactly what every privilege does...
    There is an article by one of Oracle's product managers
    http://www.oracle.com/technology/oramag/oracle/03-jul/o43devjvm.html
    that indicates that you should "grant java.io.FilePermission only to explicitly listed files."
    You might try posting over on the JVM forum...
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Error run a procedure from select sql

    Hi,
    I want run a procedure from a easy sql select.
    I have write this code to run this procedure, but response with a oracle error:
    select [procedure_name](:data1, :data2) as test from dual
    the oracle error is this:
    ORA-00904: "procedurename": invalid identifier
    how to resolve this problem?
    thanks
    Edited by: user10943416 on 12-mag-2010 3.12

    select [procedure_name](:data1, :data2) as test from dualAside from the error Oracle already reported, you can't execute a procedure from a select statement.
    You need to do this:
    SQL> exec procedure_name(:data1, :data2);

Maybe you are looking for