java中:
public interface IwscxService {
/**
*
* @param requestxml xml格式
* @return xml格式
*/
public String WscxService(String requestxml,String ip);
}
函数代码:
create or replace function FUNC_Webservice(xmlstring VARCHAR2,ip1 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.19.106:7001/wscxWeb_service/services/wscxWeb_service?wsdl';
l_service_name := 'wscxWeb_service';
l_operation_name := 'WscxService';----WscxService
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(xmlstring);
l_input_params(2) := ANYDATA.ConvertVarchar2(ip1);
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
RETURN substr(sqlerrm,0,2000);
END FUNC_Webservice;
调用函数select FUNC_Webservice('','') from dual;的问题:
ORA-29532: Java 调用被未捕获的 Java 异常错误终止: port: {http://service.hhzs.com}wscxWeb_serviceHttpPort does not contain operation: WscxService
问:该问题如何解决?operation具体又是指什么意思。。。。
--友情转载