web services - Oracle Database URL_HTTP Issue -
i'm trying invoke web service send encoded (base64 encoding) file name. shorter file name works fine, when file name increases after encoding pl/sql fails invoke web service , turns out bad request 400 error. based on our observation far have seen upto 65 chars worked once sent ~ 89 chars failed.
*code snippet
req := utl_http.begin_request(url, 'put',' http/1.1'); utl_http.set_body_charset('utf-8'); utl_http.set_header(req, 'username', username); utl_http.set_header(req, 'password', password); utl_http.set_header(req, 'content-type', 'application/octet-stream'); utl_http.set_header(req, 'content-length', '32767'); utl_http.set_header(req, 'accept-encoding', 'gzip'); utl_http.set_header(req, 'transfer-encoding', 'chunked'); filename := utl_raw.cast_to_varchar2 (utl_encode.base64_encode (utl_raw.cast_to_raw (ffile.file_name))); //encoding file name before sending utl_http.set_header(req1, 'x-filename', filename); //causing problem if length increases*
Comments
Post a Comment