编译custom.pll时出错

时间:2013-04-18 23:35:23

标签: xml oracle

编译custom.pll时出现以下错误

CUSTOM上的编译错误: PL / SQL ERROR 707在第1行第10列 不支持的构造或内部错误[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; 

0 个答案:

没有答案