【问题标题】:ORA-30625: method dispatch on NULL SELF argument is disallowedORA-30625: 不允许对 NULL SELF 参数进行方法调度
【发布时间】:2017-01-25 23:47:03
【问题描述】:

Oracle 一直给我这个错误:

ORA-30625: 不允许对 NULL SELF 参数进行方法调度

我尝试使用soap_api

代码如下:

FUNCTION add_numbers (p_int_1  IN  NUMBER,
    p_int_2  IN  NUMBER)
RETURN NUMBER
AS  
l_request  soap_api.t_request;
l_response  soap_api.t_response;
l_return    VARCHAR2(32767);

l_url          VARCHAR2(32767);
l_namespace    VARCHAR2(32767);
l_method       VARCHAR2(32767);
l_soap_action  VARCHAR2(32767);
l_result_name  VARCHAR2(32767);
BEGIN
l_url         := 'http://192.168.1.23:8080/TestWebservice.asmx';
l_namespace   := 'xmlns="http://192.168.1.23:8080/TestWebservice.asmx"';
l_method      := 'add';
l_soap_action := 'http://tempuri.org/add';
l_result_name := 'return';

l_request := soap_api.new_request(p_method       => l_method,
                            p_namespace    => l_namespace);

soap_api.add_parameter(p_request => l_request,
                 p_name    => 'int1',
                 p_type    => 'xsd:integer',
                 p_value   => p_int_1);

soap_api.add_parameter(p_request => l_request,
                 p_name    => 'int2',
                 p_type    => 'xsd:integer',
                 p_value   => p_int_2);

l_response := soap_api.invoke(p_request => l_request,
                        p_url     => l_url,
                        p_action  => l_soap_action);

l_return := soap_api.get_return_value(p_response  => l_response,
                                p_name      => l_result_name,
                                p_namespace => l_namespace);

RETURN l_return;
END;

【问题讨论】:

  • 调用get_return_value方法前检查l_response是否不为空
  • 我该怎么做。 l_response 来自 soap_api
  • IF l_response IS NOT NULL THEN l_return := soap_api.get_return_value(...); END IF;.
  • 它不起作用 :( .......... PLS-00306: 调用“IS NOT NULL”时参数的数量或类型错误............ ... PL/SQL:语句被忽略
  • 另一个问题:为什么 l_response 来自soap_api 为空?

标签: oracle web-services plsql


【解决方案1】:

查看下一行的返回名称

l_result_name := 'return';

在我的情况下改变这个并解决!

l_result_name := '返回';

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-12-03
    • 1970-01-01
    • 2017-08-10
    • 1970-01-01
    • 2017-05-15
    • 1970-01-01
    相关资源
    最近更新 更多