【发布时间】:2018-03-09 21:33:11
【问题描述】:
我有一个使用 UTL_HTTP 向 SOAP 服务发出请求的 oracle 程序
这里是返回的响应,如 dbms_output.put_line(responseText); 所证明的那样;
<?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>
<CreateProductionTicketResponse xmlns="http://tempuri.org/">
<CreateProductionTicketResult>246300</CreateProductionTicketResult>
<err />
</CreateProductionTicketResponse>
</soap:Body>
</soap:Envelope>
然后我创建一个 XMLTYPE 对象
responseXml := XMLTYPE(responseText);
并尝试提取 CreateProductionTicketResult 的值
TICKET_ID := responseXML.EXTRACT('/soap:Envelope/soap:Body/CreateProductionTicketResponse/CreateProductionTicketResult/text()', 'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"').getnumberval();
这行报错
ORA-30625: method dispatch on NULL SELF argument is disallowed
ORA-06512: at line 41
30625. 00000 - "method dispatch on NULL SELF argument is disallowed"
*Cause: A member method of a type is being invoked with a NULL SELF
argument.
*Action: Change the method invocation to pass in a valid self argument.
我猜我搞砸了 EXTRACT 语法,但我不知道出了什么问题。
【问题讨论】: