Page 1 of 1

Upload Documents Using Create Simple API

PostPosted:Wed Apr 03, 2019 10:01 am
by ansarmnnit
I am using SOAP UI tool for accesing SOAP API of Openkm. I have created a new SOAP project in which i have imported OkmDocumentSoapBinding Wsdl from that Wsdl am trying to run create simple method.

payload of that method:-
Code: Select all
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.openkm.com">
   <soapenv:Header/>
   <soapenv:Body>
      <ws:createSimple>
         <!--Optional:-->
         <token>b8d8751e-fb0c-4b69-a52b-2ccfda30b56f</token>
         <!--Optional:-->
         <docPath>/okm:root/xyz</docPath>
         <!--Optional:-->
         <content>cid:1337316684662</content>
      </ws:createSimple>
   </soapenv:Body>
</soapenv:Envelope>
Now my questions:-

1st question:-What is the auto generated value "cid:1337316684662" in <content> tag of the request payload ?
2nd question:- How do I pass the contents of the file in the request, I tried sending the contents of the file in binary format within the <content> tag but the uploaded file in OpenKM has a different content that what was passed in the request ?

Re: Upload Documents Using Create Simple API

PostPosted:Fri Apr 05, 2019 8:01 am
by jllort
Consider SOAP UI as a technology totally deprecated. I recommend using REST and if your language is JAVA, .NET or PHP we have sdk wrappers what will make your life easy.
General information
https://docs.openkm.com/kcenter/view/ok ... agger.html
https://docs.openkm.com/kcenter/view/ok ... stful.html

SDK's
https://docs.openkm.com/kcenter/view/sdk4j-1.2/
https://docs.openkm.com/kcenter/view/sdk4net-1.2.1/
https://docs.openkm.com/kcenter/view/sdk4php-1.2.0/