日期:2014-05-16 浏览次数:21136 次
CREATE OR REPLACE FUNCTION call_sayHello(username IN VARCHAR2)
RETURN VARCHAR2 AS
l_service SYS.UTL_DBWS.service;
l_call SYS.UTL_DBWS.call;
l_result ANYDATA;
l_wsdl_url VARCHAR2(1024);
l_service_name VARCHAR2(200);
l_operation_name VARCHAR2(200);
l_input_params SYS.UTL_DBWS.anydata_list;
BEGIN
l_wsdl_url := 'http://192.168.0.169:8081/ic/services/ICSMSService?wsdl';
l_service_name := 'ICSMSService';
l_operation_name := 'sendMsg';
l_service := SYS.UTL_DBWS.create_service(wsdl_document_location => URIFACTORY.getURI(l_wsdl_url),
service_name => l_service_name);
l_call := SYS.UTL_DBWS.create_call(service_handle => l_service,
port_name => NULL,
operation_name => l_operation_name);
l_input_params(1) := ANYDATA.ConvertVarchar2(username);
l_result := SYS.UTL_DBWS.invoke(call_handle => l_call,
input_params => l_input_params);
SYS.UTL_DBWS.release_call(call_handle => l_call);
SYS.UTL_DBWS.release_service(service_handle => l_service);
RETURN ANYDATA.AccessVarchar2(l_result);
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line(sqlerrm);
RETURN NULL;
return sqlerrm;
END call_sayHello;
create or replace function FUNC_GENERATE_LOGINNAME(xmlstring VARCHAR2)
return VARCHAR2 AS
service_ sys.utl_dbws.SERVICE;
call_ sys.utl_dbws.CALL;
service_qname sys.utl_dbws.QNAME;
port_qname sys.