DBA Data[Home] [Help]

APPS.HZ_LOCATION_SERVICES_PUB dependencies on UTL_HTTP

Line 94: UTL_HTTP.SET_PROXY(ltrim(rtrim(l_proxy_host))||':'||ltrim(rtrim(l_proxy_port)),l_proxy_bypass);

90: l_proxy_bypass := p_proxy_bypass;
91: END IF;
92:
93: IF(l_proxy_host is not null) THEN
94: UTL_HTTP.SET_PROXY(ltrim(rtrim(l_proxy_host))||':'||ltrim(rtrim(l_proxy_port)),l_proxy_bypass);
95: log('Proxy base on profile setting');
96: log('Proxy Host: '||l_proxy_host);
97: log('Proxy Port: '||l_proxy_port);
98: log('Proxy Bypass Domains: '||l_proxy_bypass);

Line 107: p_req IN OUT NOCOPY UTL_HTTP.REQ,

103: END set_proxy;
104:
105: -- This procedure set proxy
106: PROCEDURE set_authentication (
107: p_req IN OUT NOCOPY UTL_HTTP.REQ,
108: p_adapter_id IN NUMBER )
109: IS
110: l_username VARCHAR2(100);
111: l_password VARCHAR2(100);

Line 127: UTL_HTTP.SET_AUTHENTICATION(p_req, l_username, l_password, 'Basic', FALSE);

123: FETCH get_username_password INTO l_username, l_password;
124: CLOSE get_username_password;
125:
126: IF((l_username IS NOT NULL) AND (l_password IS NOT NULL)) THEN
127: UTL_HTTP.SET_AUTHENTICATION(p_req, l_username, l_password, 'Basic', FALSE);
128: END IF;
129:
130: log('Set Authentication End');
131:

Line 1359: http_req UTL_HTTP.REQ;

1355: l_msg_count NUMBER;
1356: l_msg_data VARCHAR2(2000);
1357: out_xml CLOB;
1358: in_xml CLOB;
1359: http_req UTL_HTTP.REQ;
1360: http_resp UTL_HTTP.RESP;
1361: instream VARCHAR2(32767);
1362: outstream VARCHAR2(32767);
1363: outlength NUMBER;

Line 1360: http_resp UTL_HTTP.RESP;

1356: l_msg_data VARCHAR2(2000);
1357: out_xml CLOB;
1358: in_xml CLOB;
1359: http_req UTL_HTTP.REQ;
1360: http_resp UTL_HTTP.RESP;
1361: instream VARCHAR2(32767);
1362: outstream VARCHAR2(32767);
1363: outlength NUMBER;
1364: fl NUMBER;

Line 1440: UTL_HTTP.SET_DETAILED_EXCP_SUPPORT(enable=>true);

1436: set_proxy();--bug 6412174
1437:
1438: -- set to activate detail exception support
1439: log('Set Detailed Exception Support');
1440: UTL_HTTP.SET_DETAILED_EXCP_SUPPORT(enable=>true);
1441:
1442: -- get timeout profile option value
1443: -- default value is 300 seconds
1444: l_timeout := FND_PROFILE.VALUE('HZ_LOC_TIMEOUT');

Line 1458: UTL_HTTP.SET_TRANSFER_TIMEOUT(l_timeout_num);

1454: l_timeout_num := 300;
1455: END;
1456: END IF;
1457: log('Set Transfer Timeout to '||l_timeout_num||' second(s).');
1458: UTL_HTTP.SET_TRANSFER_TIMEOUT(l_timeout_num);
1459:
1460: -- set response error check
1461: log('Set Response Error Check');
1462: UTL_HTTP.SET_RESPONSE_ERROR_CHECK(TRUE);

Line 1462: UTL_HTTP.SET_RESPONSE_ERROR_CHECK(TRUE);

1458: UTL_HTTP.SET_TRANSFER_TIMEOUT(l_timeout_num);
1459:
1460: -- set response error check
1461: log('Set Response Error Check');
1462: UTL_HTTP.SET_RESPONSE_ERROR_CHECK(TRUE);
1463:
1464: -- begin request
1465: log('Begin Location Service Request');
1466: -- get port and url from adapter setup

