3 Replies Latest reply: Nov 2, 2010 6:57 AM by abhishek476 RSS

    UTL_HTTP.request_pieces:::: response --> UNDER CONSTRUCTION......Why???

      Hi All,

      I'm trying to use the UTL_HTTP utility (for the first time :)), have read a few documents and tried one example. The one i tried is as below:
      x utl_http.html_pieces;
      len PLS_INTEGER;
      proxy varchar2(100):= null;
      no_proxy_domains varchar2(100):= null;
      UTL_HTTP.set_proxy ('***.**.**.**',****);
      x := utl_http.request_pieces('http://www.google.com/', 100);
      dbms_output.put_line(x.count || ' pieces were retrieved.');
      dbms_output.put_line('with total length ');
      IF x.count < 1 THEN
      len := 0;
      FOR i in 1..x.count LOOP
      len := len + length(x(i));
      END LOOP;
      END IF;
      UTL_HTTP.get_proxy (proxy, no_proxy_domains);
      The output is coming as:
      1 pieces were retrieved.
      with total length

      <meta HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">

      <title ID=titletext>Under Construction</title>

      <body bgcolor=white>
      <td ID=tableProps width=70 valign=top align=center>
      <img ID=pagerrorImg src="pagerror.gif" width=36 height=48>
      <td ID=tablePropsWidth width=400>

      <h1 ID=errortype style="font:14pt/16pt verdana; color:#4e4e4e">
      <P ID=Comment1><!--Problem--><P ID="errorText">Under Construction</h1>

      <P ID=Comment2><!--Probable causes:<--><P ID="errordesc"><font style="font:9pt/12pt verdana; color:black">
      The site you are trying to view does not currently have a default page. It may be in the process of being upgraded >and configured.
      <P ID=term1>Please try this site again later. If you still experience the problem, try contacting the Web site >administrator.

      <hr size=1 color="blue">

      <P ID=message1>If you are the Web site administrator and feel you have received this message in error, please see >&quot;Enabling and Disabling Dynamic Content&quot; in IIS Help.

      <h5 ID=head1>To access IIS Help</h5>
      <li ID=bullet1>Click <b>Start</b>, and then click <b>Run</b>.
      <li ID=bullet2>In the <b>Open</b> text box, type <b>inetmgr</b>. IIS Manager appears.
      <li ID=bullet3>From the <b>Help</b> menu, click <b>Help Topics</b>.
      <li ID=bullet4>Click <b>Internet Information Services</b>.</ol>


      I'm have no idea of why this "Under Construction" tag is coming and i could not understand any of the reasons mentioned for the same. I have tried GOOGLing for the reason but to no effect.

      All i can conclude from the above example is that either there is some problem with proxy i'm giving or i've not understood the UTL_HTTP concept properly.

      Looking forward for any suggestion or help!!!

      Edited by: user11089213 on Nov 2, 2010 4:08 AM
        • 1. Re: UTL_HTTP.request_pieces:::: response --> UNDER CONSTRUCTION......Why???
          Starlight Rider
          I don't need a proxy, so I commented out the set_proxy line and executed:
              x                UTL_HTTP.HTML_PIECES;
              len              PLS_INTEGER;
              proxy            VARCHAR2(100):= NULL;
              no_proxy_domains VARCHAR2(100):= NULL;
          --    UTL_HTTP.SET_PROXY ('***.**.**.**',****);
              x := UTL_HTTP.REQUEST_PIECES('http://www.google.com/', 100);
              DBMS_OUTPUT.PUT_LINE(x.count || ' pieces were retrieved.');
              DBMS_OUTPUT.PUT_LINE('with total length ');
              IF x.count < 1 THEN
                  len := 0;
                  FOR i in 1..x.count LOOP
                      len := len + LENGTH(x(i));
                  END LOOP;
              END IF;
              UTL_HTTP.GET_PROXY (proxy, no_proxy_domains);
              DBMS_OUTPUT.PUT_LINE(proxy || '--' || no_proxy_domains);
          It worked fine for me. Maybe the proxy you're using is messing up the results.
          • 2. Re: UTL_HTTP.request_pieces:::: response --> UNDER CONSTRUCTION......Why???

            I'm still getting the same error, even if i dont use the proxy command!!!

            I think i'll have to use proxy as the client for whom i'm workin is having its own network established and for any external connections even our web browser is configured to go thru a Proxy.

            Anyways, thanks for the response!!! Hopefully will get some other responses as well!!
            • 3. Re: UTL_HTTP.request_pieces:::: response --> UNDER CONSTRUCTION......Why???
              How are you mentioning the proxy with port ? you don't need to give original address and port, just use xyxabc.com:8888 etc. From your example UTL_HTTP.set_proxy (',?????);