<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: HTTP POST from inside Oracle</title>
	<atom:link href="http://awads.net/wp/2005/11/30/http-post-from-inside-oracle/feed/" rel="self" type="application/rss+xml" />
	<link>http://awads.net/wp/2005/11/30/http-post-from-inside-oracle/</link>
	<description>News, views, tips and tricks on Oracle and other fun stuff</description>
	<pubDate>Wed, 09 Jul 2008 00:51:49 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
		<item>
		<title>By: taneal</title>
		<link>http://awads.net/wp/2005/11/30/http-post-from-inside-oracle/#comment-52183</link>
		<dc:creator>taneal</dc:creator>
		<pubDate>Wed, 02 Jul 2008 00:10:35 +0000</pubDate>
		<guid isPermaLink="false">http://awads.net/wp/?p=171#comment-52183</guid>
		<description>Hmmmm.  I was hoping that wouldn't be the answer :)

Oh well, guess I have to figure something else out then for doing this.</description>
		<content:encoded><![CDATA[<p>Hmmmm.  I was hoping that wouldn&#8217;t be the answer <img src='http://awads.net/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Oh well, guess I have to figure something else out then for doing this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eddie Awad</title>
		<link>http://awads.net/wp/2005/11/30/http-post-from-inside-oracle/#comment-52182</link>
		<dc:creator>Eddie Awad</dc:creator>
		<pubDate>Tue, 01 Jul 2008 22:54:40 +0000</pubDate>
		<guid isPermaLink="false">http://awads.net/wp/?p=171#comment-52182</guid>
		<description>taneal, it seems that you need to decrypt the data on the other end.</description>
		<content:encoded><![CDATA[<p>taneal, it seems that you need to decrypt the data on the other end.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: taneal</title>
		<link>http://awads.net/wp/2005/11/30/http-post-from-inside-oracle/#comment-52180</link>
		<dc:creator>taneal</dc:creator>
		<pubDate>Tue, 01 Jul 2008 17:13:05 +0000</pubDate>
		<guid isPermaLink="false">http://awads.net/wp/?p=171#comment-52180</guid>
		<description>This is really interesting.  How would this work on a page that encrypts the names/ID's of form elements?  For instance, when a user creates a job post on our site, I then take them to a page that loads Craigslist into an IFRAME.  I want to be able to populate the fields with the information they entered on our site (so they don't have to re-type everything).  I've been having problems with it though.</description>
		<content:encoded><![CDATA[<p>This is really interesting.  How would this work on a page that encrypts the names/ID&#8217;s of form elements?  For instance, when a user creates a job post on our site, I then take them to a page that loads Craigslist into an IFRAME.  I want to be able to populate the fields with the information they entered on our site (so they don&#8217;t have to re-type everything).  I&#8217;ve been having problems with it though.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shaman</title>
		<link>http://awads.net/wp/2005/11/30/http-post-from-inside-oracle/#comment-52066</link>
		<dc:creator>Shaman</dc:creator>
		<pubDate>Fri, 11 Apr 2008 06:42:35 +0000</pubDate>
		<guid isPermaLink="false">http://awads.net/wp/?p=171#comment-52066</guid>
		<description>Hi Eddie

The procedure works, as in it posts to the URL with the parameters, but it also throws an error:

SQL execution error, 
ORA-29273: HTTP request failed 
ORA-06512: at "SYS.UTL_HTTP", line 1029 ORA-29261: bad argument 
ORA-06512: at "HH.UTIL_PKG", line 101

This is how im using the code (its in a trigger)

DECLARE
v_url varchar2(200);
l_data clob := '1';
....

BEGIN
...
	select REPLACE(REPLACE(:new.input_value,' ',NULL),'-',NULL) into v_phone_num from dual;
	-- select REPLACE(REPLACE(1234567,' ',NULL),'-',NULL) into v_phone_num from dual;
	v_url := 'http://www.******.com/test.asp?pnum=12345' &#124;&#124; '&#38;' &#124;&#124; 'phone=' &#124;&#124; v_phone_num;


util_pkg.http_post(p_url_in =&#62; v_url, p_data_in =&#62; l_data);


Im only passing 2 arguments, p_url and p_data_in, what is the bad argument error about?
Any help would be greatly appreciated.</description>
		<content:encoded><![CDATA[<p>Hi Eddie</p>
<p>The procedure works, as in it posts to the URL with the parameters, but it also throws an error:</p>
<p>SQL execution error,<br />
ORA-29273: HTTP request failed<br />
ORA-06512: at &#8220;SYS.UTL_HTTP&#8221;, line 1029 ORA-29261: bad argument<br />
ORA-06512: at &#8220;HH.UTIL_PKG&#8221;, line 101</p>
<p>This is how im using the code (its in a trigger)</p>
<p>DECLARE<br />
v_url varchar2(200);<br />
l_data clob := &#8216;1&#8242;;<br />
&#8230;.</p>
<p>BEGIN<br />
&#8230;<br />
	select REPLACE(REPLACE(:new.input_value,&#8217; &#8216;,NULL),&#8217;-',NULL) into v_phone_num from dual;<br />
	&#8211; select REPLACE(REPLACE(1234567,&#8217; &#8216;,NULL),&#8217;-',NULL) into v_phone_num from dual;<br />
	v_url := &#8216;http://www.******.com/test.asp?pnum=12345&#8242; || &#8216;&amp;&#8217; || &#8216;phone=&#8217; || v_phone_num;</p>
<p>util_pkg.http_post(p_url_in =&gt; v_url, p_data_in =&gt; l_data);</p>
<p>Im only passing 2 arguments, p_url and p_data_in, what is the bad argument error about?<br />
Any help would be greatly appreciated.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shaman</title>
		<link>http://awads.net/wp/2005/11/30/http-post-from-inside-oracle/#comment-52030</link>
		<dc:creator>Shaman</dc:creator>
		<pubDate>Thu, 13 Mar 2008 12:31:20 +0000</pubDate>
		<guid isPermaLink="false">http://awads.net/wp/?p=171#comment-52030</guid>
		<description>Thanks! Worked well.</description>
		<content:encoded><![CDATA[<p>Thanks! Worked well.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eddie Awad</title>
		<link>http://awads.net/wp/2005/11/30/http-post-from-inside-oracle/#comment-51989</link>
		<dc:creator>Eddie Awad</dc:creator>
		<pubDate>Wed, 20 Feb 2008 20:46:33 +0000</pubDate>
		<guid isPermaLink="false">http://awads.net/wp/?p=171#comment-51989</guid>
		<description>DB, I suggest you ask your question on the &lt;a href="http://forums.oracle.com/forums/forum.jspa?forumID=82" rel="nofollow"&gt;Forms OTN Forum&lt;/a&gt;.</description>
		<content:encoded><![CDATA[<p>DB, I suggest you ask your question on the <a href="http://forums.oracle.com/forums/forum.jspa?forumID=82" rel="nofollow">Forms OTN Forum</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DB</title>
		<link>http://awads.net/wp/2005/11/30/http-post-from-inside-oracle/#comment-51988</link>
		<dc:creator>DB</dc:creator>
		<pubDate>Wed, 20 Feb 2008 19:24:31 +0000</pubDate>
		<guid isPermaLink="false">http://awads.net/wp/?p=171#comment-51988</guid>
		<description>Thanks for the info. This article is good and it might work for me. I was wondering if at the receiving end i need to open a URL from ORACLE Forms, with the following code for hte post, how can I do that? Can I create this procedure at the database level and do the post there and then just invoke the URL from the when-button-pressed trigger using web.show_document()? 

The code for hte post is something like this.

/* Code for the POST */


        
        
        
        
        
        

        
        
        
        

        
        
        
        

    
Click this button to view the books related to these courses.
</description>
		<content:encoded><![CDATA[<p>Thanks for the info. This article is good and it might work for me. I was wondering if at the receiving end i need to open a URL from ORACLE Forms, with the following code for hte post, how can I do that? Can I create this procedure at the database level and do the post there and then just invoke the URL from the when-button-pressed trigger using web.show_document()? </p>
<p>The code for hte post is something like this.</p>
<p>/* Code for the POST */</p>
<p>Click this button to view the books related to these courses.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ask4bv</title>
		<link>http://awads.net/wp/2005/11/30/http-post-from-inside-oracle/#comment-50487</link>
		<dc:creator>ask4bv</dc:creator>
		<pubDate>Tue, 10 Apr 2007 18:39:37 +0000</pubDate>
		<guid isPermaLink="false">http://awads.net/wp/?p=171#comment-50487</guid>
		<description>&lt;p&gt;We are using similar PL/SQL code to post the XML to a WebService.&lt;/p&gt;

&lt;p&gt;Erroring Scenario (Generally this code works perfectly in production,But the below case had happened once ):&lt;/p&gt;

&lt;p&gt;1) XML has posted succesfully 
2) When reading the response ( l_http_resp := utl_http.get_response (l_http_req);) an error occured and control goes to main Exception.
   and throwing a "Bad argument" error.&lt;/p&gt;

&lt;p&gt;How do Oracle manages a case where XML has posted successfully and then fail to provide success or failure response . ?&lt;/p&gt;

&lt;p&gt;Anybody experience a similar error?&lt;/p&gt;

&lt;p&gt;Oracle version: DB version 9.2.04 generates the XML and posts on an Oracle Apps Server (HTTPServer).&lt;/p&gt;

&lt;p&gt;Sample Code Summarized:&lt;/p&gt;

&lt;pre&gt;-- Begin the post request

-- Set the HTTP request headers


-- Write the data to the body of the HTTP request

    utl_http.write_text(l_http_req, p_data_in);

-- Process the request and get the response.

 l_http_resp := utl_http.get_response (l_http_req);
&lt;/pre&gt;

&lt;p&gt;if the response is 200 Then Insert into a post message table which logs the content of succesful message.
   if not 200 then I have a parent process which will retry posting after certain time.&lt;/p&gt;

&lt;p&gt;Exception 
    WHEN OTHERS THEN 
      UTL_HTTP.END_RESPONSE(l_http_resp);
       Log Error.&lt;/p&gt;

&lt;p&gt;Exact Error shows below.&lt;/p&gt;

&lt;p&gt;ORA-29273: HTTP request failed
ORA-06512: at "SYS.UTL_HTTP", line 1380
ORA-29261: bad argument
ORA-06512: at "Prodcode.Package_Name", line 120   (here line 120 is the PLSQL exception)
ORA-29273: HTTP request failed
ORA-06512: at "SYS.UTL_HTTP&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>We are using similar PL/SQL code to post the XML to a WebService.</p>
<p>Erroring Scenario (Generally this code works perfectly in production,But the below case had happened once ):</p>
<p>1) XML has posted succesfully<br />
2) When reading the response ( l_http_resp := utl_http.get_response (l_http_req);) an error occured and control goes to main Exception.<br />
   and throwing a &#8220;Bad argument&#8221; error.</p>
<p>How do Oracle manages a case where XML has posted successfully and then fail to provide success or failure response . ?</p>
<p>Anybody experience a similar error?</p>
<p>Oracle version: DB version 9.2.04 generates the XML and posts on an Oracle Apps Server (HTTPServer).</p>
<p>Sample Code Summarized:</p>
<pre>-- Begin the post request

-- Set the HTTP request headers

-- Write the data to the body of the HTTP request

    utl_http.write_text(l_http_req, p_data_in);

-- Process the request and get the response.

 l_http_resp := utl_http.get_response (l_http_req);
</pre>
<p>if the response is 200 Then Insert into a post message table which logs the content of succesful message.<br />
   if not 200 then I have a parent process which will retry posting after certain time.</p>
<p>Exception<br />
    WHEN OTHERS THEN<br />
      UTL_HTTP.END_RESPONSE(l_http_resp);<br />
       Log Error.</p>
<p>Exact Error shows below.</p>
<p>ORA-29273: HTTP request failed<br />
ORA-06512: at &#8220;SYS.UTL_HTTP&#8221;, line 1380<br />
ORA-29261: bad argument<br />
ORA-06512: at &#8220;Prodcode.Package_Name&#8221;, line 120   (here line 120 is the PLSQL exception)<br />
ORA-29273: HTTP request failed<br />
ORA-06512: at &#8220;SYS.UTL_HTTP</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Cunningham</title>
		<link>http://awads.net/wp/2005/11/30/http-post-from-inside-oracle/#comment-50436</link>
		<dc:creator>Peter Cunningham</dc:creator>
		<pubDate>Mon, 26 Mar 2007 08:54:44 +0000</pubDate>
		<guid isPermaLink="false">http://awads.net/wp/?p=171#comment-50436</guid>
		<description>&lt;p&gt;Hi, this example was very useful to me.
Thanks,
Peter.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi, this example was very useful to me.<br />
Thanks,<br />
Peter.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eddie Awad</title>
		<link>http://awads.net/wp/2005/11/30/http-post-from-inside-oracle/#comment-50348</link>
		<dc:creator>Eddie Awad</dc:creator>
		<pubDate>Sat, 24 Feb 2007 05:11:37 +0000</pubDate>
		<guid isPermaLink="false">http://awads.net/wp/?p=171#comment-50348</guid>
		<description>&lt;p&gt;Jeremy, I'm afraid I have not come across this or done this before (read an http post body from PL/SQL).&lt;/p&gt;

&lt;p&gt;You may want to ask your question at http://forums.oracle.com/forums/&lt;/p&gt;

&lt;p&gt;Cheers!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Jeremy, I&#8217;m afraid I have not come across this or done this before (read an http post body from PL/SQL).</p>
<p>You may want to ask your question at <a href="http://forums.oracle.com/forums/" rel="nofollow">http://forums.oracle.com/forums/</a></p>
<p>Cheers!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