Line 1467: http_req := UTL_HTTP.BEGIN_REQUEST(get_adapter_link(l_adapter_id), 'POST', UTL_HTTP.HTTP_VERSION_1_1);

1463:
1464: -- begin request
1465: log('Begin Location Service Request');
1466: -- get port and url from adapter setup
1467: http_req := UTL_HTTP.BEGIN_REQUEST(get_adapter_link(l_adapter_id), 'POST', UTL_HTTP.HTTP_VERSION_1_1);
1468:
1469: -- user authentication
1470: -- will get error after get response, error code should be 401 (HTTP_UNAUTHORIZED)
1471: -- ?? should have begin_request get action and get_response for authentication first and

Line 1485: UTL_HTTP.SET_HEADER(http_req, 'Content-Type', 'application/x-www-form-urlencoded');

1481: -- set header
1482: -- since we know the length of the document, we don't need to do chunk on the output
1483: -- Content-Length will be set if output xml found
1484: log('Set Header for HTTP Connection');
1485: UTL_HTTP.SET_HEADER(http_req, 'Content-Type', 'application/x-www-form-urlencoded');
1486:
1487: -- set transfer encoding to chunked
1488: --UTL_HTTP.SET_HEADER(http_req, 'Transfer-Encoding', 'chunked');
1489:

Line 1488: --UTL_HTTP.SET_HEADER(http_req, 'Transfer-Encoding', 'chunked');

1484: log('Set Header for HTTP Connection');
1485: UTL_HTTP.SET_HEADER(http_req, 'Content-Type', 'application/x-www-form-urlencoded');
1486:
1487: -- set transfer encoding to chunked
1488: --UTL_HTTP.SET_HEADER(http_req, 'Transfer-Encoding', 'chunked');
1489:
1490: -- fix bug 4271311 - multi-bytes characters garbled
1491: UTL_HTTP.SET_BODY_CHARSET(http_req, 'UTF-8');
1492:

Line 1491: UTL_HTTP.SET_BODY_CHARSET(http_req, 'UTF-8');

1487: -- set transfer encoding to chunked
1488: --UTL_HTTP.SET_HEADER(http_req, 'Transfer-Encoding', 'chunked');
1489:
1490: -- fix bug 4271311 - multi-bytes characters garbled
1491: UTL_HTTP.SET_BODY_CHARSET(http_req, 'UTF-8');
1492:
1493: out_xml := to_clob(p_addrval_doc);
1494:
1495: amount_var := MAX_LENGTH;

Line 1513: UTL_HTTP.SET_HEADER(http_req, 'Content-Length', to_char(outlengthb));

1509: -- Count the actual length of characters to be sent by converting to UTF8 charset
1510: -- this outlengthb is used to set the content length
1511: outlengthb := LENGTHB(convert(outstream, 'UTF8'));
1512: log('Length of xml: '||outlengthb);
1513: UTL_HTTP.SET_HEADER(http_req, 'Content-Length', to_char(outlengthb));
1514: UTL_HTTP.WRITE_TEXT(http_req, outstream);
1515: ELSE
1516: -- Fix bug 4271311
1517: -- First get all data to outstreams ARRAY

Line 1514: UTL_HTTP.WRITE_TEXT(http_req, outstream);

1510: -- this outlengthb is used to set the content length
1511: outlengthb := LENGTHB(convert(outstream, 'UTF8'));
1512: log('Length of xml: '||outlengthb);
1513: UTL_HTTP.SET_HEADER(http_req, 'Content-Length', to_char(outlengthb));
1514: UTL_HTTP.WRITE_TEXT(http_req, outstream);
1515: ELSE
1516: -- Fix bug 4271311
1517: -- First get all data to outstreams ARRAY
1518: -- Count the total length of data based on UTF8 charset

Line 1525: --UTL_HTTP.WRITE_TEXT(http_req, outstream);

