UTL_HTTP: 407 Proxy Authentication Required
I am trying to use a WSDL file(ConCatTest_RPC.wsdl) im my oracle function to call a webservice instead of directly accessing the webservice in stored procedure.
So I created a virtual directory in IIS that is pointing to the location of WSDL file and then I tried to use the WSDL file address in the place of web service URLof the function below.
CREATE OR REPLACE function get_new_string (proxy_server IN VARCHAR2,
web_service IN VARCHAR2,web_service_param IN VARCHAR2)
RETURN VARCHAR2 IS
req demo_soap.request;
resp demo_soap.response;
a varchar2(30);
BEGIN utl_http.set_proxy(proxy_server,
NULL);
utl_http.set_persistent_conn_support(TRUE);
req := demo_soap.new_request('ConCatTest','xmlns="ServiceClass"');
demo_soap.add_parameter(req, 'strInput', 'xsd:string', web_service_param);
resp := demo_soap.invoke(req, web_service , '');
a:= demo_soap.get_return_value(resp, 'strOutput','xmlns:ns1="ServiceClass"');
return a;
END;
select get_new_string
('proxy:80','http://localhost/MyWebServiceTest/WMSourceTest_RPC.wsdl','Scott')
from dual
SQL> /
ERROR:
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00225: end-element tag "H4" does not match start-element tag "P"
Error at line 9
ORA-06512: at "SYS.XMLTYPE", line 0
ORA-06512: at "DORSBP00.DEMO_SOAP", line 75
ORA-06512: at "DORSBP00.GET_NEW_STRING", line 11
**************************************
Even a simple utl_http.request is failing. Do I need to setup anything on the databse side. Thanks.
SQL> select UTL_HTTP.REQUEST( 'localhost:80','proxy_server:80') from
dual;
UTL_HTTP.REQUEST('LOCALHOST:80','proxy_server:80')
--------------------------------------------------------------------------------
----------------
<HTML>
<HEAD><TITLE>407 Proxy Authentication Required</TITLE></HEAD>
<BODY>
<H1>Proxy Authentication Required</H1>
<H4>
Unable to complete request:<P>
Access denied due to authentication failure.
</H4>
<HR>
</BODY>
</HTML>
Thanks.