oracle调用webservice
oracle掉用webservice,提示ORA-29532: Java 调用被未捕获的 Java 异常错误终止: java.lang.IllegalAccessException: java.lang.NoClassDefFoundError,请高手指教
代码如下
create or replace
Function Test(
Xmlstring 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;
code varchar(50);
Begin
L_Wsdl_Url := 'http://www.usoftchina.com/ws95/services/vendor?wsdl';
L_Service_Name := 'vendor';
L_Operation_Name := 'vendorinfo';
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(0) := Anydata.Convertvarchar2(Xmlstring);
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,2000000000);
END test;
webservice
oracle
------解决方案--------------------java.lang.NoClassDefFoundError,
这个异常好像说了问题。。 找不到类么。
------解决方案--------------------印象中这种调用方式需要一个三方的包
------解决方案--------------------官网对这个错误的处理:
http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/IllegalAccessException.html