1521: fl := floor(outlength/MAX_LENGTH);
1522: FOR i in 1..fl LOOP
1523: offset_var := ((i-1)*MAX_LENGTH)+1;
1524: dbms_lob.read(out_xml,amount_var,offset_var,outstream);
1525: --UTL_HTTP.WRITE_TEXT(http_req, outstream);
1526: log('Set outstreams');
1527: outstreams(i) := outstream;
1528: log('In Loop: '||i);
1529: outlengthb := outlengthb + LENGTHB(convert(outstream, 'UTF8'));

Line 1538: --UTL_HTTP.WRITE_TEXT(http_req, outstream);

1534: IF(amount_var > 0) THEN
1535: dbms_lob.read(out_xml,amount_var,offset_var,outstream);
1536: END IF;
1537:
1538: --UTL_HTTP.WRITE_TEXT(http_req, outstream);
1539: outstreams(fl+1) := outstream;
1540: outlengthb := outlengthb + LENGTHB(convert(outstream, 'UTF8'));
1541: log('Out of Loop: ');
1542: log('Length of xml: '||outlengthb);

Line 1544: UTL_HTTP.SET_HEADER(http_req, 'Content-Length', to_char(outlengthb));

1540: outlengthb := outlengthb + LENGTHB(convert(outstream, 'UTF8'));
1541: log('Out of Loop: ');
1542: log('Length of xml: '||outlengthb);
1543: -- Base on charset to set the content length
1544: UTL_HTTP.SET_HEADER(http_req, 'Content-Length', to_char(outlengthb));
1545: FOR i IN 1..fl+1 LOOP
1546: UTL_HTTP.WRITE_TEXT(http_req, outstreams(i));
1547: END LOOP;
1548: END IF;

Line 1546: UTL_HTTP.WRITE_TEXT(http_req, outstreams(i));

1542: log('Length of xml: '||outlengthb);
1543: -- Base on charset to set the content length
1544: UTL_HTTP.SET_HEADER(http_req, 'Content-Length', to_char(outlengthb));
1545: FOR i IN 1..fl+1 LOOP
1546: UTL_HTTP.WRITE_TEXT(http_req, outstreams(i));
1547: END LOOP;
1548: END IF;
1549:
1550: -- wait for response from vendor

Line 1552: http_resp := UTL_HTTP.GET_RESPONSE(http_req);

1548: END IF;
1549:
1550: -- wait for response from vendor
1551: log('Get Response from Vendor');
1552: http_resp := UTL_HTTP.GET_RESPONSE(http_req);
1553: log('- Resp.status_code: '||http_resp.status_code);
1554: log('- Resp.reason_phrase: '||http_resp.reason_phrase);
1555: log('- Resp.http_version: '||http_resp.http_version);
1556: log('- Resp.private_hndl: '||http_resp.private_hndl);

Line 1563: UTL_HTTP.READ_TEXT(http_resp, instream);

1559: -- ?? only accept response status code 200 ??
1560: IF(http_resp.status_code = 200) THEN
1561: BEGIN
1562: LOOP
1563: UTL_HTTP.READ_TEXT(http_resp, instream);
1564: in_xml := in_xml||instream;
1565: END LOOP;
1566: EXCEPTION
1567: WHEN UTL_HTTP.END_OF_BODY THEN

Line 1567: WHEN UTL_HTTP.END_OF_BODY THEN

1563: UTL_HTTP.READ_TEXT(http_resp, instream);
1564: in_xml := in_xml||instream;
1565: END LOOP;
1566: EXCEPTION
1567: WHEN UTL_HTTP.END_OF_BODY THEN
1568: log('Location Service Transfer Finished');
1569: WHEN UTL_HTTP.TRANSFER_TIMEOUT THEN
1570: log('Location Service Timeout Occur');
1571: -- need message for invalid adapter

Line 1569: WHEN UTL_HTTP.TRANSFER_TIMEOUT THEN

1565: END LOOP;
1566: EXCEPTION
1567: WHEN UTL_HTTP.END_OF_BODY THEN
1568: log('Location Service Transfer Finished');
1569: WHEN UTL_HTTP.TRANSFER_TIMEOUT THEN
1570: log('Location Service Timeout Occur');
1571: -- need message for invalid adapter
1572: FND_MESSAGE.SET_NAME('AR', 'HZ_LOC_TIMEOUT');
1573: RAISE FND_API.G_EXC_ERROR;

