【发布时间】:2015-06-22 13:21:38
【问题描述】:
我做错了什么? 我得到一个空洞的回应。 请帮忙看看下面的详细信息
下面我正在创建一个表并插入其中。 然后我从肥皂消息中提取 xpath 详细信息的值
CREATE TABLE REQUESTS (
ID NUMBER(10,0) PRIMARY KEY,
REQUEST XMLTYPE,
RESPONSE XMLTYPE
);
INSERT INTO REQUESTS (ID, REQUEST, RESPONSE)
VALUES (
2,
'<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:typ="http://xmlns.oracle.com/apps/prc/po/editDocument/purchaseOrderServiceV2/types/">
<env:Header>
<wsa:Action>http://xmlns.oracle.com/apps/prc/po/editDocument/purchaseOrderServiceV2//PurchaseOrderService/createPurchaseOrderResponse</wsa:Action>
<wsa:MessageID>urn:uuid:04b70bff-5a77-4e24-a7a8-e5b217aa4b4a</wsa:MessageID>
</env:Header>
<env:Body>
<ns0:createPurchaseOrderResponse xmlns:ns0="http://xmlns.oracle.com/apps/prc/po/editDocument/purchaseOrderServiceV2/types/">
<ns1:result xsi:type="ns0:RequestResults" xmlns:ns1="http://xmlns.oracle.com/apps/prc/po/editDocument/purchaseOrderServiceV2/types/" xmlns:ns0="http://xmlns.oracle.com/apps/prc/po/editDocument/purchaseOrderServiceV2/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ns0:POHeaderId>300000000694092</ns0:POHeaderId>
<ns0:OrderNumber>27</ns0:OrderNumber>
<ns0:SoldToLegalEntityId>300000000639014</ns0:SoldToLegalEntityId>
<ns0:ChangeOrderNumber xsi:nil="true"/>
<ns0:RequestStatus>SUCCESS</ns0:RequestStatus>
</ns1:result>
</ns0:createPurchaseOrderResponse>
</env:Body>
</env:Envelope>', null);
SELECT
req.id,
extractValue(
req.request,
'/env:Envelope/env:Body/ns0:createPurchaseOrderResponse/ns1:result/ns0:OrderNumber',
'xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns0="http://xmlns.oracle.com/apps/prc/po/editDocument/purchaseOrderServiceV2/types/" xmlns:ns1="http://xmlns.oracle.com/apps/prc/po/editDocument/purchaseOrderServiceV2/types/" xmlns:ns0="http://xmlns.oracle.com/apps/prc/po/editDocument/purchaseOrderServiceV2/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ') Title
FROM
requests req
WHERE
id = 2
【问题讨论】:
标签: xml oracle xpath xml-namespaces