java.lang.IllegalArgumentException error whicle consuming a webservice from PLSQL

تعرفه تبلیغات در سایت
عنوان عکس
عنوان عکس
عنوان عکس
عنوان عکس
عنوان عکس

آرشیو مطالب

جستجوگر

یافته ها در جستجو

    امکانات وب

    برچسب ها

    Vote count: 0

    I am trying to consume a Fedex webservice from oracle PLSQL unsing UTL_HTTP api as below. I am receiving the below fault response.

    I am receiving the response with Status Code = 200 reason phrase = OK

    But not able to get the actual response XML Please help stuck with this issue since a week.

        UTL_HTTP.set_wallet('file:/u01/app/oracle/product/11.2.0.3/R12ERPHome/admin/FINIT3OA_plutodbadm02/wallet', 'Cr8@01feb');
        utl_http.set_transfer_timeout(60);
       l_http_request := utl_http.begin_request(url          => 'https://wsbeta.fedex.com:443/web-services/ship HTTP/1.1'
                                                ,method       => 'POST'
                                                ,http_version => 'HTTP/1.1');
      /* UTL_HTTP.set_header (l_http_request, 
                            'Accept-Encoding', 
                            'gzip,deflate');*/
       UTL_HTTP.set_header(l_http_request
                           ,'Content-Type'
                           ,'text/xml;charset=UTF-8');
       UTL_HTTP.set_header(l_http_request, 
                              'SOAPAction', 
                              'http://fedex.com/ws/ship/v19/processShipment'); 
       UTL_HTTP.set_header(l_http_request
                           ,'Content-Length'
                           ,length(l_string_request));
       UTL_HTTP.set_header(l_http_request
                           ,'Connection'
                           ,'Keep-Alive');
       UTL_HTTP.set_header(l_http_request
                           ,'User-Agent'
                           ,'Apache-HttpClient/4.1.1 (java 1.5)');
    
    
    
       /* <>
        FOR i IN 0 .. ceil(length(l_string_request) / l_buffer_size) - 1
        LOOP
                l_substring_msg := substr(l_string_request
                                         ,i * l_buffer_size + 1
                                         ,l_buffer_size);
    
                BEGIN
                        l_raw_data := utl_raw.cast_to_raw(l_substring_msg);
                        utl_http.write_raw(r    => l_http_request
                                          ,data => l_raw_data);
                EXCEPTION
                        WHEN no_data_found THEN
                                EXIT request_loop;
                END;
        END LOOP request_loop;*/
    
        utl_http.write_text(l_http_request, l_string_request); 
    
        l_http_response := utl_http.get_response(l_http_request);
        --utl_http.read_text(l_http_response, l_text);
        dbms_output.put_line('Response> status_code: "' || l_http_response.status_code || '"');
        dbms_output.put_line('Response> reason_phrase: "' ||
                             l_http_response.reason_phrase || '"');
        dbms_output.put_line('Response> http_version: "' || l_http_response.http_version || '"');
    

    -- Build a CLOB variable to hold web service response dbms_lob.createtemporary(x_clob, FALSE ); dbms_lob.open( x_clob, dbms_lob.lob_readwrite );

    begin

    loop
      -- Copy the web service response body 
      -- in a buffer string variable l_buffer
      utl_http.read_text(l_http_response, l_text);
      dbms_output.put_line('Inside LOOP');
      -- Append data from l_text to CLOB variable
      dbms_lob.writeappend(x_clob
                        , length(l_text)
                        , l_text);
    end loop;
    

    exception WHEN OTHERS THEN dbms_output.put_line('Inside EXCEPTION'); UTL_HTTP.end_response(l_http_response); end; /* BEGIN

                <>
                LOOP
                        utl_http.read_raw(l_http_response
                                         ,l_raw_data
                                         ,l_buffer_size);
                        x_clob := x_clob ||utl_raw.cast_to_varchar2(l_raw_data);
                  dbms_output.put_line('Inside LOOP');
                END LOOP response_loop;
    
        EXCEPTION
                WHEN utl_http.end_of_body THEN
                   dbms_output.put_line('Inside EXCEPTION');
                        utl_http.end_response(l_http_response);
        END;*/
    
        IF (l_http_response.status_code = 200)
        THEN
          INSERT INTO fr_ws_tbl
               (id, resp)
          VALUES (12, x_clob)
          RETURNING resp
          INTO dest_clob;
          COMMIT;
        END IF;
    
    
        IF l_http_request.private_hndl IS NOT NULL
        THEN
                utl_http.end_request(l_http_request);
        END IF;
    
        IF l_http_response.private_hndl IS NOT NULL
        THEN
                utl_http.end_response(l_http_response);
        END IF;
        COMMIT;
    

    l_xml= soapenv:ClientFailed to prepare request metadata for service common/ProxyService/WebServicesGateway: java.lang.IllegalArgumentException9999Failed to prepare request metadata for service common/ProxyService/WebServicesGateway: java.lang.IllegalArgumentException

    asked 53 secs ago
    Raahul Y

    نویسنده : استخدام کار بازدید : 0 تاريخ : جمعه 21 مهر 1396 ساعت: 16:36
    برچسب‌ها :