Line 1581: UTL_HTTP.END_RESPONSE(http_resp);

1577: RAISE FND_API.G_EXC_ERROR;
1578: END;
1579: END IF;
1580:
1581: UTL_HTTP.END_RESPONSE(http_resp);
1582:
1583: EXCEPTION
1584: /* The exception handling illustrates the use of "pragma-ed" exceptions
1585: like Utl_Http.Http_Client_Error. In a realistic example, the program

Line 1585: like Utl_Http.Http_Client_Error. In a realistic example, the program

1581: UTL_HTTP.END_RESPONSE(http_resp);
1582:
1583: EXCEPTION
1584: /* The exception handling illustrates the use of "pragma-ed" exceptions
1585: like Utl_Http.Http_Client_Error. In a realistic example, the program
1586: would use these when it coded explicit recovery actions.
1587: Request_Failed is raised for all exceptions after calling
1588: Utl_Http.Set_Detailed_Excp_Support ( enable=>false )
1589: And it is NEVER raised after calling with enable=>true */

Line 1588: Utl_Http.Set_Detailed_Excp_Support ( enable=>false )

1584: /* The exception handling illustrates the use of "pragma-ed" exceptions
1585: like Utl_Http.Http_Client_Error. In a realistic example, the program
1586: would use these when it coded explicit recovery actions.
1587: Request_Failed is raised for all exceptions after calling
1588: Utl_Http.Set_Detailed_Excp_Support ( enable=>false )
1589: And it is NEVER raised after calling with enable=>true */
1590: WHEN UTL_HTTP.REQUEST_FAILED THEN
1591: log('REQUEST_FAILED: ' || UTL_HTTP.GET_DETAILED_SQLERRM);
1592: --FND_FILE.close;

Line 1590: WHEN UTL_HTTP.REQUEST_FAILED THEN

1586: would use these when it coded explicit recovery actions.
1587: Request_Failed is raised for all exceptions after calling
1588: Utl_Http.Set_Detailed_Excp_Support ( enable=>false )
1589: And it is NEVER raised after calling with enable=>true */
1590: WHEN UTL_HTTP.REQUEST_FAILED THEN
1591: log('REQUEST_FAILED: ' || UTL_HTTP.GET_DETAILED_SQLERRM);
1592: --FND_FILE.close;
1593: FND_MESSAGE.SET_NAME('AR', 'HZ_LOC_ERROR');
1594: RAISE FND_API.G_EXC_ERROR;

Line 1591: log('REQUEST_FAILED: ' || UTL_HTTP.GET_DETAILED_SQLERRM);

1587: Request_Failed is raised for all exceptions after calling
1588: Utl_Http.Set_Detailed_Excp_Support ( enable=>false )
1589: And it is NEVER raised after calling with enable=>true */
1590: WHEN UTL_HTTP.REQUEST_FAILED THEN
1591: log('REQUEST_FAILED: ' || UTL_HTTP.GET_DETAILED_SQLERRM);
1592: --FND_FILE.close;
1593: FND_MESSAGE.SET_NAME('AR', 'HZ_LOC_ERROR');
1594: RAISE FND_API.G_EXC_ERROR;
1595:

Line 1597: WHEN UTL_HTTP.HTTP_SERVER_ERROR THEN

1593: FND_MESSAGE.SET_NAME('AR', 'HZ_LOC_ERROR');
1594: RAISE FND_API.G_EXC_ERROR;
1595:
1596: -- raised by URL http://xxx.oracle.com/
1597: WHEN UTL_HTTP.HTTP_SERVER_ERROR THEN
1598: log('HTTP_SERVER_ERROR: ' || UTL_HTTP.GET_DETAILED_SQLERRM);
1599: --FND_FILE.close;
1600: FND_MESSAGE.SET_NAME('AR', 'HZ_LOC_ERROR');
1601: RAISE FND_API.G_EXC_ERROR;

Line 1598: log('HTTP_SERVER_ERROR: ' || UTL_HTTP.GET_DETAILED_SQLERRM);

