Chilkat Online Tools

delphiDll / PrestaShop Webservice Product Resource A-Z / 2 - Create supplier

Back to Collection Items

System.OutOfMemoryException: Insufficient memory to continue the execution of the program.
   at System.Runtime.InteropServices.Marshal.StringToHGlobalUni(String s)
   at Chilkat.CkMarshal.StringToX(String s, XString* x)
   at Chilkat.Xml.LoadXml(String xmlData)
   at ChilkatApi.XClass.LoadClass(String className, Log log)
   at ChilkatApi.ApiCache.getApiClass(String className, Log log)
   at ChilkatApi.ApiCache.getApiProperty(String className, String propName, Log log)
   at ChilkatCode.CodeGen.getXProp(String className, String propName)
   at ChilkatCode.CodeGen.getPropType(String varName, String propName)
   at ChilkatCode.CodeGen.emitAssignment(String varName, String propName, String op, Xml xml)
   at ChilkatCode.Parser.assignment()
   at ChilkatCode.Parser.statement()
   at ChilkatCode.Parser.Chilkat()
   at ChilkatCode.Parser.Parse()
   at ChilkatCode.Compile.CompileForToolsIO(String srcCode, String langHashKey, StringBuilder sbHtmlOut)

Curl Command

curl -X POST
	-u '{{webservice_key}}:password'
	-d '<?xml version="1.0" encoding="UTF-8"?>
<prestashop xmlns:xlink="http://www.w3.org/1999/xlink">
    <supplier>
        <name>ACMESupplier</name>
    </supplier>
</prestashop>'
https://localhost:8080/api/suppliers

Postman Collection Item JSON

{
  "name": "2 - Create supplier",
  "request": {
    "method": "POST",
    "header": [
    ],
    "body": {
      "mode": "raw",
      "raw": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<prestashop xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n    <supplier>\n        <name>ACMESupplier</name>\n    </supplier>\n</prestashop>",
      "options": {
        "raw": {
          "language": "xml"
        }
      }
    },
    "url": {
      "raw": "{{webservice_url}}/api/suppliers",
      "host": [
        "{{webservice_url}}"
      ],
      "path": [
        "api",
        "suppliers"
      ]
    }
  },
  "response": [
  ]
}