oracle函数如下:
create or replace function GetOrganServices(strServiceKey in VARCHAR2,
strObjectkey in VARCHAR2,
strOperation in varchar2,
strData in VARCHAR2)
return VARCHAR2 AS
l_service utl_dbws.SERVICE;
l_call utl_dbws.call;
l_result ANYDATA;
l_wsdl_url VARCHAR2(1024);
l_service_name VARCHAR2(200);
l_operation_name VARCHAR2(200);
l_input_params utl_dbws.anydata_list;
BEGIN
l_wsdl_url := 'http://192.168.1.222:8080/WebSer.asmx?wsdl';
l_service_name := 'WebSer';
l_operation_name := 'GetOrganServices';
l_service := utl_dbws.create_service(wsdl_document_location => URIFACTORY.getURI(l_wsdl_url),
service_name => l_service_name);
l_call := utl_dbws.create_call(service_handle => l_service,
port_name => null,
operation_name => l_operation_name);
l_input_params(1) := ANYDATA.ConvertVarchar2(strServiceKey);
l_input_params(2) := ANYDATA.ConvertVarchar2(strObjectkey);
l_input_params(3) := ANYDATA.ConvertVarchar2(strOperation);
l_input_params(4) := ANYDATA.ConvertVarchar2(strData);
l_result := utl_dbws.invoke(call_handle => l_call,
input_params => l_input_params);
utl_dbws.release_call(call_handle => l_call);
utl_dbws.release_service(service_handle => l_service);
RETURN ANYDATA.AccessVarchar2(l_result);
EXCEPTION
WHEN OTHERS THEN
RETURN substr(sqlerrm, 0, 2000);
END GetOrganServices;
报错:ORA-29532: Java 调用被未捕获的 Java 异常错误终止: java.lang.ArrayIndexOutOfBoundsException
--友情转载