1594: RAISE FND_API.G_EXC_ERROR;
1595:
1596: -- raised by URL http://xxx.oracle.com/
1597: WHEN UTL_HTTP.HTTP_SERVER_ERROR THEN
1598: log('HTTP_SERVER_ERROR: ' || UTL_HTTP.GET_DETAILED_SQLERRM);
1599: --FND_FILE.close;
1600: FND_MESSAGE.SET_NAME('AR', 'HZ_LOC_ERROR');
1601: RAISE FND_API.G_EXC_ERROR;
1602:

Line 1604: WHEN UTL_HTTP.HTTP_CLIENT_ERROR THEN

1600: FND_MESSAGE.SET_NAME('AR', 'HZ_LOC_ERROR');
1601: RAISE FND_API.G_EXC_ERROR;
1602:
1603: -- raised by URL http://otn.oracle.com/xxx
1604: WHEN UTL_HTTP.HTTP_CLIENT_ERROR THEN
1605: log('HTTP_CLIENT_ERROR: ' || UTL_HTTP.GET_DETAILED_SQLERRM);
1606: --FND_FILE.close;
1607: FND_MESSAGE.SET_NAME('AR', 'HZ_LOC_ERROR');
1608: RAISE FND_API.G_EXC_ERROR;

Line 1605: log('HTTP_CLIENT_ERROR: ' || UTL_HTTP.GET_DETAILED_SQLERRM);

1601: RAISE FND_API.G_EXC_ERROR;
1602:
1603: -- raised by URL http://otn.oracle.com/xxx
1604: WHEN UTL_HTTP.HTTP_CLIENT_ERROR THEN
1605: log('HTTP_CLIENT_ERROR: ' || UTL_HTTP.GET_DETAILED_SQLERRM);
1606: --FND_FILE.close;
1607: FND_MESSAGE.SET_NAME('AR', 'HZ_LOC_ERROR');
1608: RAISE FND_API.G_EXC_ERROR;
1609:

Line 1610: WHEN UTL_HTTP.TRANSFER_TIMEOUT THEN

1606: --FND_FILE.close;
1607: FND_MESSAGE.SET_NAME('AR', 'HZ_LOC_ERROR');
1608: RAISE FND_API.G_EXC_ERROR;
1609:
1610: WHEN UTL_HTTP.TRANSFER_TIMEOUT THEN
1611: log('HTTP TRANSFER TIMEOUT: '|| UTL_HTTP.GET_DETAILED_SQLERRM);
1612: --FND_FILE.close;
1613: FND_MESSAGE.SET_NAME('AR', 'HZ_LOC_ERROR');
1614: RAISE FND_API.G_EXC_ERROR;

Line 1611: log('HTTP TRANSFER TIMEOUT: '|| UTL_HTTP.GET_DETAILED_SQLERRM);

1607: FND_MESSAGE.SET_NAME('AR', 'HZ_LOC_ERROR');
1608: RAISE FND_API.G_EXC_ERROR;
1609:
1610: WHEN UTL_HTTP.TRANSFER_TIMEOUT THEN
1611: log('HTTP TRANSFER TIMEOUT: '|| UTL_HTTP.GET_DETAILED_SQLERRM);
1612: --FND_FILE.close;
1613: FND_MESSAGE.SET_NAME('AR', 'HZ_LOC_ERROR');
1614: RAISE FND_API.G_EXC_ERROR;
1615:

Line 1617: log('HTTP OTHER EXCEPTION: '|| UTL_HTTP.GET_DETAILED_SQLERRM);

1613: FND_MESSAGE.SET_NAME('AR', 'HZ_LOC_ERROR');
1614: RAISE FND_API.G_EXC_ERROR;
1615:
1616: WHEN OTHERS THEN
1617: log('HTTP OTHER EXCEPTION: '|| UTL_HTTP.GET_DETAILED_SQLERRM);
1618: log('Check SQL EXCEPTION: '|| SQLERRM);
1619: --FND_FILE.close;
1620: FND_MESSAGE.SET_NAME('AR', 'HZ_LOC_ERROR');
1621: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;