This is a follow-up of Using XML to ingest data, that i have managed to solve.
I need some help with creating a nested statement.
The first rsd which lists out all the IDs is this:
<api:script xmlns:api="http://apiscript.com/ns?v1" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- See Column Definitions to specify column behavior and use XPaths to extract column values from XML. -->
<api:info title="contract" desc="Generated schema file." xmlns:other="http://apiscript.com/ns?v1">
<attr name="contractid" xs:type="string" readonly="false" other:xPath="/Envelope/Body/contracts/contract@contractid" />
<attr name="description" xs:type="string" readonly="false" other:xPath="/Envelope/Body/contracts/contract@description" />
</api:info>
<api:set attr="DataModel" value="RELATIONAL" />
<api:set attr="URI" value="https://my.soap.endpoint/service.asmx?WSDL" />
<api:set attr="PushAttributes" value="true" />
<api:set attr="EnablePaging" value="true" />
<api:set attr="Header:Name#" value="SOAPAction"/>
<api:set attr="Header:Value#" value="http://publicprocurement.com/XMLBusinessIntelligence"/>
<api:set attr="XPath" value="/Envelope/Body/contracts/contract" />
<!-- The GET method corresponds to SELECT. Here you can override the default processing of the SELECT statement. The results of processing are pushed to the schema's output. See SELECT Execution for more information. -->
<api:script method="GET">
<api:set attr="method" value="POST"/>
<api:set attr="ContentType" value="text/xml"/>
<api:set attr="AcceptCharset" value="utf-8" />
<api:set attr="data">
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:pub="http://publicprocurement.com">
<soap:Header/>
<soap:Body>
<pub:XMLBusinessIntelligence>
<pub:SystemUserID>123456</pub:SystemUserID>
</pub:XMLBusinessIntelligence>
</soap:Body>
</soap:Envelope>
</api:set>
<api:call op="xmlproviderGet">
<api:push/>
</api:call>
</api:script>
</api:script>
Then there is this rsd file that uses ID (in ProjectID) from above to list up futher info.
<api:script xmlns:api="http://apiscript.com/ns?v1" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- See Column Definitions to specify column behavior and use XPaths to extract column values from XML. -->
<api:info title="contract" desc="Generated schema file." xmlns:other="http://apiscript.com/ns?v1">
<attr name="ExternalId" xs:type="string" readonly="false" other:xPath="/Envelope/Body/Result"/>
</api:info>
<api:set attr="DataModel" value="RELATIONAL" />
<api:set attr="URI" value="https://my.soap.com/services.asmx?WSDL" />
<api:set attr="PushAttributes" value="true" />
<api:set attr="EnablePaging" value="true" />
<api:set attr="Header:Name#" value="SOAPAction"/>
<api:set attr="Header:Value#" value="http://publicprocurement.com/Export"/>
<api:set attr="XPath" value="/Envelope/Body" />
<!-- The GET method corresponds to SELECT. Here you can override the default processing of the SELECT statement. The results of processing are pushed to the schema's output. See SELECT Execution for more information. -->
<api:script method="GET">
<api:set attr="method" value="POST"/>
<api:set attr="ContentType" value="text/xml"/>
<api:set attr="AcceptCharset" value="utf-8" />
<api:set attr="data">
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:pub="http://publicprocurement.com">
<soap:Header/>
<soap:Body>
<pub:Export>
<pub:SystemUserID>123456</pub:SystemUserID>
<pub:ProjectID>666666</pub:ProjectID>
</pub:Export>
</soap:Body>
</soap:Envelope>
</api:set>
<api:call op="xmlproviderGet">
<api:push/>
</api:call>
</api:script>
</api:script>
I am stuck here i dont know how to create a nested RSD for XML
<api:script xmlns:api="http://apiscript.com/ns?v1" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- See Column Definitions to specify column behavior and use XPaths to extract column values from XML. -->
<api:info title="contract" desc="Generated schema file." xmlns:other="http://apiscript.com/ns?v1">
<attr name="contractid" xs:type="string" readonly="false" other:xPath="/Envelope/Body/contracts/contract@contractid" />
<attr name="ExternalId" xs:type="string" readonly="false" other:xPath="/Envelope/Body/Result"/>
</api:info>
<api:set attr="DataModel" value="RELATIONAL" />
<api:set attr="URI" value="https://services.tendsign.com/customerservices.asmx?WSDL" />
<api:set attr="PushAttributes" value="true" />
<api:set attr="EnablePaging" value="true" />
<api:set attr="Header:Name#" value="SOAPAction"/>
<api:set attr="filein.Header:Value#" value="http://publicprocurement.com/XMLBusinessIntelligence"/>
<api:set attr="filein.xPath#" value="/Envelope/Body/contracts/contract@contractid" />
<api:set attr="filein.ElementMapName#" value="file_id" />
<api:set attr="fileout.Header:Value#" value="http://publicprocurement.com/Export"/>
<api:set attr="fileout.xPath#" value="/Envelope/Body" />
<!-- The GET method corresponds to SELECT. Here you can override the default processing of the SELECT statement. The results of processing are pushed to the schema's output. See SELECT Execution for more information. -->
<api:script method="GET">
<api:set attr="method" value="POST"/>
<api:set attr="ContentType" value="text/xml"/>
<api:set attr="AcceptCharset" value="utf-8" />
<api:set attr="data">
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:pub="http://publicprocurement.com">
<soap:Header/>
<soap:Body>
<pub:ExportDocsProjectWithTenders>
<pub:SystemUserID>123456</pub:SystemUserID>
<pub:ProjectID>??????</pub:ProjectID>
</pub:ExportDocsProjectWithTenders>
</soap:Body>
</soap:Envelope>
</api:set>
<api:call op="xmlproviderGet">
<api:push/>
</api:call>
</api:script>
</api:script>
i dont know how to use <api:call op="xmlproviderGet">