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:
52:
53: --proxy := 'http://www-proxy.us.oracle.com';
54:
55:
56: UTL_HTTP.Set_Response_Error_Check ( enable => true );
57:
58: UTL_HTTP.Set_Detailed_Excp_Support ( enable => true );
59:
60: /*
54:
55:
56: UTL_HTTP.Set_Response_Error_Check ( enable => true );
57:
58: UTL_HTTP.Set_Detailed_Excp_Support ( enable => true );
59:
60: /*
61: UTL_HTTP.Set_Proxy (
62: proxy => proxy,
57:
58: UTL_HTTP.Set_Detailed_Excp_Support ( enable => true );
59:
60: /*
61: UTL_HTTP.Set_Proxy (
62: proxy => proxy,
63: no_proxy_domains => '');
64: */
65:
67: -- v_url := 'http://qapache.us.oracle.com:6482';
68:
69: v_url := v_url || G_DOM_INTERFACE_JSP||'?'||p_param_query_string;
70:
71: l_request := Utl_Http.Begin_Request (
72: url => v_url,
73: method => 'POST',
74: http_version => 'HTTP/1.1'
75: );
74: http_version => 'HTTP/1.1'
75: );
76:
77:
78: l_response := UTL_HTTP.Get_Response ( r => l_request );
79: FOR i IN 1..UTL_HTTP.Get_Header_Count ( r => l_response )
80: LOOP
81: UTL_HTTP.Get_Header (
82: r => l_response,
75: );
76:
77:
78: l_response := UTL_HTTP.Get_Response ( r => l_request );
79: FOR i IN 1..UTL_HTTP.Get_Header_Count ( r => l_response )
80: LOOP
81: UTL_HTTP.Get_Header (
82: r => l_response,
83: n => i,
77:
78: l_response := UTL_HTTP.Get_Response ( r => l_request );
79: FOR i IN 1..UTL_HTTP.Get_Header_Count ( r => l_response )
80: LOOP
81: UTL_HTTP.Get_Header (
82: r => l_response,
83: n => i,
84: name => l_name,
85: value => l_value );
85: value => l_value );
86: END LOOP;
87: BEGIN
88: LOOP
89: UTL_HTTP.Read_Text (
90: r => l_response,
91: data => v_msg );
92:
93: END LOOP;
90: r => l_response,
91: data => v_msg );
92:
93: END LOOP;
94: EXCEPTION WHEN UTL_HTTP.End_Of_Body then null;
95: END;
96:
97: UTL_HTTP.End_Response ( r => l_response );
98:
93: END LOOP;
94: EXCEPTION WHEN UTL_HTTP.End_Of_Body then null;
95: END;
96:
97: UTL_HTTP.End_Response ( r => l_response );
98:
99: x_return_status := FND_API.G_RET_STS_SUCCESS;
100:
101:
105: );
106: EXCEPTION
107: /*
108: The exception handling illustrates the use of "pragma-ed" exceptions
109: like Utl_Http.Http_Client_Error. In a realistic example, the program
110: would use these when it coded explicit recovery actions.
111: Request_Failed is raised for all exceptions after calling
112: Utl_Http.Set_Detailed_Excp_Support ( enable=>false )
113:
108: The exception handling illustrates the use of "pragma-ed" exceptions
109: like Utl_Http.Http_Client_Error. In a realistic example, the program
110: would use these when it coded explicit recovery actions.
111: Request_Failed is raised for all exceptions after calling
112: Utl_Http.Set_Detailed_Excp_Support ( enable=>false )
113:
114: And it is NEVER raised after calling with enable=>true
115: */
116: WHEN UTL_HTTP.Request_Failed THEN
112: Utl_Http.Set_Detailed_Excp_Support ( enable=>false )
113:
114: And it is NEVER raised after calling with enable=>true
115: */
116: WHEN UTL_HTTP.Request_Failed THEN
117: mdebug ( 'Request_Failed: ' || Utl_Http.Get_Detailed_Sqlerrm );
118: /* raised by URL http://xxx.oracle.com/ */
119: WHEN UTL_HTTP.Http_Server_Error THEN
120: mdebug ( 'Http_Server_Error: ' || Utl_Http.Get_Detailed_Sqlerrm );
113:
114: And it is NEVER raised after calling with enable=>true
115: */
116: WHEN UTL_HTTP.Request_Failed THEN
117: mdebug ( 'Request_Failed: ' || Utl_Http.Get_Detailed_Sqlerrm );
118: /* raised by URL http://xxx.oracle.com/ */
119: WHEN UTL_HTTP.Http_Server_Error THEN
120: mdebug ( 'Http_Server_Error: ' || Utl_Http.Get_Detailed_Sqlerrm );
121: /* raised by URL /xxx */
115: */
116: WHEN UTL_HTTP.Request_Failed THEN
117: mdebug ( 'Request_Failed: ' || Utl_Http.Get_Detailed_Sqlerrm );
118: /* raised by URL http://xxx.oracle.com/ */
119: WHEN UTL_HTTP.Http_Server_Error THEN
120: mdebug ( 'Http_Server_Error: ' || Utl_Http.Get_Detailed_Sqlerrm );
121: /* raised by URL /xxx */
122: when UTL_HTTP.Http_Client_Error THEN
123: mdebug ( 'Http_Client_Error: ' || Utl_Http.Get_Detailed_Sqlerrm );
116: WHEN UTL_HTTP.Request_Failed THEN
117: mdebug ( 'Request_Failed: ' || Utl_Http.Get_Detailed_Sqlerrm );
118: /* raised by URL http://xxx.oracle.com/ */
119: WHEN UTL_HTTP.Http_Server_Error THEN
120: mdebug ( 'Http_Server_Error: ' || Utl_Http.Get_Detailed_Sqlerrm );
121: /* raised by URL /xxx */
122: when UTL_HTTP.Http_Client_Error THEN
123: mdebug ( 'Http_Client_Error: ' || Utl_Http.Get_Detailed_Sqlerrm );
124: /* code for all the other defined exceptions you can recover from */
118: /* raised by URL http://xxx.oracle.com/ */
119: WHEN UTL_HTTP.Http_Server_Error THEN
120: mdebug ( 'Http_Server_Error: ' || Utl_Http.Get_Detailed_Sqlerrm );
121: /* raised by URL /xxx */
122: when UTL_HTTP.Http_Client_Error THEN
123: mdebug ( 'Http_Client_Error: ' || Utl_Http.Get_Detailed_Sqlerrm );
124: /* code for all the other defined exceptions you can recover from */
125:
126: WHEN FND_API.G_EXC_ERROR THEN
119: WHEN UTL_HTTP.Http_Server_Error THEN
120: mdebug ( 'Http_Server_Error: ' || Utl_Http.Get_Detailed_Sqlerrm );
121: /* raised by URL /xxx */
122: when UTL_HTTP.Http_Client_Error THEN
123: mdebug ( 'Http_Client_Error: ' || Utl_Http.Get_Detailed_Sqlerrm );
124: /* code for all the other defined exceptions you can recover from */
125:
126: WHEN FND_API.G_EXC_ERROR THEN
127: ROLLBACK TO DOM_ADD_OFO_GROUP_MEMBER;