How to add SOAP elements to XML [message #680685] |
Mon, 01 June 2020 04:55 |
|
Mark70
Messages: 18 Registered: June 2020
|
Junior Member |
|
|
I was asked to generate an XML like this:
<?xml version="1.0"?>
<soap:Envelope xmlns:soap="http ://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns2:elaboraDocumentoAsync xmlns:ns2="http ://siac.csi.it/documenti/svc/1.0">
........
</ns2:elaboraDocumentoAsync>
</soap:Body>
</soap:Envelope>
I've tried to develop sql code like this:
...
select xmltype(
replace(
replace(
xmlelement("soap-Envelope",
xmlelement("soap-Body",
xmlconcat(
document_X1,
document_X2,
document_X3)
)).extract('/*'),
'soap-Body','soap:Body')
,
'soap-Envelope','soap:Envelope xmlns:soap="http ://schemas.xmlsoap.org/soap/envelope/"'))
into RES
from dual;
...
where document_X1, document_X2, document_X3 are XMLTYPE with tags and RES is also an XMLTYPE object
but I get this:
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00225: end-element tag "soap:Envelopexmlns:soap" does not match start-element tag "soap:Envelope"
Thanks again!
Mark
|
|
|
|
|
|
|