29: )
30: IS
31:
32: l_proxy varchar2(80);
33: l_request UTL_HTTP.REQ;
34: l_response UTL_HTTP.RESP;
35: l_name VARCHAR2(255);
36: l_value VARCHAR2(1023);
37: v_msg VARCHAR2(80);
30: IS
31:
32: l_proxy varchar2(80);
33: l_request UTL_HTTP.REQ;
34: l_response UTL_HTTP.RESP;
35: l_name VARCHAR2(255);
36: l_value VARCHAR2(1023);
37: v_msg VARCHAR2(80);
38: v_url VARCHAR2(32767) := '/';
37: v_msg VARCHAR2(80);
38: v_url VARCHAR2(32767) := '/';
39: l_api_name varchar2(80):='call_dom_interface_jsp';
40:
41: cookies UTL_HTTP.COOKIE_TABLE;
42: my_session_id BINARY_INTEGER;
43: secure VARCHAR2(1);
44: proxy VARCHAR2(250);
45: -- For bug 8401333
67:
68: --proxy := 'http://www-proxy.us.oracle.com';
69:
70:
71: UTL_HTTP.Set_Response_Error_Check ( enable => true );
72:
73: UTL_HTTP.Set_Detailed_Excp_Support ( enable => true );
74:
75: /*
69:
70:
71: UTL_HTTP.Set_Response_Error_Check ( enable => true );
72:
73: UTL_HTTP.Set_Detailed_Excp_Support ( enable => true );
74:
75: /*
76: UTL_HTTP.Set_Proxy (
77: proxy => proxy,
72:
73: UTL_HTTP.Set_Detailed_Excp_Support ( enable => true );
74:
75: /*
76: UTL_HTTP.Set_Proxy (
77: proxy => proxy,
78: no_proxy_domains => '');
79: */
80:
82: -- v_url := 'http://qapache.us.oracle.com:6482';
83:
84: v_url := v_url || G_DOM_INTERFACE_JSP||'?'||p_param_query_string;
85:
86: l_request := Utl_Http.Begin_Request (
87: url => v_url,
88: method => 'POST',
89: http_version => 'HTTP/1.1'
90: );
89: http_version => 'HTTP/1.1'
90: );
91:
92:
93: l_response := UTL_HTTP.Get_Response ( r => l_request );
94: FOR i IN 1..UTL_HTTP.Get_Header_Count ( r => l_response )
95: LOOP
96: UTL_HTTP.Get_Header (
97: r => l_response,
90: );
91:
92:
93: l_response := UTL_HTTP.Get_Response ( r => l_request );
94: FOR i IN 1..UTL_HTTP.Get_Header_Count ( r => l_response )
95: LOOP
96: UTL_HTTP.Get_Header (
97: r => l_response,
98: n => i,
92:
93: l_response := UTL_HTTP.Get_Response ( r => l_request );
94: FOR i IN 1..UTL_HTTP.Get_Header_Count ( r => l_response )
95: LOOP
96: UTL_HTTP.Get_Header (
97: r => l_response,
98: n => i,
99: name => l_name,
100: value => l_value );
100: value => l_value );
101: END LOOP;
102: BEGIN
103: LOOP
104: UTL_HTTP.Read_Text (
105: r => l_response,
106: data => v_msg );
107:
108: END LOOP;
105: r => l_response,
106: data => v_msg );
107:
108: END LOOP;
109: EXCEPTION WHEN UTL_HTTP.End_Of_Body then null;
110: END;
111:
112: UTL_HTTP.End_Response ( r => l_response );
113:
108: END LOOP;
109: EXCEPTION WHEN UTL_HTTP.End_Of_Body then null;
110: END;
111:
112: UTL_HTTP.End_Response ( r => l_response );
113:
114: x_return_status := FND_API.G_RET_STS_SUCCESS;
115:
116:
124: END IF;
125: EXCEPTION
126: /*
127: The exception handling illustrates the use of "pragma-ed" exceptions
128: like Utl_Http.Http_Client_Error. In a realistic example, the program
129: would use these when it coded explicit recovery actions.
130: Request_Failed is raised for all exceptions after calling
131: Utl_Http.Set_Detailed_Excp_Support ( enable=>false )
132:
127: The exception handling illustrates the use of "pragma-ed" exceptions
128: like Utl_Http.Http_Client_Error. In a realistic example, the program
129: would use these when it coded explicit recovery actions.
130: Request_Failed is raised for all exceptions after calling
131: Utl_Http.Set_Detailed_Excp_Support ( enable=>false )
132:
133: And it is NEVER raised after calling with enable=>true
134: */
135: WHEN UTL_HTTP.Request_Failed THEN
131: Utl_Http.Set_Detailed_Excp_Support ( enable=>false )
132:
133: And it is NEVER raised after calling with enable=>true
134: */
135: WHEN UTL_HTTP.Request_Failed THEN
136: mdebug ( 'Request_Failed: ' || Utl_Http.Get_Detailed_Sqlerrm );
137: /* raised by URL http://xxx.oracle.com/ */
138: WHEN UTL_HTTP.Http_Server_Error THEN
139: mdebug ( 'Http_Server_Error: ' || Utl_Http.Get_Detailed_Sqlerrm );
132:
133: And it is NEVER raised after calling with enable=>true
134: */
135: WHEN UTL_HTTP.Request_Failed THEN
136: mdebug ( 'Request_Failed: ' || Utl_Http.Get_Detailed_Sqlerrm );
137: /* raised by URL http://xxx.oracle.com/ */
138: WHEN UTL_HTTP.Http_Server_Error THEN
139: mdebug ( 'Http_Server_Error: ' || Utl_Http.Get_Detailed_Sqlerrm );
140: /* raised by URL /xxx */
134: */
135: WHEN UTL_HTTP.Request_Failed THEN
136: mdebug ( 'Request_Failed: ' || Utl_Http.Get_Detailed_Sqlerrm );
137: /* raised by URL http://xxx.oracle.com/ */
138: WHEN UTL_HTTP.Http_Server_Error THEN
139: mdebug ( 'Http_Server_Error: ' || Utl_Http.Get_Detailed_Sqlerrm );
140: /* raised by URL /xxx */
141: when UTL_HTTP.Http_Client_Error THEN
142: mdebug ( 'Http_Client_Error: ' || Utl_Http.Get_Detailed_Sqlerrm );
135: WHEN UTL_HTTP.Request_Failed THEN
136: mdebug ( 'Request_Failed: ' || Utl_Http.Get_Detailed_Sqlerrm );
137: /* raised by URL http://xxx.oracle.com/ */
138: WHEN UTL_HTTP.Http_Server_Error THEN
139: mdebug ( 'Http_Server_Error: ' || Utl_Http.Get_Detailed_Sqlerrm );
140: /* raised by URL /xxx */
141: when UTL_HTTP.Http_Client_Error THEN
142: mdebug ( 'Http_Client_Error: ' || Utl_Http.Get_Detailed_Sqlerrm );
143: /* code for all the other defined exceptions you can recover from */
137: /* raised by URL http://xxx.oracle.com/ */
138: WHEN UTL_HTTP.Http_Server_Error THEN
139: mdebug ( 'Http_Server_Error: ' || Utl_Http.Get_Detailed_Sqlerrm );
140: /* raised by URL /xxx */
141: when UTL_HTTP.Http_Client_Error THEN
142: mdebug ( 'Http_Client_Error: ' || Utl_Http.Get_Detailed_Sqlerrm );
143: /* code for all the other defined exceptions you can recover from */
144:
145: WHEN FND_API.G_EXC_ERROR THEN
138: WHEN UTL_HTTP.Http_Server_Error THEN
139: mdebug ( 'Http_Server_Error: ' || Utl_Http.Get_Detailed_Sqlerrm );
140: /* raised by URL /xxx */
141: when UTL_HTTP.Http_Client_Error THEN
142: mdebug ( 'Http_Client_Error: ' || Utl_Http.Get_Detailed_Sqlerrm );
143: /* code for all the other defined exceptions you can recover from */
144:
145: WHEN FND_API.G_EXC_ERROR THEN
146: ROLLBACK TO DOM_ADD_OFO_GROUP_MEMBER;