【发布时间】:2014-04-24 17:45:50
【问题描述】:
我正在使用返回以下输出的 Web 服务。我很难从输出中构建 XMLTYPE 变量。尝试输出 CreateUserSessionFromInstanceResult 时出现以下错误
ORA-30625: 不允许对 NULL SELF 参数进行方法调度
procedure xmltest is
str_xml varchar2(32000);
v_xml XMLTYPE;
BEGIN
str_xml :='<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<CreateUserSessionFromInstanceResponse xmlns="http://archer-tech.com/webservices/">
<CreateUserSessionFromInstanceResult>4FFABEE05C4910A31FEC75D5FEDCDFB5</CreateUserSessionFromInstanceResult>
</CreateUserSessionFromInstanceResponse>
</soap:Body>
</soap:Envelope>';
v_xml := XMLTYPE(str_xml);
HTP.P(v_xml.extract('//CreateUserSessionFromInstanceResult/text()').getstringval());
END;
【问题讨论】: