CREATE(xmldoc,TRUE,TRUE); // Create SOAP Envelope soapEnvelope := xmldoc.createElement('Soap:Envelope'); soapEnvelope.setAttribute('xmlns:Soap', 'http://schemas.xmlsoap.org/soap/envelope/'); xmldoc.appendChild(soapEnvelope); // Create SOAP Body soapBody := xmldoc.createElement('Soap:Body'); soapEnvelope.appendChild(soapBody); // Create Method Element soapMethod := xmldoc.createElement(method); soapMethod.setAttribute('xmlns', nameSpace); soapBody.appendChild(soapMethod); // Transfer parameters by loading them into a XML Document and move them CREATE(parametersXmlDoc,TRUE,TRUE); parametersXmlDoc.loadXML('<parameters>'+parameters+'</parameters>'); IF parametersXmlDoc.firstChild.hasChildNodes THEN BEGIN WHILE parametersXmlDoc.firstChild.childNodes.length>0 DO BEGIN nodel := parametersXmlDoc.firstChild.firstChild; nodel := parametersXmlDoc.firstChild.removeChild(nodel); soapMethod.appendChild(nodel); soapMethod.appendChild(nodel); END; END;
Comments
I would suggest to use XMLport to import/export xml file from NAV. its easiest way.