Hi all,
I'm consuming a Web service from PL/SQL Stored Proc. and I'm getting this xml:
XML_DATA= <?xml version = '1.0' encoding = 'UTF-8'?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:consultaCooperativistaResponse xmlns:ns2="http://unired.ws.com/">
<return>
<codError>0</codError>
<codigoCooperativista>70039395</codigoCooperativista>
<codigoCuenta>70057992</codigoCuenta>
<descripcionTipoCuenta>APORTACIONES</descripcionTipoCuenta>
<mensaje></mensaje>
<nombreAfiliado>JEFFREEHY TALAVERA DIAZ</nombreAfiliado>
</return>
<return>
<codError>0</codError>
<codigoCooperativista>70039395</codigoCooperativista>
<codigoCuenta>70057993</codigoCuenta>
<descripcionTipoCuenta>RETIRABLES</descripcionTipoCuenta>
<mensaje></mensaje>
<nombreAfiliado>JEFFREEHY TALAVERA DIAZ</nombreAfiliado>
</return>
</ns2:consultaCooperativistaResponse>
</S:Body>
</S:Envelope>
resp:= XMLType.createXML(soap_respond);
delete from session_temp_xml;
INSERT INTO SESSION_TEMP_XML ("ID", "XML_DATA")
VALUES (1, resp);
COMMIT;
OPEN p_recordset FOR
SELECT extractValue(x.column_value, '//codError') as codigo_error
, extractValue(x.column_value, '//codigoCooperativista') as identidad
, extractValue(x.column_value, '//codigoCuenta') as numero_cuenta
FROM SESSION_TEMP_XML s
, TABLE(
XMLSequence(
extract(
s.XML_DATA
, '/ns2:consultaCooperativistaResponse/return'
, 'xmlns:ns2="http://unired.ws.com/"'
)
)
) x;
I'm getting nothing.
An this is what I need.
CodError, CodCoop CodCTA Descrip Nombre
0 70039395 70057992 APORTACIONES JEFFREEHY TALAVERA DIAZ
0 70039395 70057993 RETIRABLES JEFFREEHY TALAVERA DIAZ
Nedd help.