Timeout in Oracle 11 g - UTL_HTTP.set_transfer_timeout Scnearios

Hi friends,

When we use the UTL_HTTP.set_transfer_timeout (180);

How to handle the situation after the timeout, for example, if the web service has not responded for more than 180 seconds.

Then, we should handle this.

in my requirement.

We should get the timeout error; and insert it into a table of logging sepearte error message.

can you help me please on this

This issue of closing

Tags: Oracle Development

Similar Questions

  • You can set utl_http.set_transfer_timeout value globally or in the database

    Hello

    We have about 25 web called from many procedures for package services. Lately we are seeing time-out errors more than usual. So we started to add the value of utl_http.set_transfer_timeout to a value greater than the value default 60 seconds before making calls. I was wondering if the time-out value is adjustable to the level of the database or in the world to avoid changing each procedure.

    Thanks in advance.

    Elcaro wrote:

    BTW, the package for SYS.utl_http body is wrapped. How could I manage the implementation of the package body when it is wrapped?

    You do not replace SYS. UTL_HTTP. So no need to know the wrapped (coded) / private parts of the package.

    For example

    create or replace package UTL_HTTP as
      .. // copied, pasted and modified from real SYS.UTL_HTTP header
      -- The HTTP protocol versions that can be used in the function begin_request
      HTTP_VERSION_1_0  CONSTANT VARCHAR2(64) := SYS.UTL_HTTP.HTTP_VERSION_1_0;
      HTTP_VERSION_1_1  CONSTANT VARCHAR2(64) := SYS.UTL_HTTP.HTTP_VERSION_1_1;
      ..
      procedure set_proxy(proxy IN VARCHAR2, no_proxy_domains IN VARCHAR2 DEFAULT NULL);
      ..
    end;
    /
    
    create or replace package body UTL_HTTP as
      .. // wrap calls to the real SYS.UTL_HTTP
    
      procedure set_proxy(proxy IN VARCHAR2, no_proxy_domains IN VARCHAR2 DEFAULT NULL) is
      begin
        SYS.UTL_HTTP.set_proxy(proxy, no_proxy_domains);
      end;
      ..
    begin
      // code SYS.UTL_HTTP default settings here
    end;
    /
    

    With regard to the authorization DBA. No need.

    Assuming that you have a lot of code calling UTL_HTTP in your schema. You just create your UTL_HTTP package that encapsulates calls to the real SYSTEM. UTL_HTTP in your schema.

    Scheme code always call you UTL_HTTP - but now she's calling your wrapper UTL_HTTP package. And the package in turn call the real SYS. UTL_HTTP package.

    If you have 2 schemas calling UTL_HTTP - then the suggestion is to create a 3rd diagram called CODE_LIB or something. It implements the UTL_HTTP package package. It grants execute rights for 1 and 2 CODE_LIB patterns. UTL_HTTP.

    Finally, to make the code in diagrams 1 and 2 call CODE_LIB. UTL_HTTP and not SYS. UTL_HTTP, create synonyms in these patterns, for example
    create or replace the synonym UTL_HTTP for CODE_LIB. UTL_HTTP

    Concern of the DBA is simply security in this regard. Granting access to relevant application schemas to SYS. UTL_HTTPand allowing these tcp access patterns to the outside world (via network ACL in 11g and later).

  • The requests hung and implementation Oracle driver thin query timeout

    We are seeing occasional cases of threads blocked, where the code is in Oracle thin XA of the code driver waiting for a socket read a response from the database. Usually only one thread at a time. The connection is never ending and we close WebLogic to clear it. DBA tells us that all connections for the RAC 11 g of our guests cluster members are inactive, with no hanging transactions or long term.

    In this case every few cases of days between two WebLogic 10.3.5 grouped in our QA environment, is generally not the same time on both servers (we had four incidents, the other had one, in the last 15 days). Sometimes it resulted in a server hung, the driver is keeps a lock that is blocking other threads (today we had many discussions block in a restoration of TX).

    I'm guessing that our instance of WebLogic somehow does not receive the close connection of the remote host. BTW, there is no firewall between us and the DB. I don't have any suspect strong for the cause (even if we're under Linux on a virtual VMWare 4.0 computer, always worried).

    Usually, I would ask any application to set a timeout for the query or set the time-out request to connect with Betclic to work around the problem (we use a MultiDatasource), if the transaction will give up at least and the application can manage it. However, while the Oracle driver supports java.sql.Statement.setQueryTimeout (), a brief investigation on my part leads me to believe the time-out is implemented on the server side, not client side - so that if it is indeed the case that WebLogic does not see the outcome on the connection, it also would never see the timeout.

    Two questions:
    1. is my suspicion implementation timeout for Oracle 11 g correct server-side?
    2. If so, is there a property that I can put to the pilot who will implement a socket timeout? It is "safe"?

    Thanks for any help!

    [Oracle WebLogic 10.3.5, 64-bit JVM 1.6.0_29 HotSpot on RHEL 5.6 on VMWare;] Pilot of thin Oracle XA's bundled with WebLogic; Oracle RAC 11 g (three-node cluster)]

    Published by: SteveElkind on December 3, 2012 05:25

    Hi, Yes, there is a property, you can give the driver to taken all calls with a timeout of read.
    oracle.net.READ_TIMEOUT. The units are in milliseconds, so choose a high number
    enough that no reading legitimate, as a wait for the DBMS do an update or commit.
    etc., would take more time.

    Ignore the message by Mukesh. There's nothing relevant there.

  • Help with utl_http and https API

    Hi all
    I am trying to write a pl/sql procedure to call the google translate API. I paid for a key and the url itself works without any problem, but I'm fighting to get my call from pl/sql.

    I created a function on my server as suggested by Billy Verreynne here: Re: error on HTTPS using UTL_HTTP

    It was extremely helpful as I can now see the url that goes to google.

    This is the code I use to call the function of Billy is:
    set serveroutput ON
    select * from TABLE(webbrowser('https://www.googleapis.com/language/translate/v2?key=mykeyblahblah&q=Automobile&source=en&target=ja')); 
    (1) my first question: Why am I get invited to enter variable bind by sqldeveloper? These are hard-coded in the url, I'm passing, so I don't know why I get invited to these.

    By Billy function, which is getting sent to google:
    HTTP: GET https://www.googleapis.com/language/translate/v2?key=mykeyblahblahAutomobile=Automobileen=enja=ja
    I'm getting ORA-29268: error the client HTTP 400 - Bad request, obviously from the url get passed to google makes no sense, i.e. the ampersands are get and removed the bind variable I entered replace the names of the parameters.

    (2) so my second question, what am I doing wrong and how can I get the URL to keep signs and identifiers in parameters?

    The first thing that is obvious is that I have a lot to learn here. There seems to be that many tutorials online to UTL_HTTP and even the docs of Oracle are a little sparse.

    For what it's worth my portfolio is ok and the proxy are set that correctly, so I know I'm getting to google, I'm just passing through a bad url.

    This isn't the last function, I'm just trying to take the baby steps so I just call the pl/sql API and retrieve a readable result. If anyone can help point me in the right direction, I would be very grateful.

    If it helps, here's the function I created using the code of Billy:
    create or replace
    function WebBrowser( url varchar2 ) return TStrings pipelined is
    --
    -- BASIC PL/SQL WEB BROWSER TEMPLATE
    -- supports http, https and proxy servers
     
            -- fixed constants
            C_NO_PROXY_FOR  constant varchar2(4000) := 'localhost';
            C_WALLET        constant varchar2(4000) := 'file:/blahblah';
            C_WALLET_PASS   constant varchar2(4000) := 'Welcome';
     
            -- Proxy settings that can be made arguments in the WebBrowser() call
            proxyServer     varchar2(30) := 'www-proxy.com';
            -- not all proxy servers use authentication, but many corporate proxies do, in
            -- which case you need to specify your auth details here
            -- (make it nulls if not applicable)
            proxyUser       varchar2(50) := NULL;
            proxyPass       varchar2(50) := NULL;
     
            -- our local variables
            proxyURL        varchar2(4000);
            request         UTL_HTTP.req;
            response        UTL_HTTP.resp;
            buffer          varchar2(4000);
            endLoop         boolean;
    begin
            -- our "browser" settings
            PIPE ROW( 'Setting browser configuration' );
            UTL_HTTP.set_response_error_check( TRUE );
            UTL_HTTP.set_detailed_excp_support( TRUE );
            UTL_HTTP.set_cookie_support( TRUE );
            UTL_HTTP.set_transfer_timeout( 30 );
            UTL_HTTP.set_follow_redirect( 3 );
            UTL_HTTP.set_persistent_conn_support( TRUE );
     
            -- set wallet for HTTPS access
            PIPE ROW( 'Wallet set to '||C_WALLET );
            UTL_HTTP.set_wallet( C_WALLET, C_WALLET_PASS );
     
            -- configure for proxy access
            if proxyServer is not NULL then
                    PIPE ROW( 'Proxy Server is '||proxyServer );
                    proxyURL := 'http://'||proxyServer;
     
                    if (proxyUser is not NULL) and (proxyPass is not NULL) then
                            proxyURL := REPLACE( proxyURL, 'http://',  'http://'||proxyUser||':'||proxyPass||'@' );
                            PIPE ROW( 'Proxy URL modified to include proxy user name and password' );
                    end if;
     
                    PIPE ROW( 'Proxy URL is '|| REPLACE(proxyURL,proxyPass,'*****') );
                    UTL_HTTP.set_proxy( proxyURL, C_NO_PROXY_FOR );
            end if;
     
            PIPE ROW( 'HTTP: GET '||url );
            request := UTL_HTTP.begin_request( url, 'GET', UTL_HTTP.HTTP_VERSION_1_1 );
     
            -- set HTTP header for the GET
            UTL_HTTP.set_header( request, 'User-Agent', 'Mozilla/4.0 (compatible)' );
     
            -- get response to the GET from web server
            response := UTL_HTTP.get_response( request );
     
            -- pipe the response as rows
            endLoop := false;
            loop
                    exit when endLoop;
     
                    begin
                            UTL_HTTP.read_line( response, buffer, TRUE );
                            if (buffer is not null) and length(buffer)>0 then
                                    PIPE ROW( buffer );
                            end if;
                    exception when UTL_HTTP.END_OF_BODY then
                            endLoop := true;
                    end;
     
            end loop;
            UTL_HTTP.end_response( response );
     
            return;
     
    exception when OTHERS then
            PIPE ROW( SQLERRM );
    end;
    Thank you!
    John

    John K. says:

    (1) my first question: Why am I get invited to enter variable bind by sqldeveloper? These are hard-coded in the url, I'm passing, so I don't know why I get invited to these.

    No bind variable. As bathtubs say these are substitution variables. Something that SQL * more supported for several year and something that is incorporated as a feature of some GUI for Oracle customers.

    Substitution variables are generally used in the installation scripts. You run a script (since SQL * the command-line) and passes command line parameter - these parameters are variables + & 1 + for the parameter 1, + & 2 + for the 2nd, etc..

    The script can then use these in the DDL statements (that do not support the bind variable) - e.g. create user & 1 identified by & 2....

    The customer to DEFINE in SQL command * more active/disable/configure the use of substitution variables. The default character to identify the variable substitution is "+ & +". So your problem with the URL being mutilated by your customer.

    I always use SET DEFINE OFF to disable the calendering customer my sending code on the server for execution. Another option is to use a different character to identify the substitution variables. The installation script Oracle Apex (quite large and quite complex) has the problem of the use of '&' in the code and need to also use substitution variables, as. So the installation uses the "+ ^ + ' character. I suggest to disable the substitution, or affecting a unusual as tank ' ^ ' or ' ~ '.

  • German characters problem when calling Web Services via UTL_HTTP

    Dear members,

    I try to call the services of SAP CRM Web of Oracle PL/SQL. I used following code which works very well.
    -- call web service using Oracle UTIL_HTTP packages
    DECLARE
      http_req utl_http.req;
         http_resp utl_http.resp;
         lv_request VARCHAR2(32767);
         lc_response CLOB;
         lv_buffer VARCHAR2(32000);
         lv_name          VARCHAR2(256);
         lv_hdr_value     VARCHAR2(1024);     
         l_xml XMLType;          
    BEGIN     
         utl_http.set_persistent_conn_support(true);
         utl_http.set_transfer_timeout(600);
         
         http_req:= utl_http.begin_request
                                       ( url => 'http://xyz3ni92.server.xyz.com:8045/sap/bc/srt/xip/sap/crm_bupa_custid_qr/011/customersbycrmid/http_binding'
                                       , method => 'POST'                              
                                       );
         lv_request := '<?xml version="1.0" encoding="UTF-8"?>'
         ||'<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:glob="http://sap.com/xi/CRM/Global2">'
       ||'<soap:Header/>'
       ||'<soap:Body>'
          ||'<glob:CustomerCRMByIDQuery>'
             ||'<MessageHeader>'
                ||'<ID schemeID="?" schemeAgencyID="?" schemeAgencySchemeAgencyID="?"></ID>'
                ||'<UUID></UUID>'
                ||'<ReferenceID schemeID="?" schemeAgencyID="?" schemeAgencySchemeAgencyID="?"></ReferenceID>'
                ||'<ReferenceUUID></ReferenceUUID>'
             ||'</MessageHeader>'
             ||'<BusinessPartnerSelectionByBusinessPartner>'
                ||'<UUID schemeID="?" schemeAgencyID="?"></UUID>'
                ||'<InternalID>2200117598</InternalID>'
             ||'</BusinessPartnerSelectionByBusinessPartner>'
          ||'</glob:CustomerCRMByIDQuery>'
               ||'</soap:Body>'
         ||'</soap:Envelope>';     
         /*set username and password*/
         utl_http.set_authentication (
                   r => http_req,
                   username => 'WS_USER',
                   password => 'WS_PASSWORD',
                   scheme => 'Basic',
                   for_proxy => false);     
                   
         utl_http.set_header(http_req, 'Content-Type', 'application/soap+xml;charset=UTF-8'); 
         utl_http.set_header(http_req, 'Content-Length', LENGTHB(lv_request));
         utl_http.write_text(http_req, lv_request);
         /*Make HTTP call*/
         http_resp:= utl_http.get_response(http_req);
         
         /*read response text from response*/
         BEGIN
                   LOOP
                             utl_http.read_text(http_resp, lv_buffer);
                             lc_response := lc_response || TO_CLOB(lv_buffer);
                   END LOOP;
         EXCEPTION
                   WHEN OTHERS THEN
                        -- ora-29266 end-of-body reached
                        IF SQLCODE <> -29266 THEN
                                  RAISE;
                        END IF;
         END;
         utl_http.end_response(http_resp);     
         l_xml := XMLType(lc_response);
         /*Log response for testing*/
         DELETE FROM webservice_log;
         INSERT INTO webservice_log (seq_id,xml_response) VALUES (sqe_Webservice_Log.NEXTVAL,l_xml);
    EXCEPTION WHEN OTHERS THEN
              RAISE;
    END;
    However, if there are any German character in SAP, then they are replaced by UNWANTED data when they come to Oracle.

    If I invoke continues the same web service tools like SOAP-UI, then German characters do very well. I've also drawn web service queries and answers of the side SAP, and there response shows fine. When it comes to Oracle, they are themselves corrupt.

    I'm sure it's something to do with the character, but I am not able to find where and what should I fix/change.

    Thank you for your help in advance.

    DB: Oracle Database 11 g Enterprise Edition Release 11.2.0.1.0 - 64 bit Production
    NLS_DATABASE_PARAMETERS
    PARAMETER                      VALUE                                  
    ------------------------------ ----------------------------------------
    NLS_LANGUAGE                   AMERICAN                                 
    NLS_TERRITORY                  AMERICA                                  
    NLS_CURRENCY                   $                                        
    NLS_ISO_CURRENCY               AMERICA                                  
    NLS_NUMERIC_CHARACTERS         .,                                       
    NLS_CHARACTERSET               AL32UTF8                                 
    NLS_CALENDAR                   GREGORIAN                                
    NLS_DATE_FORMAT                DD-MON-RR                                
    NLS_DATE_LANGUAGE              AMERICAN                                 
    NLS_SORT                       BINARY                                   
    NLS_TIME_FORMAT                HH.MI.SSXFF AM                           
    NLS_TIMESTAMP_FORMAT           DD-MON-RR HH.MI.SSXFF AM                 
    NLS_TIME_TZ_FORMAT             HH.MI.SSXFF AM TZR                       
    NLS_TIMESTAMP_TZ_FORMAT        DD-MON-RR HH.MI.SSXFF AM TZR             
    NLS_DUAL_CURRENCY              $                                        
    NLS_COMP                       BINARY                                   
    NLS_LENGTH_SEMANTICS           BYTE                                     
    NLS_NCHAR_CONV_EXCP            FALSE                                    
    NLS_NCHAR_CHARACTERSET         AL16UTF16                                
    NLS_RDBMS_VERSION              11.2.0.1.0   
    Kind regards
    Hari

    added other details by: Hari_639 on April 24, 2013 18:45

    I'm not really experienced with utl_http, but maybe you'll read on SET_BODY_CHARSET in the documentation.
    ISO-8859-1 is the default characterset, until you specify the characters in the attribute content_type and text media.
    But your media type is not text, then perhaps affecting the body charset UTF - 8 can help.

    concerning

  • Utl_http.READ_TEXT hung up

    I have the next request to a web service from a pl/sql procedure:
    My problem is, the answer is too large and the procedures attached to the line of the utl_http.read_text (see below) statement.
    I wrote a log file in the loop and looped several times, and then hung up.

    There would be another way to do it?... I have Oracle 11 GR 2.

    Thank you.. !!!


    -Initialize the CLOB.
    DBMS_LOB.CREATETEMPORARY (l_clob, FALSE);
    DBMS_LOB.CREATETEMPORARY (vxml_enviado, FALSE);
    DBMS_LOB.CREATETEMPORARY (vxml_recibido, FALSE);

    Utl_http.set_response_error_check (TRUE);
    Utl_http.set_response_error_check (TRUE);
    Utl_http.set_detailed_excp_support (TRUE);
    Utl_http.set_cookie_support (TRUE);
    Utl_http.set_transfer_timeout (120);
    Utl_http.set_follow_redirect (3);
    Utl_http.set_persistent_conn_support (TRUE);

    Req: =.
    () UTL_HTTP.begin_request
    "http://oasdes-lnx.sis.personal.net.py:7782 / AppWS-WSEvaluarReglaCondicionComercial-context-root/WSEvaluarReglaCondicionComercialSoapHttpPort,"
    "MESSAGE."
    "(HTTP / 1,1');"

    XML: = "some not too large xml.

    Utl_http.set_header (req, 'Content-Type', ' text/xml');
    Utl_http.set_header (req, 'Content-Length', LENGTH (xml));
    Utl_http.set_header (req,
    "SOAPAction",.
    "'http://wsevaluarreglacondicioncomercial/'");

    Utl_http.write_text (req, xml);
    resp: = UTL_HTTP.get_response (req);
    BEGIN
    LOOP
    Utl_http.READ_TEXT (RESP, respval);
    DBMS_LOB. WriteAppend (l_clob, LENGTH (respval), respval);
    END LOOP;
    Utl_http.end_response (RESP);
    EXCEPTION
    WHEN UTL_HTTP.end_of_body
    THEN
    printlg ("UTL_HTTP.end_of_body", vlogfile);
    Utl_http.end_response (RESP);
    END;

    Published by: user13058213 on 22-mar-2012 13:44

    How did respval defined in the code?

    That it works web remote service correctly when it is called with other tools (soapUI or whatever you prefer)?

    It works with smaller answers?

    What is returned when you did the logging? It stops at a certain size?

    Tip: Look into the FAQ (https://wikis.oracle.com/display/Forums/Forums+FAQ) to see how to use the

     tag to retain formatting.
    
    Edited by: A_Non on Mar 22, 2012 3:48 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
    
  • Configuring session timeout in OIM 11 g R2 for console identity and sysadmin.

    I have an obligation to congiure session timeout in IOM GR 11, 2 ps2 to more than the default value.

    where can I check the default value and how to change it?

    Thank you

    Here is the guide: Handling Flexible of Session Timeout for Oracle Identity Manager Web Applications

  • UTL_HTTP to call the RESTful web services

    I tried a few days to access a REST Web service and the response is an HTML element:

    Supported media not taken type > 10.4.16 415

    > the server refuses the request because the entity of the request is in a format not supported by the resource for the requested method.

    It works from the browser (Mozilla). And there is demand:

    https://xmlhub-test.xxx.xx/xmlhubws/jersey/SubmitMessage

    POST/xmlhubws/jersey / SubmitMessage HTTP/1.1

    Host: xmlhub - test.xxx.xx

    User-Agent: Mozilla/5.0 (Windows NT 5.2; rv:12.0) Gecko/20100101 Firefox/12.0

    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

    Accept-Language:-us, en; q = 0.5

    Accept-Encoding: gzip, deflate

    Connection: keep-alive

    Referer: https://Portal-test.xxx.XX/portal/page/Portal/xxx/extranet/opma_main/xxxx/wsclient-xmlhub.html

    Cookie: JSESSIONID = JjhpJTqKsRYFGCjL3QLV2GcYMJHLvLDVlBL5hyh5FN8K2qyb10PR!-621147356! 625535808; ObSSOCookie=s47sUDozSHzJ%2FarHPqrcaD5LkcFJXEmkuTQKr51UYXa3lZPjeNHKjzaUmxYbPxLkZYaaztIqCJwodlHpo6D4jR%2FVkKhmd%2Bcc9dJg4jw9cA3Kn%2FZxiwe3RA1Fyf2A%2BFLgy6eQStLzV6C9QbOi2lersS9gZBbYEy28etCXhPgMuOavl3Xtnf%2BeMVCj4Hg2QQxZSt%2FHjkSWRh%2FyVhDevt2yUo4zpoLTZ7ZKX28um6FO8CCXUTCvSlljWSzhzmSL9SwO;     RSERVER_XMLHUB_TEST_TCP_7012 = R1894177232

    Content-Type: multipart/form-data; Boundary = - 204562724022109

    Content-Length: 2607

    -204562724022109

    Content-Disposition: form-data; name = "content"; filename = "abc - 01.xml".

    Content-Type: text/xml

    <? XML version = "1.0" encoding = "UTF-8"? >

    ETC.

    and my code is:

    -UTL_HTTP. CLOSE_PERSISTENT_CONNS (g_wsdl_url);

    Utl_http.set_response_error_check (false);

    Utl_http.set_detailed_excp_support (true);

    Utl_http.set_cookie_support (true);

    Utl_http.set_transfer_timeout (60);

    Utl_http.set_follow_redirect (3);

    Utl_http.set_persistent_conn_support (true);

    UTL_HTTP. SET_WALLET (xxxx, xxxxx);

    v_http_request: = utl_http.begin_request ("https://xmlhub-test.xxx.xx/xmlhubws/jersey/SubmitMessage ', ' POST ',' HTTP/1.1 '");

    Utl_http.set_body_charset (' v_http_request, ' UTF-8 ');

    Utl_http.set_authentication (v_http_request, xxxx, xxxxxx, "basic", false);

    UTL_HTTP.set_header(v_http_request,'Host','xmlhub-test.xxx.xx');

    UTL_HTTP.set_header(v_http_request,'User-Agent', 'Mozilla/5.0 (Windows NT 5.2;)) RV:12.0) Gecko/20100101 Firefox / 12.0 ');

    Utl_http.set_header(v_http_request,'Accept','Text/HTML,application/XHTML+XML,application/XML;q=0.9,*/*;q=0.8 ');

    UTL_HTTP.set_header(v_http_request,'Accept-Language','en-US,en;q=0.5');

    -UTL_HTTP.set_header (v_http_request, 'Accept-Encoding', 'gzip, deflate');

    Utl_http.set_header (v_http_request, 'Connection', 'keep-alive');

    -UTL_HTTP.set_header (v_http_request, 'Referer','https://portal-test.bnr.ro/portal/page/portal/BNR/extranet/opma_main/opma/wsclient-xmlhub.html');

    text/html; Charset = UTF - 8-' multipart/form-data ".

    Utl_http.set_header (v_http_request, 'Content-Type', ' multipart/Form-data');

    Utl_http.set_header (v_http_request, "Transfer-Encoding", "chunked");

    Utl_http.set_header (v_http_request, "Content-Length", l_clob_len);

    Utl_http.set_header (v_http_request, 'id', '"downloadMessage" ');

    Utl_http.write_text (v_http_request, p_xml.getStringVal ());

    ...

    What can I do? How cand I try. I tried dozens of variants (query of xml > 180 files).

    Please help me.

    Tjank you!

    Generate a model for POST UTL_HTTP, of the w.

    I suggest using the free version of SoapUI for this. Very simple. Create the new project of REST. Enter w location (URL). Generates a sample call and look at how the HTML call is formatted. You can also trigger test POST CALL using SoapUI. When it works, copy - paste this MESSAGE template for use in PL/SQL

    From what you have posted, it seems to be an error in user code. So if you can get the details of the correct POSITION, the user code should work.

  • How to manage the response of utl_http

    Hello
    I use the code to call a https using the POST method below

    Utl_http.set_Proxy (apex_application.g_proxy_server, NULL);
    Utl_http.set_persistent_conn_support (true);
    Utl_http.set_transfer_timeout (300);
    Utl_http.set_wallet (p_wallet, p_wallet_pwd);
    l_http_req: = utl_http.begin_request (p_api_url, 'POST');
    Utl_http.set_header (l_http_req, "Proxy-Connection ',' Keep-Alive'");
    Utl_http.set_header ("l_http_req, 'Content-Type', ' application/x-www-formulaires-urlencoded; charset = utf-8 ');
    Utl_http.set_header (l_http_req, "Content-Length", length (l_post) ");
    Utl_http.write_text (l_http_req, l_post);
    l_http_resp: = utl_http.get_response (l_http_req);
    Utl_http.READ_TEXT (l_http_resp, l_response);

    The return url a respose with sub content l_response
    < html >
    < head >
    < META HTTP-EQUIV = "content-type" CONTENT = text/html"; charset = UTF8' >
    < / head >
    < title > payment Page < /title >

    < are method = "POST" name = "online payment" action = "http://www.testing.com" >
    < input type = "hidden" name = "MerchantCode" value = "M01247" > < br >
    < input type = "hidden" name = "PaymentId" value = "2" > < br >
    < input type = "hidden" name = "RefNo" value = "0001" > < br >
    < input type = "hidden" name = "Amount" value = "1" > < br >
    < input type = "hidden" name = "Currency" value = "MYR" > < br >
    < input type = "hidden" name = "Note" value = "Tests1" > < br >
    < input type = "hidden" name = "transaction ID" value = "" > < br >
    < input type = "hidden" name = "AuthCode" value = "" > < br >
    < input type = "hidden" name = "Status" value = "0" > < br >
    < input type = "hidden" name = "ErrDesc" value = "Permission do not allow" > < br >
    < input type = "hidden" name = "Signature" value = "" > < br >
    < / make >

    < script language = "JavaScript" >
    document.ePayment.submit ();
    < /script >

    < / html >

    Apparently it will redirect to http://www.testing.com,
    How my procedure should handle this response then it will redirect to the url?

    Thank you.

    Vincent pek

    Edited by: [email protected] may 3, 2010 07:09

    Try the following

    Save the contents of the "l_response content" in a page/app-item.
    Create a new page with a region of dynamic pl/sql code with the following code

    htp.p(:l_response_app_item);
    

    Create a branch on the execution of the call to UTL_HTTP page' to branch to the new created page as above

    When the new page loads, it must submit automatically to http://www.testing.com.

    CITY

  • How to get GMT or IST using the PL/SQL FUNCTION

    Hello, I use Oracle 10 G database (operating system: Windows-32 or 64 Windows).
    How can I get the date and time GMT or International without mentioning SYSDATE / DBDATE.
    Real problem the DB Sever time is frequently manipulated by the end user and I would like to connect the actual date and time of the transaction in other audit tables.

    Kind regards

    Tarun

    It won't increase your load on the server, you would simply have many waiting http events and the performance of your application depends on your internet connection to customers. Something not very desirable if you ask me and certainly will cause you headaches. Really bad headaches, and one day someone will ask who came up with the brilliant idea to get the timestamp system via http instead of... + sysdate + (I smell a future article http://thedailywtf.com/).

    In any case; That is: the http based sysdate function. I use mod_plsql to my 'webservice' running on a server where I'm sure the date is correct. You can use what you want, for a 'real' webservice implementation will be a little different. Google should know the answer about calling Web services from the data base.

    $[CHE_TEST@asterix1_impl] create or replace procedure server_time as
      2  begin
      3  htp.print(to_char(sysdate, 'dd.mm.yyyy hh24:mi:ss'));
      4  end;
      5  /
    
    Procedure created.
    

    As you can see the procedure does nothing else then exit the sysdate from my database server in a specified date format. I then call the procedure mod_plsql via utl_http on another server:

    $[CHE_TEST@asterix2_al32utf8] create or replace function get_server_time return date is
      2  begin
      3    --default would be 60, this is clearly too much
      4    utl_http.set_transfer_timeout(1);
      5    return to_date(utl_http.request('http://ias4/asterix1_impl_cronet/server_time'), 'dd.mm.yyyy hh24:mi:ss');
      6  exception
      7    when utl_http.REQUEST_FAILED then
      8      return sysdate;
      9  end;
     10
     11  /
    
    Function created.
    

    Now get_server_time will give me the time of my first database server (unless the requested HTTP fails for any reason, then it'll be sysdate)

    $[CHE_TEST@asterix2_al32utf8] select get_server_time from dual;
    
    GET_SERVER_TIME
    -------------------
    24.07.2012 13:35:00
    

    Again, if you go in this way use the feature carefully and not at each end of your application as it will give you performance problems .

    see you soon

  • Redirect to another page with parameter passing using the POST method

    Hello

    I need to redirect to another page and pass parameters to it with the POST (not GET) method. How can I do?

    So far, I tried the 2 options and none of them works very well:
    1. I wrote a pl/sql procedure, but if I run it, then the page runs on my server application instead of actually going to another page in another server (I see the neame of the procedure in the web browser's address bar). Is there a way to work around a bit so that really, it goes to another page and pass the variables?

    procedure do_post)
    p_api_url in varchar2)
    is
    l_http_req utl_http.req;
    l_http_resp utl_http.resp;
    l_response varchar2 (4000);
    l_post varchar2 (4000);
    v_line varchar2 (4000);
    v_wallet varchar2 (100): = "file:/etc/ORACLE/WALLETS/oracle5";
    v_wallet_pwd varchar2 (100): = "test1234".
    Start
    l_post: = ' VK_SERVICE = 1001 & VK_VERSION = 008 & VK_SND_ID = testvpos & VK_STAMP = 88';

    Utl_http.set_Proxy (apex_application.g_proxy_server, NULL);
    Utl_http.set_persistent_conn_support (true);
    Utl_http.set_transfer_timeout (300);
    Utl_http.set_wallet (v_wallet, v_wallet_pwd);
    l_http_req: = utl_http.begin_request (p_api_url, 'POST');
    Utl_http.set_header (l_http_req, "Proxy-Connection ',' Keep-Alive'");
    Utl_http.set_header ("l_http_req, 'Content-Type', ' application/x-www-formulaires-urlencoded; charset = utf-8 ');
    Utl_http.set_header (l_http_req, "Content-Length", length (l_post) ");
    Utl_http.write_text (l_http_req, l_post);
    l_http_resp: = utl_http.get_response (l_http_req);

    LOOP
    Utl_http.read_line (l_http_resp, v_line, TRUE);
    HTP.p (v_line);
    END LOOP;
    Utl_http.end_response (l_http_resp);

    EXCEPTION
    WHEN utl_http.end_of_body THEN
    Utl_http.end_response (l_http_resp);
    end do_post;


    2. the second option, I tried is to put this script to my page of request code:

    < name of the form = 'mounted' action = 'https://www.somekindofurl.com/cgi-bin/dv.sh/un3min.r. '
    method = "POST" target = "_top" >
    < input type = "hidden" name = "VK_SERVICE" value = "1001" >
    < input type = "hidden" name = "VK_VERSION" value = "008" >
    < input type = "hidden" name = "VK_SND_ID" value = "testvpos" >
    < input type = "hidden" name = "VK_STAMP" value = "88" >
    < input type = "submit" value = "Let's's Pay" >
    < / make >

    < / make >

    But it does not work as APEX has its own system of Forms control. Is it possible to play? I tried to delete #FORM # of page templates and it works fine then. The problem is that I have other forms on the page as well (login form + search form) so I can't remove this manipulation of shape native APEX. Is it possible to play with it?


    Thank you much in advance.

    Hi Ibenarobeno,

    Your form can live at the end of the page with all the hidden items.

    You can then control with buttons and fields within the form of the Apex.
    through a bit of javascript.

    Concerning

    Michael

  • How to catch the error in time-out in BEPL

    Hi, I am building some SOA BPEL to call another SOAP service that may treat the time quite a long time. In this case, SOA BPEL fails with ErrorCode ORAMED-03303. In order to ensure the completion of the entire BPEL process, I tried to add a CatchAll to intercept this error. But FAILED. The BEPL still does not with ORAMED-03303. Can someone help me on this? Thank you.

    Hi Lisoft,

    You might see these errors because of the long running process. There are several places where you have to fine-tune the settings of time-out.

    The first thing you should look into is the MBean timeout "SyncMaxWaitTime" which is set by default at 45 seconds. (Connect on SOA EM > SOA > click right on soa-infra > Administration SOA > BPEL properties > more BPEL properties > SyncMaxWaitTime). You then have to check what the JTA transaction time-out set for the instance of weblogic (connect on the SOA console-> click-> JTA field).

    You can control the time-out settings max on a composite level using "oracle.webservices.httpReadTimeout" and "oracle.webservices.httpConnTimeout" binding properties. These values configured in the composite must be less than the value of the "SyncMaxWaitTime" for synchronous processes.

    If you use the properties mentioned above for your Web service reference, then you could catch the fault of "timeout" in your composite. The binding reference might look like below in the file composite.xml.

    UI:wsdlLocation = "TestService.wsdl" > "

    http://xmlns.Oracle.com/SOATestWSService/TestWSService/bpelTestWSService#WSDL.interface (bpelTestWSService)"/ >

    http://xmlns.Oracle.com/SOATestWSService/TestWSService/bpelTestWSService#WSDL.EndPoint(TestWSService_ep/bpelTestWSService_pt)"

    location =""

    soapVersion = "1.1" >

    much = 'false' override = "may" > 10000

         

    much = 'false' override = "may" > 10000

    much = 'false' override = "may" > false

    Hope the link below could be very useful for you.

    http://soasol.blogspot.com/2009/12/how-to-set-timeout-for-Web-service-in.html

    https://technology.AMIS.nl/2011/11/18/timeouts-in-Oracle-SOA-Suite-11g/

    It will be useful.

  • How to control the ws appeal period

    Hi Experts,

    I use bpm12.1.3, when the process web service using the service task, how to control the delay?

    Best regards

    Hi user,

    There is a nice blog on wait times. It's about 11g, but it also applies to 12 c.

    https://technology.AMIS.nl/2011/11/18/timeouts-in-Oracle-SOA-Suite-11g/

    Antonis

  • Migrated JDeveloper 10 g application JDev11g (11.1.1.7) when you run my our application then error java.lang.NoClassDefFoundError: ${java}

    Using the 7101 port *.

    C:\Users\Administrator\AppData\Roaming\JDeveloper\system11.1.1.7.40.64.93\DefaultDomain\bin\startWebLogic.cmd

    [waiting for the server to complete its initialization...].

    Arguments of memory in JAVA: - Xms256m-Xmx512m - XX: CompileThreshold = 8000 - XX: PermSize = 128 m - XX: MaxPermSize = 512 m.

    Start mode of WLS = development.

    CLASSPATH=D:\ORACLE~1.7\MIDDLE~1\ORACLE~1\modules\oracle.jdbc_11.1.1\ojdbc6dms.jar;D:\ORACLE~1.7\MIDDLE~1\patch_wls1035\profiles\default\sys_manifest_classpath\weblogic_patch.jar;D:\ORACLE~1.7\MIDDLE~1\patch_jdev1111\profiles\default\sys_manifest_classpath\weblogic_patch.jar;D:\ORACLE~1.7\MIDDLE~1\JDK160~1\lib\tools.jar;D:\ORACLE~1.7\MIDDLE~1\WLSERV~1.3\server\lib\weblogic_sp.jar;D:\ORACLE~1.7\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.jar;D:\ORACLE~1.7\MIDDLE~1\modules\features\weblogic.server.modules_10.3.5.0.jar;D:\ORACLE~1.7\MIDDLE~1\WLSERV~1.3\ server\lib\webservices.jar;D:\ORACLE~1.7\MIDDLE~1\modules\ORGAPA~1.1/lib/ant-all.jar;D:\ORACLE~1.7\MIDDLE~1\modules\NETSFA~1.0_1/lib/ant-contrib.jar;D:\ORACLE~1.7\MIDDLE~1\ORACLE~1\modules\oracle.jrf_11.1.1\jrf.jar;D:\ORACLE~1.7\MIDDLE~1\WLSERV~1.3\common\derby\lib\derbyclient.jar;D:\ORACLE~1.7\MIDDLE~1\WLSERV~1.3\server\lib\xqrl.jar;D:\Oracle_11.1.1.7\Middleware\jdk160_24\bin

    .

    PATH=D:\ORACLE~1.7\MIDDLE~1\patch_wls1035\profiles\default\native;D:\ORACLE~1.7\MIDDLE~1\patch_jdev1111\profiles\default\native;D:\ORACLE~1.7\MIDDLE~1\WLSERV~1.3\server\native\win\32;D:\ORACLE~1.7\MIDDLE~1\WLSERV~1.3\server\bin;D:\ORACLE~1.7\MIDDLE~1\modules\ORGAPA~1.1\bin;D:\ORACLE~1.7\MIDDLE~1\JDK160~1\jre\bin;D:\ORACLE~1.7\MIDDLE~1\JDK160~1\bin;D:\OracleDb_11g\app\oracle\product\11.2.0\server\bin;; C:\product\10.1.3.1\OracleAS_1\jdk\bin; C:\product\10.1.3.1\OracleAS_1\ant\bin; C:\product\10.1.3.1\OracleAS_1\bin; C:\Windows\System32; C:\Windows; C:\Windows\System32\Wbem; C:\Windows\system32\WindowsPowerShell\v1.0\; C:\Program Files\Java\jdk1.6.0_26\bin;;D:\ Oracle~1.7\MIDDLE~1\WLSERV~1.3\server\native\win\32\oci920_8

    .

    ***************************************************

    * To start WebLogic Server, use a username and *.

    * password assigned to an administrator-level user.  For *.

    * server administration, using the WebLogic Server *.

    * the http://hostname:port\console console *.

    ***************************************************

    from weblogic with the Java version:

    Java version "1.6.0_24".

    Java (TM) SE Runtime Environment (build 1.6.0_24 - b50)

    Java Client VM (build 19.1 - b02, mixed mode)

    WLS starting with line:

    D:\ORACLE~1.7\MIDDLE~1\JDK160~1\bin\java-client-Xms256m-Xmx512m - XX: CompileThreshold = 8000 - XX: PermSize = 128 m - XX: MaxPermSize = $512m-Dweblogic.Name=DefaultServer-Djava.security.policy=D:\ORACLE~1.7\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.policy {java} - ${oc4j.jar}-Djava.protocol.handler.pkgs=com.sun.net.ssl-Djbo.debugoutput=console-Dadfvdt.disableOjspDeployment=true-Doracle.jdeveloper.adrs=true-Dweblogic.nodemanager.ServiceEnabled=true-classpath ${oc4j.environ.type} ${memory.archive.flag} ${keep.alive.timeout.flag} ${oracle.jms.lock.flag} ${oc4j.main.class} - config ${server.xml} - Xverify: aucun-da-Dplatform.home=D:\ORACLE~1.7\MIDDLE~1\WLSERV~1.3-Dwls.home=D:\ORACLE~1.7\MIDDLE~1\WLSERV~1.3\server-Dweblogic.home=D:\ORACLE~1.7\MIDDLE~1\ WLSERV ~ 1.3\server-Djps.app.credential.overwrite.allowed= true-Dcommon.components.home=D:\ORACLE~1.7\MIDDLE~1\ORACLE~1-Djrf.version=11.1.1-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger-Ddomain.home=C:\Users\ADMINI~1\AppData\Roaming\JDEVEL~1\SYSTEM~1.93\DEFAUL~1-Djrockit.optfile=D:\ORACLE~1.7\MIDDLE~1\ORACLE~1\modules\oracle.jrf_11.1.1\jrocket_optfile.txt-Doracle.server.config.dir=C:\Users\ADMINI~1\AppData\Roaming\JDEVEL~1\SYSTEM~1.93\DEFAUL~1\config\FMWCON~1\servers\DefaultServer-Doracle.domain.config.dir=C:\Users\ADMINI~1\AppData\Roaming\JDEVEL~1\SYSTEM~1.93\DEFAUL~1\config\FMWCON~1-Digf.arisidbeans.carmlloc=C:\Users\ ADMINI~1\AppData\Roaming\JDEVEL~1\SYSTEM~1.93\ DEFAUL~1\config\FMWCON~1\carml-Digf.arisidstack.home=C:\Users\ADMINI~1\AppData\Roaming\JDEVEL~1\SYSTEM~1.93\DEFAUL~1\config\FMWCON~1\arisidprovider-Doracle.security.jps.config=C:\Users\ADMINI~1\AppData\Roaming\JDEVEL~1\SYSTEM~1.93\DEFAUL~1\config\fmwconfig\jps-config.xml-Doracle.deployed.app.dir=C:\Users\ADMINI~1\AppData\Roaming\JDEVEL~1\SYSTEM~1.93\DEFAUL~1\servers\DefaultServer\tmp\_WL_user-Doracle.deployed.app.ext=\--Dweblogic.alternateTypesDirectory=D:\ORACLE~1.7\MIDDLE~1\ORACLE~1\modules\oracle.ossoiap_11.1.1 , D:\ORACLE~1.7\MIDDLE~1\ORACLE~1\modules\oracle.oamprovider_11.1.1,D:\ORACLE~1.7\MIDDLE~1\ORACLE~1\modules\oracle.jps_11.1.1-Djava.protocol.handler.pkgs=oracle.mds.net.protocol-Dweblogic.jdbc.remoteEnabled=false-Dwsm.repository.path=C:\Users\ADMINI~1\AppData\Roaming\JDEVEL~1\SYSTEM~1.93\DEFAUL~1\oracle\store\gmds-Dweblogic.management.discover=true-Dwlw.iterativeDev=-Dwlw.testConsole=-Dwlw.logErrorsToConsole=-Dweblogic.ext.dirs=D:\ORACLE~1.7\MIDDLE~1\patch_wls1035\profiles\default\sysext_manifest_classpath;D:\ORACLE~1.7\MIDDLE~1\patch_jdev1111\profiles\default\sysext_manifest_classpath weblogic. Server

    1. java.lang.NoClassDefFoundError: ${java}

    Caused by: java.lang.ClassNotFoundException: ${java}

    in java.net.URLClassLoader$ 1.run(URLClassLoader.java:202)

    at java.security.AccessController.doPrivileged (Native Method)

    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

    at java.lang.ClassLoader.loadClass(ClassLoader.java:305)

    to Sun.misc.Launcher$appclassloader$ AppClassLoader.loadClass (Launcher.java:301)

    at java.lang.ClassLoader.loadClass(ClassLoader.java:246)

    The main class is not found: ${java}.  Program ends.

    Exception in thread "main" process is completed.

    Please give some suggestion

    Thanks and greetings

    Maroof

    Hi all

    Problem solved now I am able to run and error disappeared with changes below.

    Go to JDeveloper-> Navigator-> ViewControler project properties > JAVA EE Application > integrated command-line WLS.

    Precedent has been

    ${java} ${} jvm - classpath ${oc4j.jar} {java.options}

    ${oc4j.environ.type} ${memory.archive.flag} {keep.alive.timeout.flag}

    ${oracle.jms.lock.flag}

    ${oc4j.main.class} - config ${server.xml}

    Replace it with

    ${jvm} ${java.options}

    Reason: Instance OC4J from 10g Application after migration is still there, but in 11g application using weblogic instead of oc4j.

    Thanks and greetings

    Maroof Ahmed

  • Scheduled task

    Hello

    We have a scheduled task that runs every 30 minutes, the work envokes a web service that sends data to another agency. The problem is the following:
    When the job is run every 30 minutes, we get the following error message:
    91 - logging of errors on WS--29273: ORA-29273: failure of the request HTTP ORA-06512: at "SYS." UTL_HTTP,"lin
    Code to submit work:
    DECLARE
    jobno NUMBER;
    BEGIN
    Dbms_job. Submit
    + (work = > jobno +)
    + This = > ' start SEND_DATA. SEND_LOG_TO; end; » +
    +, next_date = > SYSDATE +.
    + interval = > 'SYSDATE + 1/48'); +
    COMMIT;
    END;

    BUT when the WS is called with the following code:
    Start SEND_DATA. SEND_LOG_TO_NRF; end
    It does not error.

    You can change the package WS because it provided by the organization from the outside.

    Does anyone have advice - is it permissions on the firewall or something that is not configured correctly?

    Thank you
    Roald

    Yes, maybe...

    To the inside of the package where the url is called... you can increase the time-out url to something like 5 min...

    utl_http.set_transfer_timeout(300);
    

    Ravi Kumar

    Published by: user10164479 on July 23, 2009 13:39

Maybe you are looking for

  • notofication system

    I just got a 'notification system' indicating that I have to open a session to the xxxxxxxxxx that it did not seem a valid address for you so I'm not here. What was it? Was it a valid notification? If that were the case, could you please send me the

  • export to spreadsheet - data 2 channels appear in alternation with loop of producer/consumer

    Hello I'm having trouble with the function "Export the waveform to the worksheet" - but it is not clear to me if the problem is with how I use the export feature or if I am wrong concatenating two waveforms of different modules of the series prior to

  • Unable to activate XP product key

    Computer with Windows XP Media Center 2005.  It work yesterday and got a message saying: "this copy of Windows must be activated with Microsoft before you can log on."  Tried to activate the wizard activate over the internet.  Tells me that the produ

  • Aurora r5 stock heatsync voltage problems with evga modular 750 watt power supply

    The stock fan on the heat sink thermal condition of the R5 Aurora stock runs just as fast as it can while holding a 6700 k, you mind, at a steady temperature around 30 C idle. Previous the cpu and psu were almost silent, whereas now the fan seems to

  • Time increasing while sending data via http repeatedly on the storm

    Hi all! My application sends data (in general, this is a picture of ~ 1200 Kb) to the server via http. The data are sent ok, but the when I send data several times (without leaving the application) the time devoted to writing the data in the outputSt