编译 custom.pll 时出现以下错误
CUSTOM 上的编译错误:PL/SQL ERROR 707 at line 1, column 10 unsupported construction or internal error [2602]
在下面的 SQL 语句中发生错误:
SELECT EXTRACT (VALUE (d), 'tokenize/token/text()').getstringval ()
INTO ls_token
FROM TABLE (XMLSEQUENCE (EXTRACT (XMLTYPE.createxml (t_respond),
'/tokenize',
NULL
)
)
) d;
这是我想在 custom.pll 中添加的以下功能
FUNCTION Xxwv_token (p_no IN VARCHAR2)
RETURN VARCHAR2
IS
soap_request VARCHAR2 (30000);
soap_respond VARCHAR2 (30000);
http_req utl_http.req;
http_resp utl_http.resp;
launch_url VARCHAR2 (240);
BEGIN
BEGIN
SELECT fpov.profile_option_value
INTO launch_url
FROM fnd_profile_options fpo,
fnd_profile_option_values fpov
WHERE fpo.profile_option_name = 'TEST WEBSERVICE CALL'
AND fpov.profile_option_id = fpo.profile_option_id;
EXCEPTION
WHEN OTHERS THEN
fnd_message.Set_string ('Profile Setup for URL : '
|| SQLERRM);
fnd_message.Show ();
END;
http_req := utl_http.Begin_request (launch_url, 'POST', 'HTTP/1.1');
utl_http.Set_header (http_req, 'Content-Type', 'text/xml');
utl_http.Set_header (http_req, 'Content-Length', Length (soap_request));
utl_http.Set_header (http_req, 'SOAPAction', '');
utl_http.Write_text (http_req, soap_request);
http_resp := utl_http.Get_response (http_req);
utl_http.Read_text (http_resp, soap_respond);
utl_http.End_response (http_resp);
SELECT EXTRACT (VALUE (d), 'tokenize/token/text()').getstringval ()
INTO ls_token
FROM TABLE (XMLSEQUENCE (EXTRACT (XMLTYPE.createxml (t_respond),
'/tokenize',
NULL
)
)
) d;
RETURN '1234567890';
EXCEPTION
WHEN OTHERS THEN
--fnd_message.set_string ('Error : '||SQLERRM);
--fnd_message.show();
RETURN '9876543210';
END xxwv_token;