<api:scriptxmlns: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:infotitle="2"desc="Generated schema file."xmlns:other="http://apiscript.com/ns?v1"><!-- You can modify the name, type, and column size here. --><attrname="name"xs:type="string"readonly="false"other:xPath="/attachments/file/name" /><attrname="filename"xs:type="string"readonly="false"other:xPath="/attachments/file/filename" /><attrname="fileurl"xs:type="string"readonly="false"other:xPath="/attachments/file/fileurl" /></api:info><api:setattr="DataModel"value="DOCUMENT" /><api:setattr="PushAttributes"value="true" /><api:setattr="EnablePaging"value="true" /><api:setattr="Header:Name#"value="SOAPAction"/><api:setattr="URI"value="https://your.soap.endpoint.com/getData.asmx" /><api:setattr="XPath"value="/attachments" /><api:setattr="method"value="POST"/><api:setattr="Header:Name"value="Content-Type" /><api:setattr="Header:Value"value="text/xml" /><api:setattr="data"><?xml version="1.0" encoding="utf-8"?><soapenv:Envelopexmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:xsd="http://www.w3.org/2001/XMLSchema"xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"xmlns:uen="uen:esws"><soapenv:Header/><soapenv:Body><uen:Esws.ListPublihedFilessoapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><pub:SystemUserID>123456</pub:SystemUserID><pub:ProjectID>121212</pub:ProjectID></uen:Esws.ListPublihedFiles></soapenv:Body></soapenv:Envelope></api:set><api:setattr="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:scriptmethod="GET"><api:setattr="method"value="GET"/><api:callop="xmlproviderGet"><api:push/></api:call></api:script></api:script>
When i try to view table, i get his error
This is how Connection and, JSON and XML setting looks like
Best answer by aftabp
Finally managed to get a response.
Here is the code
<api:scriptxmlns: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:infotitle="contract"desc="Generated schema file."xmlns:other="http://apiscript.com/ns?v1"><attrname="_id"xs:type="string"readonly="false"key="true"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/_id" /><attrname="description"xs:type="string"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/description" /><attrname="filename"xs:type="string"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/filename" /><attrname="fileurl"xs:type="string"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/fileurl" /><attrname="name"xs:type="string"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/name" /><attrname="size"xs:type="integer"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/size" /><attrname="updated"xs:type="datetime"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/updated" /><attrname="updatedutc"xs:type="datetime"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/updatedutc" /></api:info><api:setattr="DataModel"value="RELATIONAL" /><api:setattr="URI"value="https://your.soap.endpoint.com/getData.asmx?wsdl" /><api:setattr="PushAttributes"value="true" /><api:setattr="EnablePaging"value="true" /><api:setattr="Header:Name#"value="SOAPAction"/><api:setattr="Header:Value#"value="http://public.com/endPoint"/><api:setattr="XPath"value="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file" /><!-- 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:scriptmethod="GET"><api:setattr="method"value="POST"/><api:setattr="ContentType"value="text/xml"/><api:setattr="AcceptCharset"value="utf-8" /><api:setattr="data"><?xml version="1.0" encoding="utf-8"?><soap:Envelopexmlns:soap="http://www.w3.org/2003/05/soap-envelope"xmlns:pub="http://public.com"><soap:Header/><soap:Body><pub:ListPublishedFiles><pub:SystemUserID>123456</pub:SystemUserID><pub:ProjectID>666666</pub:ProjectID></pub:ListPublishedFiles></soap:Body></soap:Envelope></api:set><api:callop="xmlproviderGet"><api:push/></api:call></api:script></api:script>
<api:scriptxmlns: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:infotitle="contract"desc="Generated schema file."xmlns:other="http://apiscript.com/ns?v1"><attrname="_id"xs:type="string"readonly="false"key="true"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/_id" /><attrname="description"xs:type="string"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/description" /><attrname="filename"xs:type="string"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/filename" /><attrname="fileurl"xs:type="string"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/fileurl" /><attrname="name"xs:type="string"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/name" /><attrname="size"xs:type="integer"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/size" /><attrname="updated"xs:type="datetime"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/updated" /><attrname="updatedutc"xs:type="datetime"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/updatedutc" /></api:info><api:setattr="DataModel"value="RELATIONAL" /><api:setattr="PushAttributes"value="true" /><api:setattr="EnablePaging"value="true" /><api:setattr="Header:Name#"value="SOAPAction"/><api:setattr="URI"value="https://your.soap.endpoint.com?wsdl" /><api:setattr="XPath"value="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file" /><api:setattr="method"value="POST"/><api:setattr="Header:Name"value="Content-Type" /><api:setattr="Header:Value"value="text/xml" /><api:setattr="data"><?xml version="1.0" encoding="utf-8"?><soap:Envelopexmlns:soap="http://www.w3.org/2003/05/soap-envelope"xmlns:pub="http://publicprocurement.com"><soap:Header/><soap:Body><pub:ListPublishedFilessoapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/>
<pub:SystemUserID>123456</pub:SystemUserID>
<pub:ProjectID>66666666</pub:ProjectID>
</pub:ListPublishedFiles>
</soap:Body>
</soap:Envelope>
</api:set>
<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:scriptmethod="GET"><api:setattr="method"value="GET"/><api:callop="xmlproviderGet"><api:push/></api:call></api:script></api:script>
I dont get any error in TX but when i preview the table its empty.
In WSDL, ListPublishedFiles that i am trying to reterive is this:
<api:scriptxmlns: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:infotitle="contract"desc="Generated schema file."xmlns:other="http://apiscript.com/ns?v1"><attrname="_id"xs:type="string"readonly="false"key="true"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/_id" /><attrname="description"xs:type="string"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/description" /><attrname="filename"xs:type="string"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/filename" /><attrname="fileurl"xs:type="string"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/fileurl" /><attrname="name"xs:type="string"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/name" /><attrname="size"xs:type="integer"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/size" /><attrname="updated"xs:type="datetime"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/updated" /><attrname="updatedutc"xs:type="datetime"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/updatedutc" /></api:info><api:setattr="DataModel"value="RELATIONAL" /><api:setattr="PushAttributes"value="true" /><api:setattr="EnablePaging"value="true" /><api:setattr="Header:Name#"value="SOAPAction"/><api:setattr="URI"value="https://your.soap.endpoint.com?wsdl" /><api:setattr="XPath"value="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file" /><api:setattr="Header:Name"value="Content-Type" /><api:setattr="Header:Value"value="text/xml" /><!-- 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:scriptmethod="GET"><api:setattr="method"value="POST"/><api:setattr="data"><?xml version="1.0" encoding="utf-8"?><soap:Envelopexmlns:soap="http://www.w3.org/2003/05/soap-envelope"xmlns:pub="http://publicprocurement.com"><soap:Header/><soap:Body><pub:ListPublishedFilessoapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/>
<pub:SystemUserID>123456</pub:SystemUserID>
<pub:ProjectID>66666666</pub:ProjectID>
</pub:ListPublishedFiles>
</soap:Body>
</soap:Envelope>
</api:set>
<api:call op="xmlproviderGet"><api:push/></api:call></api:script></api:script>
<api:scriptxmlns: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:infotitle="contract"desc="Generated schema file."xmlns:other="http://apiscript.com/ns?v1"><attrname="_id"xs:type="string"readonly="false"key="true"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/_id" /><attrname="description"xs:type="string"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/description" /><attrname="filename"xs:type="string"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/filename" /><attrname="fileurl"xs:type="string"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/fileurl" /><attrname="name"xs:type="string"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/name" /><attrname="size"xs:type="integer"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/size" /><attrname="updated"xs:type="datetime"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/updated" /><attrname="updatedutc"xs:type="datetime"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/updatedutc" /></api:info><api:setattr="DataModel"value="RELATIONAL" /><api:setattr="PushAttributes"value="true" /><api:setattr="EnablePaging"value="true" /><api:setattr="Header:Name#"value="SOAPAction"/><api:setattr="URI"value="https://your.soap.endpoint.com?wsdl" /><api:setattr="XPath"value="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file" /><api:setattr="Header:Name"value="Content-Type" /><api:setattr="Header:Value"value="text/xml" /><!-- 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:scriptmethod="GET"><api:setattr="method"value="POST"/><api:setattr="data"><?xml version="1.0" encoding="utf-8"?><soap:Envelopexmlns:soap="http://www.w3.org/2003/05/soap-envelope"xmlns:pub="http://publicprocurement.com"><soap:Header/><soap:Body><pub:ListPublishedFilessoapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding"/><pub:SystemUserID>123456</pub:SystemUserID><pub:ProjectID>66666666</pub:ProjectID></pub:ListPublishedFiles></soap:Body></soap:Envelope></api:set><api:callop="xmlproviderGet"><api:push/></api:call></api:script></api:script>
I think I found the issue. Also, turn on logging when you get errors, it will tell you more about what is going on
The stuff you run in postman should be the closest, but you need to encode it as xml for it to run.
I do notice a difference between what you use in Postman and what you have in the RSD file.
<pub:ListPublishedFiles> in the Postman setup is <pub:ListPublishedFiles soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding"/> in the RSD.
Can you make these queries exactly the same in both and see what happens?
The last code that you suggesed gives me an error. Are there any tags missing?
<!-- 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:scriptmethod="GET"><api:setattr="method"value="POST"/><api:setattr="data"><?xml version="1.0" encoding="utf-8"?><soap:Envelopexmlns:soap="http://www.w3.org/2003/05/soap-envelope"xmlns:pub="http://publicprocurement.com"><soap:Header/><soap:Body><pub:ListPublishedFiles"><pub:SystemUserID>123456</pub:SystemUserID><pub:ProjectID>666666</pub:ProjectID></pub:ListPublishedFiles></soap:Body></soap:Envelope></api:set><api:callop="xmlproviderGet"><api:push/></api:call></api:script></api:script>
However when i use the following code without the lines below, i get an empty table
<?xml version="1.0" encoding="utf-8"?><soap:Envelopexmlns:soap="http://www.w3.org/2003/05/soap-envelope"xmlns:pub="http://publicprocurement.com"><soap:Header/><soap:Body><pub:ListPublishedFiles/><pub:SystemUserID>123456</pub:SystemUserID><pub:ProjectID>666666</pub:ProjectID></pub:ListPublishedFiles></soap:Body></soap:Envelope></api:set><!-- 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:scriptmethod="GET"><api:setattr="method"value="GET"/><api:callop="xmlproviderGet"><api:push/></api:call></api:script></api:script>
Yes, it is not doing a post call anymore. Did you turn on logging, that will explain why it was seen as a bad request as it shows the code being executed.
<api:scriptxmlns: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:infotitle="contract"desc="Generated schema file."xmlns:other="http://apiscript.com/ns?v1"><attrname="_id"xs:type="string"readonly="false"key="true"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/_id" /><attrname="description"xs:type="string"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/description" /><attrname="filename"xs:type="string"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/filename" /><attrname="fileurl"xs:type="string"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/fileurl" /><attrname="name"xs:type="string"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/name" /><attrname="size"xs:type="integer"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/size" /><attrname="updated"xs:type="datetime"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/updated" /><attrname="updatedutc"xs:type="datetime"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/updatedutc" /></api:info><api:setattr="DataModel"value="RELATIONAL" /><api:setattr="URI"value="https://your.soap.endpoint.com/getData.asmx?wsdl" /><api:setattr="PushAttributes"value="true" /><api:setattr="EnablePaging"value="true" /><api:setattr="Header:Name#"value="SOAPAction"/><api:setattr="Header:Value#"value="http://public.com/endPoint"/><api:setattr="XPath"value="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file" /><!-- 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:scriptmethod="GET"><api:setattr="method"value="POST"/><api:setattr="ContentType"value="text/xml"/><api:setattr="AcceptCharset"value="utf-8" /><api:setattr="data"><?xml version="1.0" encoding="utf-8"?><soap:Envelopexmlns:soap="http://www.w3.org/2003/05/soap-envelope"xmlns:pub="http://public.com"><soap:Header/><soap:Body><pub:ListPublishedFiles><pub:SystemUserID>123456</pub:SystemUserID><pub:ProjectID>666666</pub:ProjectID></pub:ListPublishedFiles></soap:Body></soap:Envelope></api:set><api:callop="xmlproviderGet"><api:push/></api:call></api:script></api:script>
Your Postman example uses Content-Type raw, your call from the CData provider uses both application/x-www-form-urlencoded and text/xml. Something to look into I guess.
I have manged to get the project details but struggling with:
origin
tid
referencenumber
Here is what i am trying
<api:infotitle="contracts/contract"desc="Generated schema file."xmlns:other="http://apiscript.com/ns?v1"><attrname="name"xs:type="string"readonly="false"key="true"other:xPath="/Envelope/Body/ListShortContractsPublishedForExportXMLBusinessIntelligenceResponse/ListShortContractsPublishedForExportXMLBusinessIntelligenceResult/idbdata/contracts/contract/details/name" /><attrname="tendsigncontractid"xs:type="string"readonly="false"other:xPath="/Envelope/Body/ListShortContractsPublishedForExportXMLBusinessIntelligenceResponse/ListShortContractsPublishedForExportXMLBusinessIntelligenceResult/idbdata/contracts/contract/referencename[0]" /></api:info><api:setattr="DataModel"value="RELATIONAL" /><api:setattr="URI"value="https://my.soap.provider.com/endpoint.asmx?WSDL" /><api:setattr="PushAttributes"value="true" /><api:setattr="EnablePaging"value="true" /><api:setattr="Header:Name#"value="SOAPAction"/><api:setattr="Header:Value#"value="http://publicprocurement.com/ListShortContractsPublishedForExportXMLBusinessIntelligence"/><api:setattr="XPath"value="/Envelope/Body/ListShortContractsPublishedForExportXMLBusinessIntelligenceResponse/ListShortContractsPublishedForExportXMLBusinessIntelligenceResult/idbdata/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:scriptmethod="GET"><api:setattr="method"value="POST"/><api:setattr="ContentType"value="text/xml"/><api:setattr="AcceptCharset"value="utf-8" /><api:setattr="data"><?xml version="1.0" encoding="utf-8"?><soap:Envelopexmlns:soap="http://www.w3.org/2003/05/soap-envelope"xmlns:pub="http://publicprocurement.com"><soap:Header/><soap:Body><pub:ListShortContractsPublishedForExportXMLBusinessIntelligence><pub:SystemUserID>123456</pub:SystemUserID><pub:LanguageID>1</pub:LanguageID><pub:LastChangedDate>1900-01-01</pub:LastChangedDate></pub:ListShortContractsPublishedForExportXMLBusinessIntelligence></soap:Body></soap:Envelope></api:set><api:callop="xmlproviderGet"><api:push/></api:call></api:script></api:script>
He had that exact same content type header in his first example though.
It most likely did not work due to the dash between Content-Type, but would have if it didn’t have it. I do prefer the way used in the last method as it only takes up one row in the file.
You may need multiple XPaths and the DataModel set to FLATTENDOCUMENT
Here is a RSD file based on a currency file.
<api:scriptxmlns: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:infotitle="Cube"desc="Generated schema file."xmlns:other="http://apiscript.com/ns?v1"><!-- You can modify the name, type, and column size here. --><attrname="time"xs:type="string"readonly="false"other:xPath="/Envelope/Cube/Cube@time" /><attrname="currency"xs:type="string"readonly="false"other:xPath="/Envelope/Cube/Cube/Cube@currency" /><attrname="rate"xs:type="double"readonly="false"other:xPath="/Envelope/Cube/Cube/Cube@rate" /></api:info><api:setattr="DataModel"value="FLATTENDOCUMENT" /><api:setattr="PushAttributes"value="true" /><api:setattr="URI"value="https://www.ecb.europa.eu/stats/eurofxref/eurofxref-hist-90d.xml" /><api:setattr="XPath"value="/Envelope/Cube/Cube;/Envelope/Cube/Cube/Cube" /><!-- 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:scriptmethod="GET"><api:setattr="method"value="GET"/><api:callop="xmlproviderGet"><api:push/></api:call></api:script></api:script>
I use multiple XPaths to get both date and the values.
I do not use @ signs in the XPath, but there is in the connection to the value in the <info> area.
<api:scriptxmlns: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:infotitle="2"desc="Generated schema file."xmlns:other="http://apiscript.com/ns?v1"><!-- You can modify the name, type, and column size here. --><attrname="name"xs:type="string"readonly="false"other:xPath="/attachments/file/name" /><attrname="filename"xs:type="string"readonly="false"other:xPath="/attachments/file/filename" /><attrname="fileurl"xs:type="string"readonly="false"other:xPath="/attachments/file/fileurl" /></api:info><api:setattr="DataModel"value="DOCUMENT" /><api:setattr="PushAttributes"value="true" /><api:setattr="EnablePaging"value="true" /><api:setattr="Header:Name#"value="SOAPAction"/><api:setattr="URI"value="https://your.soap.endpoint.com/getData.asmx" /><api:setattr="XPath"value="/attachments" /><api:setattr="method"value="POST"/><api:setattr="Header:Name"value="Content-Type" /><api:setattr="Header:Value"value="text/xml" /><api:setattr="data"><?xml version="1.0" encoding="utf-8"?><soapenv:Envelopexmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:xsd="http://www.w3.org/2001/XMLSchema"xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"xmlns:uen="uen:esws"><soapenv:Header/><soapenv:Body><uen:Esws.ListPublihedFilessoapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><pub:SystemUserID>123456</pub:SystemUserID><pub:ProjectID>121212</pub:ProjectID></uen:Esws.ListPublihedFiles></soapenv:Body></soapenv:Envelope></api:set><api:setattr="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:scriptmethod="GET"><api:setattr="method"value="GET"/><api:callop="xmlproviderGet"><api:push/></api:call></api:script></api:script>
When i try to view table, i get his error
This is how Connection and, JSON and XML setting looks like
Page 1 / 1
I have managed to narrow down where the error is comming from.
Now, i dont get the error above. TX now shows an empty table
This is what i use in POSTMAN to get a response
I have refined the code in RSD-file to this
<api:scriptxmlns: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:infotitle="contract"desc="Generated schema file."xmlns:other="http://apiscript.com/ns?v1"><attrname="_id"xs:type="string"readonly="false"key="true"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/_id" /><attrname="description"xs:type="string"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/description" /><attrname="filename"xs:type="string"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/filename" /><attrname="fileurl"xs:type="string"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/fileurl" /><attrname="name"xs:type="string"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/name" /><attrname="size"xs:type="integer"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/size" /><attrname="updated"xs:type="datetime"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/updated" /><attrname="updatedutc"xs:type="datetime"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/updatedutc" /></api:info><api:setattr="DataModel"value="RELATIONAL" /><api:setattr="PushAttributes"value="true" /><api:setattr="EnablePaging"value="true" /><api:setattr="Header:Name#"value="SOAPAction"/><api:setattr="URI"value="https://your.soap.endpoint.com?wsdl" /><api:setattr="XPath"value="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file" /><api:setattr="method"value="POST"/><api:setattr="Header:Name"value="Content-Type" /><api:setattr="Header:Value"value="text/xml" /><api:setattr="data"><?xml version="1.0" encoding="utf-8"?><soap:Envelopexmlns:soap="http://www.w3.org/2003/05/soap-envelope"xmlns:pub="http://publicprocurement.com"><soap:Header/><soap:Body><pub:ListPublishedFilessoapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/>
<pub:SystemUserID>123456</pub:SystemUserID>
<pub:ProjectID>66666666</pub:ProjectID>
</pub:ListPublishedFiles>
</soap:Body>
</soap:Envelope>
</api:set>
<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:scriptmethod="GET"><api:setattr="method"value="GET"/><api:callop="xmlproviderGet"><api:push/></api:call></api:script></api:script>
I dont get any error in TX but when i preview the table its empty.
In WSDL, ListPublishedFiles that i am trying to reterive is this:
<api:scriptxmlns: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:infotitle="contract"desc="Generated schema file."xmlns:other="http://apiscript.com/ns?v1"><attrname="_id"xs:type="string"readonly="false"key="true"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/_id" /><attrname="description"xs:type="string"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/description" /><attrname="filename"xs:type="string"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/filename" /><attrname="fileurl"xs:type="string"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/fileurl" /><attrname="name"xs:type="string"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/name" /><attrname="size"xs:type="integer"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/size" /><attrname="updated"xs:type="datetime"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/updated" /><attrname="updatedutc"xs:type="datetime"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/updatedutc" /></api:info><api:setattr="DataModel"value="RELATIONAL" /><api:setattr="PushAttributes"value="true" /><api:setattr="EnablePaging"value="true" /><api:setattr="Header:Name#"value="SOAPAction"/><api:setattr="URI"value="https://your.soap.endpoint.com?wsdl" /><api:setattr="XPath"value="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file" /><api:setattr="Header:Name"value="Content-Type" /><api:setattr="Header:Value"value="text/xml" /><!-- 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:scriptmethod="GET"><api:setattr="method"value="POST"/><api:setattr="data"><?xml version="1.0" encoding="utf-8"?><soap:Envelopexmlns:soap="http://www.w3.org/2003/05/soap-envelope"xmlns:pub="http://publicprocurement.com"><soap:Header/><soap:Body><pub:ListPublishedFilessoapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/>
<pub:SystemUserID>123456</pub:SystemUserID>
<pub:ProjectID>66666666</pub:ProjectID>
</pub:ListPublishedFiles>
</soap:Body>
</soap:Envelope>
</api:set>
<api:call op="xmlproviderGet"><api:push/></api:call></api:script></api:script>
<api:scriptxmlns: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:infotitle="contract"desc="Generated schema file."xmlns:other="http://apiscript.com/ns?v1"><attrname="_id"xs:type="string"readonly="false"key="true"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/_id" /><attrname="description"xs:type="string"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/description" /><attrname="filename"xs:type="string"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/filename" /><attrname="fileurl"xs:type="string"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/fileurl" /><attrname="name"xs:type="string"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/name" /><attrname="size"xs:type="integer"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/size" /><attrname="updated"xs:type="datetime"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/updated" /><attrname="updatedutc"xs:type="datetime"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/updatedutc" /></api:info><api:setattr="DataModel"value="RELATIONAL" /><api:setattr="PushAttributes"value="true" /><api:setattr="EnablePaging"value="true" /><api:setattr="Header:Name#"value="SOAPAction"/><api:setattr="URI"value="https://your.soap.endpoint.com?wsdl" /><api:setattr="XPath"value="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file" /><api:setattr="Header:Name"value="Content-Type" /><api:setattr="Header:Value"value="text/xml" /><!-- 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:scriptmethod="GET"><api:setattr="method"value="POST"/><api:setattr="data"><?xml version="1.0" encoding="utf-8"?><soap:Envelopexmlns:soap="http://www.w3.org/2003/05/soap-envelope"xmlns:pub="http://publicprocurement.com"><soap:Header/><soap:Body><pub:ListPublishedFilessoapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding"/><pub:SystemUserID>123456</pub:SystemUserID><pub:ProjectID>66666666</pub:ProjectID></pub:ListPublishedFiles></soap:Body></soap:Envelope></api:set><api:callop="xmlproviderGet"><api:push/></api:call></api:script></api:script>
I think I found the issue. Also, turn on logging when you get errors, it will tell you more about what is going on
@Thomas Lind Still the same error. I have sendt you the error log as DM
In my SOAP endpoint, ListPublishedFiles is like this.
The stuff you run in postman should be the closest, but you need to encode it as xml for it to run.
I do notice a difference between what you use in Postman and what you have in the RSD file.
<pub:ListPublishedFiles> in the Postman setup is <pub:ListPublishedFiles soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding"/> in the RSD.
Can you make these queries exactly the same in both and see what happens?
The last code that you suggesed gives me an error. Are there any tags missing?
<!-- 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:scriptmethod="GET"><api:setattr="method"value="POST"/><api:setattr="data"><?xml version="1.0" encoding="utf-8"?><soap:Envelopexmlns:soap="http://www.w3.org/2003/05/soap-envelope"xmlns:pub="http://publicprocurement.com"><soap:Header/><soap:Body><pub:ListPublishedFiles"><pub:SystemUserID>123456</pub:SystemUserID><pub:ProjectID>666666</pub:ProjectID></pub:ListPublishedFiles></soap:Body></soap:Envelope></api:set><api:callop="xmlproviderGet"><api:push/></api:call></api:script></api:script>
However when i use the following code without the lines below, i get an empty table
<?xml version="1.0" encoding="utf-8"?><soap:Envelopexmlns:soap="http://www.w3.org/2003/05/soap-envelope"xmlns:pub="http://publicprocurement.com"><soap:Header/><soap:Body><pub:ListPublishedFiles/><pub:SystemUserID>123456</pub:SystemUserID><pub:ProjectID>666666</pub:ProjectID></pub:ListPublishedFiles></soap:Body></soap:Envelope></api:set><!-- 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:scriptmethod="GET"><api:setattr="method"value="GET"/><api:callop="xmlproviderGet"><api:push/></api:call></api:script></api:script>
Yes, it is not doing a post call anymore. Did you turn on logging, that will explain why it was seen as a bad request as it shows the code being executed.
2024-12-12T12:53:29.052+01:001 [4|Q-Id] [INFO|Connec] Opened REST connection. Version: 23.0.8685.0. Edition: [ADO.NET Provider .NET 4.0].
2024-12-12T12:53:29.052+01:001 [4|Q-Id] [INFO|Connec] Connection String: accesskey=*****;apikey=*****;authkey=*****;authscheme=None;authtoken=*****;autocache=False;awsaccesskey=*****;awscredentialsfile='';awscredentialsfileprofile=default;awsexternalid='';awsprincipalarn='';awsregion=NORTHERNVIRGINIA;awsrolearn='';awssecretkey=*****;awssessiontoken=*****;azureaccesskey=*****;azureenvironment=GLOBAL;azuresharedaccesssignature=*****;azurestorageaccount='';azuretenant='';backwardscompatibilitymode=False;batchsize=0;browsableschemas='';cacheconnection='';cachelocation="%APPDATA%\CData\REST Data Provider";cachemetadata=False;cacheprovider='';cachetolerance=600;callbackurl='';catalog=CData;charset=UTF-8;clientculture='';connectionlifetime=0;connectiontype=Auto;credentialslocation="%APPDATA%\CData\REST Data Provider\CredentialsFile.txt";culture='';customheaders='';customurlparams='';datamodel=Relational;datasource='';directoryretrievaldepth=-1;excludefiles='';firewallpassword=*****;firewallport=0;firewallserver='';firewalltype=NONE;firewalluser='';flattenarrays='';flattenobjects=False;fmt=CsvDelimited;folderid='';format=XML;generateschemafiles=Never;includecolumnheaders=True;includedropboxteamresources=False;includefiles='';includeitemsfromalldrives=False;initiateoauth=OFF;jsonformat=JSON;kerberoskdc='';kerberoskeytabfile='';kerberosrealm='';kerberosservicekdc='';kerberosservicerealm='';kerberosspn='';kerberosticketcache='';location="X:\Datavarehus TX\API strukturer\Mercell\CData";logfile="X:\Datavarehus TX\API strukturer\Mercell\Logs\log.txt";logmodules='';maxlogfilecount=-1;maxlogfilesize=100MB;maxrows=-1;metadatadiscoveryuri='';mfaserialnumber='';mfatoken=*****;oauthaccesstoken=*****;oauthaccesstokensecret=*****;oauthaccesstokenurl='';oauthauthorizationurl='';oauthclientid='';oauthclientsecret=*****;oauthexpiresin='';oauthgranttype=CODE;oauthincludecallbackurl=True;oauthjwtaudience='';oauthjwtcert=*****;oauthjwtcertpassword=*****;oauthjwtcertsubject=*;oauthjwtcerttype=USER;oauthjwtencryption=RS256;oauthjwtheaders='';oauthjwtissuer='';oauthjwtsubject='';oauthjwtvaliditytime=3600;oauthparams='';oauthpasswordgrantmode=Post;oauthrefreshtoken=*****;oauthrefreshtokenurl='';oauthrequesttokenurl='';oauthsettingslocation="%APPDATA%\CData\REST Data Provider\OAuthSettings.txt";oauthtokentimestamp='';oauthverifier=*****;oauthversion=2.0;offline=False;oraclenamespace='';other='';pagesize=1000;pkceverifier=*****;poolidletimeout=60;poolmaxsize=100;poolminsize=1;poolwaittime=60;projectid='';proxyauthscheme=BASIC;proxyautodetect=True;proxyexceptions='';proxypassword=*****;proxyport=80;proxyserver='';proxyssltype=AUTO;proxyuser='';pseudocolumns='';qualifycolumns=none;readonly=False;region='';rowscandepth=100;schema=REST;scope='';secretkey=*****;serversideencryption=OFF;sharepointedition=SharePointOnline;simpleuploadlimit='';sshauthmode=Password;sshclientcert=*****;sshclientcertpassword=*****;sshclientcertsubject=*;sshclientcerttype=PEMKEY_FILE;sshpassword=*****;sshuser='';sslclientcert=*****;sslclientcertpassword=*****;sslclientcertsubject=*;sslclientcerttype=USER;sslmode=AUTOMATIC;sslservercert=*****;ssoexchangeurl='';ssologinurl='';ssoproperties='';storagebaseurl='';tables='';temporarytokenduration=3600;timeout=60;typedetectionscheme=RowScan;uri='';uriseparator=,;useconnectionpooling=False;uselakeformation=False;userdefinedviews='';usevirtualhosting=True;verbosity=3;views='';xmlformat=XML;xpath=''2024-12-12T12:53:29.052+01:002 [4|Q-Id] [EXEC|Parsed] Executing query: [select top 100 [_id], [name], [filename], [fileurl], [description], [updated], [updatedutc], [size] from [REST].[ListPublishedFiles]]
2024-12-12T12:53:29.057+01:003 [4|Q-Id] [EXEC|Normlz] Executing query: [SELECT [ListPublishedFiles].[_id], [ListPublishedFiles].[name], [ListPublishedFiles].[filename], [ListPublishedFiles].[fileurl], [ListPublishedFiles].[description], [ListPublishedFiles].[updated], [ListPublishedFiles].[updatedutc], [ListPublishedFiles].[size] FROM [REST].[ListPublishedFiles] AS [ListPublishedFiles] LIMIT 100]
2024-12-12T12:53:29.057+01:003 [4|Q-Id] [META|MemSto] Retrieved cached tables for'..', results count: 2.
2024-12-12T12:53:29.057+01:002 [4|Q-Id] [META|Schema] Retrieved table schema from MetaCache: Table: [<NULL>] TableType: [TABLE] Success: 2 results
2024-12-12T12:53:29.057+01:003 [4|Q-Id] [META|MemSto] Retrieved cached tables for'..', results count: 2.
2024-12-12T12:53:29.057+01:002 [4|Q-Id] [META|Schema] Retrieved table schema from MetaCache: Table: [<NULL>] TableType: [VIEW] Success: 2 results
2024-12-12T12:53:29.057+01:003 [4|Q-Id] [META|MemSto] Retrieved cached tables for'CData.REST.ListPublishedFiles', results count: 0.
2024-12-12T12:53:29.057+01:002 [4|Q-Id] [META|Schema] Retrieved table schema from MetaCache: Table: [ListPublishedFiles] TableType: [TABLE] Success: 0 results
2024-12-12T12:53:29.057+01:003 [4|Q-Id] [META|MemSto] Retrieved cached tables for'CData.REST.ListPublishedFiles', results count: 1.
2024-12-12T12:53:29.057+01:002 [4|Q-Id] [META|Schema] Retrieved table schema from MetaCache: Table: [ListPublishedFiles] TableType: [VIEW] Success: 1 results
2024-12-12T12:53:29.057+01:003 [4|Q-Id] [META|MemSto] Retrieved cached columns for'.REST.ListPublishedFiles', result count: 8.
2024-12-12T12:53:29.057+01:002 [4|Q-Id] [META|Schema] Retrieved column schema from MetaCache: [ListPublishedFiles] Success: 8 results
2024-12-12T12:53:29.212+01:002 [4|Q-Id] [HTTP|Req: 1] POST https://services.tendsign.com/customerservices.asmx?WSDL
2024-12-12T12:53:29.212+01:003 [4|Q-Id] [HTTP|Req: 1] [New]
[HTTP Headers]
HTTP Auth Scheme: 3
User:
Password:
POST /customerservices.asmx?WSDL HTTP/1.1
Host: your.soap.endpoint.com
Accept-Encoding: gzip, deflate
User-Agent: CData Data Provider Engine - www.cdata.com - gzip
Content-Type: application/x-www-form-urlencoded
Content-Length: 717
Content-Type: text/xml
2024-12-12T12:53:29.222+01:003 [4|Q-Id] [HTTP|Req: 1] %3c%3fxml%20version%3d%221.0%22%20encoding%3d%22utf-8%22%3f%3e%0d%0a%09%09%09%0d%0a%09%09%09%3csoap%3aEnvelope%20xmlns%3asoap%3d%22http%3a%2f%2fwww.w3.org%2f2003%2f05%2fsoap-envelope%22%20xmlns%3apub%3d%22http%3a%2f%2fpublicprocurement.com%22%3e%0d%0a%09%09%09%3csoap%3aHeader%2f%3e%0d%0a%09%09%09%3csoap%3aBody%3e%0d%0a%09%09%09%3cpub%3aListPublishedFiles%20soapenv%3aencodingStyle%3d%22http%3a%2f%2fschemas.xmlsoap.org%2fsoap%2fencoding%22%2f%3e%0d%0a%09%09%09%3cpub%3aSystemUserID%3e123456%3c%2fpub%3aSystemUserID%3e%0d%0a%09%09%09%09%09%3cpub%3aProjectID%3e666666%3c%2fpub%3aProjectID%3e%0d%0a%09%09%09%3c%2fpub%3aListPublishedFiles%3e%0d%0a%09%09%09%3c%2fsoap%3aBody%3e%0d%0a%09%09%09%3c%2fsoap%3aEnvelope%3e2024-12-12T12:53:29.301+01:003 [4|Q-Id] [HTTP|Res: 1]
[HTTP Headers]
HTTP/1.1400 Bad Request
Content-Type: text/html; charset=us-ascii
Server: Microsoft-HTTPAPI/2.0
Date: Thu, 12 Dec 202411:53:28 GMT
Connection: close
Content-Length: 3392024-12-12T12:53:29.303+01:003 Current buffer data:
2024-12-12T12:53:29.304+01:0033C 21444F 43545950452048544D 4C 205055424C 494320222D 2F 2F 5733432F 2F 4454442048544D 4C 20342E 30312F 2F 454E
2222687474703A 2F 2F 7777772E 77332E
6F 72672F 54522F 68746D 6C 342F 7374726963742E 647464223E 0D 0A 3C 48544D 4C
3E 3C 484541443E 3C 5449544C 453E 42616420526571756573743C 2F 5449544C 453E 0D 0A 3C 4D 45544120485454502D 45515549563D 22436F 6E 74656E 742D 547970652220436F 6E 74656E 743D 22746578742F 68746D 6C 3B 20636861727365743D 75732D 6173636969223E 3C 2F 484541443E
0D 0A 3C 424F 44593E 3C 68323E 4261642052657175657374202D 20496E 76616C 6964204865616465723C 2F 68323E 0D 0A 3C
68723E 3C 703E 48545450204572726F 72203430302E 2054686520726571756573742068617320616E 20696E 76616C 696420686561646572206E 616D 652E 3C 2F 703E 0D 0A 3C 2F 424F 44593E 3C 2F 48544D 4C
3E 0D 0A
2024-12-12T12:53:29.311+01:003 [4|Q-Id] [HTTP|Res: 1] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD><TITLE>Bad Request</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
<BODY><h2>Bad Request - Invalid Header</h2>
<hr><p>HTTP Error 400. The request has an invalid header name.</p>
</BODY></HTML>
2024-12-12T12:53:29.311+01:00 2 [4|Q-Id] [HTTP|Res: 1] HTTP/1.1 400 Bad Request, 339 Bytes Transferred
2024-12-12T12:53:29.311+01:00 2 [4|Q-Id] [HTTP|Res: 1] Error: HTTP protocol error. 400 Bad Request. Stack: at dwo230y.w.DF(String )
at dwo230y.BM.Qi(String )
2024-12-12T12:53:29.312+01:00 2 [4|Q-Id] [EXEC|Messag] Executed query: [SELECT [ListPublishedFiles].[_id], [ListPublishedFiles].[name], [ListPublishedFiles].[filename], [ListPublishedFiles].[fileurl], [ListPublishedFiles].[description], [ListPublishedFiles].[updated], [ListPublishedFiles].[updatedutc], [ListPublishedFiles].[size] FROM [REST].[ListPublishedFiles] AS [ListPublishedFiles] LIMIT 100] Success: 0 results (255 ms)
2024-12-12T12:53:29.312+01:00 1 [4|Q-Id] [SQL |Messag] Query Failed: [select top 100 [_id], [name], [filename], [fileurl], [description], [updated], [updatedutc], [size] from [REST].[ListPublishedFiles]]. Error: 400 -- HTTP protocol error. 400 Bad Request.
2024-12-12T12:53:29.312+01:00 2 [ |Q-Id] 400 -- HTTP protocol error. 400 Bad Request.
RSSBus.RSBException
at dwo230y.BM.QH(Exception )
at dwo230y.BM.Qi(String )
at dwo230y.BM.QQ(String )
at dwo230y.QlB.J(String , String )
at dwo230y.QgB.A(QAS , QFA , QFV )
at dwo230y.QFe.P(QFV )
at dwo230y.Qog.CQ(QFV )
at dwo230y.Qle.tb(Object , Object[] )
at dwo230y.QlF.CQ(QFV )
at dwo230y.Qdh.s(RSBContext , String )
at dwo230y.QRB.Exec(RSBContext )
at dwo230y.tgx.T(RSBOperation , tlS )
at dwo230y.tgx.e(RSBOperation , tgo )
at dwo230y.tgo.T(toM , tFQ , BJd , tFQ , tFQ , String )
at dwo230y.tgo.L(RSBOperation , tFQ , BJd , tFQ , tFQ )
at dwo230y.tlS.k(String , RSBOperation , RSBItem , RSBCallback )
at dwo230y.tlS.Call(RSBOperation , RSBItem , RSBCallback )
at dwo230y.QhI.V(RSBContext , tey`1 , QhV , RSBItem , RSBCallback , Boolean )
at dwo230y.Qhp.J(RSBContext )
at dwo230y.Qhp.Exec(RSBContext )
at dwo230y.tgx.T(RSBOperation , tlS )
at dwo230y.tgx.e(RSBOperation , tgo )
at dwo230y.toy.k(toy , tgo )
at dwo230y.toy.Rw(tgo )
at dwo230y.tkh.x(tgo )
at dwo230y.tkh.F(tkh , tgo )
at dwo230y.tkh.Rw(tgo )
at dwo230y.tkh.x(tgo )
at dwo230y.tkh.F(tkh , tgo )
at dwo230y.tkh.Rw(tgo )
at dwo230y.tkh.Rw(tgo )
at dwo230y.tFN.RC(tgo )
at dwo230y.tkI.Kv(tgo , Boolean )
at dwo230y.tgo.T(toM , tFQ , BJd , tFQ , tFQ , String )
at dwo230y.tgo.P(String , tFQ , BJd , tFQ , tFQ )
at dwo230y.tlS.Call(String )
at dwo230y.dM.n(RSBContext , dA )
at dwo230y.BVl.Km()
at dwo230y.BVM.Km()
at dwo230y.BJN.r(ep , BBt )
at dwo230y.BJx.bo()
at dwo230y.BJN.KR()
at dwo230y.dR.I(SQLQuery , Int32 , BBo )
at dwo230y.dR.b(IDataStatement , SQLQuery , QueryParameterCollection , Int32 , String , teZ )
at dwo230y.BVN.ExecuteQuery(IDataStatement , QueryParameterCollection , Int32 )
at dwo230y.xJ.ExecuteQuery(IDataStatement , QueryParameterCollection , Int32 )
at dwo230y.tpS.T(SqlTable , ttu , Int32 )
at dwo230y.tpS.h(ttu , SqlTable , ColumnInfo[] , ttQ , Int32 )
at dwo230y.tpp`1.U(Boolean , ttQ )
at dwo230y.tpp`1.pG(ttu , Int32 , ColumnInfo[] )
at dwo230y.tVM.A(twd`1 )
at dwo230y.tVM.mZ(twd`1 , tCV )
at dwo230y.tVC`2.d(twd`1 , tVw )
at dwo230y.tVC`2.mv(tJp`1 , tVw )
at dwo230y.tJC`1.iZ[g](tCk`2 )
at dwo230y.twg.T(tCV )
at dwo230y.twg.A(tJA , Int32 , tSN )
at dwo230y.tJV.P(tJA , Int32 , tSN , String )
at dwo230y.tJV.ExecuteQuery(IDataStatement , QueryParameterCollection , Int32 )
at dwo230y.BIS.ExecuteQuery(IDataStatement , QueryParameterCollection , Int32 )
at dwo230y.Rh.ExecuteQuery(IDataStatement , QueryParameterCollection , Int32 )
at dwo230y.BwB.bv()
at dwo230y.BwI.mb()
at dwo230y.uQ.fb(QueryParameterCollection )
Finally managed to get a response.
Here is the code
<api:scriptxmlns: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:infotitle="contract"desc="Generated schema file."xmlns:other="http://apiscript.com/ns?v1"><attrname="_id"xs:type="string"readonly="false"key="true"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/_id" /><attrname="description"xs:type="string"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/description" /><attrname="filename"xs:type="string"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/filename" /><attrname="fileurl"xs:type="string"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/fileurl" /><attrname="name"xs:type="string"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/name" /><attrname="size"xs:type="integer"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/size" /><attrname="updated"xs:type="datetime"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/updated" /><attrname="updatedutc"xs:type="datetime"readonly="false"other:xPath="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file/updatedutc" /></api:info><api:setattr="DataModel"value="RELATIONAL" /><api:setattr="URI"value="https://your.soap.endpoint.com/getData.asmx?wsdl" /><api:setattr="PushAttributes"value="true" /><api:setattr="EnablePaging"value="true" /><api:setattr="Header:Name#"value="SOAPAction"/><api:setattr="Header:Value#"value="http://public.com/endPoint"/><api:setattr="XPath"value="/Envelope/Body/ListPublishedFilesResponse/ListPublishedFilesResult/idbdata/contract/attachments/file" /><!-- 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:scriptmethod="GET"><api:setattr="method"value="POST"/><api:setattr="ContentType"value="text/xml"/><api:setattr="AcceptCharset"value="utf-8" /><api:setattr="data"><?xml version="1.0" encoding="utf-8"?><soap:Envelopexmlns:soap="http://www.w3.org/2003/05/soap-envelope"xmlns:pub="http://public.com"><soap:Header/><soap:Body><pub:ListPublishedFiles><pub:SystemUserID>123456</pub:SystemUserID><pub:ProjectID>666666</pub:ProjectID></pub:ListPublishedFiles></soap:Body></soap:Envelope></api:set><api:callop="xmlproviderGet"><api:push/></api:call></api:script></api:script>
Your Postman example uses Content-Type raw, your call from the CData provider uses both application/x-www-form-urlencoded and text/xml. Something to look into I guess.
I have manged to get the project details but struggling with:
origin
tid
referencenumber
Here is what i am trying
<api:infotitle="contracts/contract"desc="Generated schema file."xmlns:other="http://apiscript.com/ns?v1"><attrname="name"xs:type="string"readonly="false"key="true"other:xPath="/Envelope/Body/ListShortContractsPublishedForExportXMLBusinessIntelligenceResponse/ListShortContractsPublishedForExportXMLBusinessIntelligenceResult/idbdata/contracts/contract/details/name" /><attrname="tendsigncontractid"xs:type="string"readonly="false"other:xPath="/Envelope/Body/ListShortContractsPublishedForExportXMLBusinessIntelligenceResponse/ListShortContractsPublishedForExportXMLBusinessIntelligenceResult/idbdata/contracts/contract/referencename[0]" /></api:info><api:setattr="DataModel"value="RELATIONAL" /><api:setattr="URI"value="https://my.soap.provider.com/endpoint.asmx?WSDL" /><api:setattr="PushAttributes"value="true" /><api:setattr="EnablePaging"value="true" /><api:setattr="Header:Name#"value="SOAPAction"/><api:setattr="Header:Value#"value="http://publicprocurement.com/ListShortContractsPublishedForExportXMLBusinessIntelligence"/><api:setattr="XPath"value="/Envelope/Body/ListShortContractsPublishedForExportXMLBusinessIntelligenceResponse/ListShortContractsPublishedForExportXMLBusinessIntelligenceResult/idbdata/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:scriptmethod="GET"><api:setattr="method"value="POST"/><api:setattr="ContentType"value="text/xml"/><api:setattr="AcceptCharset"value="utf-8" /><api:setattr="data"><?xml version="1.0" encoding="utf-8"?><soap:Envelopexmlns:soap="http://www.w3.org/2003/05/soap-envelope"xmlns:pub="http://publicprocurement.com"><soap:Header/><soap:Body><pub:ListShortContractsPublishedForExportXMLBusinessIntelligence><pub:SystemUserID>123456</pub:SystemUserID><pub:LanguageID>1</pub:LanguageID><pub:LastChangedDate>1900-01-01</pub:LastChangedDate></pub:ListShortContractsPublishedForExportXMLBusinessIntelligence></soap:Body></soap:Envelope></api:set><api:callop="xmlproviderGet"><api:push/></api:call></api:script></api:script>
He had that exact same content type header in his first example though.
It most likely did not work due to the dash between Content-Type, but would have if it didn’t have it. I do prefer the way used in the last method as it only takes up one row in the file.
You may need multiple XPaths and the DataModel set to FLATTENDOCUMENT
Here is a RSD file based on a currency file.
<api:scriptxmlns: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:infotitle="Cube"desc="Generated schema file."xmlns:other="http://apiscript.com/ns?v1"><!-- You can modify the name, type, and column size here. --><attrname="time"xs:type="string"readonly="false"other:xPath="/Envelope/Cube/Cube@time" /><attrname="currency"xs:type="string"readonly="false"other:xPath="/Envelope/Cube/Cube/Cube@currency" /><attrname="rate"xs:type="double"readonly="false"other:xPath="/Envelope/Cube/Cube/Cube@rate" /></api:info><api:setattr="DataModel"value="FLATTENDOCUMENT" /><api:setattr="PushAttributes"value="true" /><api:setattr="URI"value="https://www.ecb.europa.eu/stats/eurofxref/eurofxref-hist-90d.xml" /><api:setattr="XPath"value="/Envelope/Cube/Cube;/Envelope/Cube/Cube/Cube" /><!-- 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:scriptmethod="GET"><api:setattr="method"value="GET"/><api:callop="xmlproviderGet"><api:push/></api:call></api:script></api:script>
I use multiple XPaths to get both date and the values.
I do not use @ signs in the XPath, but there is in the connection to the value in the <info> area.
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.