I have a standard code where I'm sending the request XML over HTTP and I'm unable to get a response.
The error from the application is as below.
"ERROR: ORA-29273: HTTP request failed
ORA-06512: at "SYS.UTL_HTTP", line 1267
ORA-29263: HTTP protocol error
ORA-06512: at "SYS.UTL_HTTP", line 651
ORA-06512: at "SYS.UTL_HTTP", line 1257
ORA-06512: at "OACIS.PERMITTING", line 239
ORA-06512: at "OACIS.PERMITTING", line 260
ORA-06512: at line 1SOURCE: Oracle Data Provider for .NET, Managed Driver STACK TRACE: at OracleInternal.ServiceObjects.OracleCommandImpl.VerifyExecution(OracleConnectionImpl connectionImpl, Int32& cursorId, Boolean bThrowArrayBindRelatedErrors, OracleException& exceptionForArrayBindDML, Boolean& hasMoreRowsInDB, Boolean bFirstIterationDone)
at OracleInternal.ServiceObjects.OracleCommandImpl.VerifyExecution(OracleConnectionImpl connectionImpl, Int32& cursorId, Boolean bThrowArrayBindRelatedErrors, OracleException& exceptionForArrayBindDML, Boolean bFirstIterationDone)
at OracleInternal.ServiceObjects.OracleCommandImpl.ExecuteNonQuery(String commandText, OracleParameterCollection paramColl, CommandType commandType, OracleConnectionImpl connectionImpl, Int32 longFetchSize, Int64 clientInitialLOBFS, OracleDependencyImpl orclDependencyImpl, Int64[]& scnFromExecution, OracleParameterCollection& bindByPositionParamColl, Boolean& bBindParamPresent, OracleException& exceptionForArrayBindDML, Boolean isFromEF)
at Oracle.ManagedDataAccess.Client.OracleCommand.ExecuteNonQuery()
at OacisWeb.DataProviderHelper.UpdateOracleRecord(String commandText, CommandType commandType, List`1 parameters)"
The error when i try to manually execute the proc -
ORA-29263: HTTP protocol error
ORA-06512: at "SYS.UTL_HTTP", line 1267
ORA-06512: at "SYS.UTL_HTTP", line 651
ORA-06512: at "SYS.UTL_HTTP", line 1257
ORA-06512: at "OACIS.PERMITTING_TEST", line 820
ORA-06512: at line 1
29263. 00000 - "HTTP protocol error"
*Cause: A HTTP protocol error occured during the HTTP operation.
*Action: Check the HTTP server that the HTTP operation was performed to
make sure that it follows the HTTP protocol standard
My ACLs are in place.
select utl_http.request('1x.x.x.x/service-bundle-infrastructure/services') from dual; - this also gives me a successful response.
My code is as below. This functionality was working in 11G, and not now in 12 C.
The only change made is a migration from 11G to 12C. Please help.
My Code as below -
PROCEDURE get_application_info(
p_app_id IN VARCHAR2,
p_project_ems_id IN VARCHAR2) IS
soap_request VARCHAR2(32767);
soap_respond CLOB;
http_req utl_http.req;
http_resp utl_http.resp;
resp XMLType;
i INTEGER;
o CLOB;
buffer VARCHAR2(32767);
eof BOOLEAN;
l_url VARCHAR2(250);
BEGIN
auth.set_user_id(constants.zonescorp);
SELECT server_url
INTO l_url
FROM server_details
WHERE server_type = constants.eservice_industrial;
soap_request:= '<?xml version = "1.0" encoding = "UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:inf="http://www.service.dummy/InfrastructureFacilityService/">
<soapenv:Header/>
<soapenv:Body>
<inf:getIfpApplicationDetail>
<applicationNo>' || p_app_id || '</applicationNo>
<emsId>' || p_project_ems_id || '</emsId>
</inf:getIfpApplicationDetail>
</soapenv:Body>
</soapenv:Envelope>';
http_req:= utl_http.begin_request(
l_url,
'POST',
'HTTP/1.1');
utl_http.set_header(http_req, 'Content-Type', 'text/xml;charset=UTF-8');
utl_http.set_header(http_req, 'Content-Length', length(soap_request));
utl_http.set_header(http_req, 'SOAPAction', 'http://www.service.dummy/InfrastructureFacilityService/getIfpApplicationDetail');
utl_http.write_text(http_req, soap_request);
http_resp:= utl_http.get_response(http_req);
dbms_lob.CreateTemporary( soap_respond, true );
eof := false;
LOOP
EXIT WHEN eof;
BEGIN
utl_http.read_line( http_resp, buffer, true );
IF LENGTH(buffer) > 0 THEN
dbms_lob.WriteAppend(
soap_respond,
LENGTH(buffer),
buffer
);
END IF;
EXCEPTION WHEN utl_http.END_OF_BODY THEN
eof := true;
END;
END LOOP;
utl_http.end_response(http_resp);
UPDATE dummy_table
SET application_xml =
--get rid of the namespaces, I don't want to deal with xmldb's namespace
--restrictions right now (or ever really)
regexp_replace(soap_respond ,'<(\/)?((ns[0-9]*)?(soap)?):', '<\1')
WHERE application_id = p_app_id
AND project_id = p_project_ems_id;
COMMIT;
END;