Page 1 of 1

problem with & symbol with web service call

PostPosted:Sat Apr 16, 2016 11:02 pm
by fonnerk
The & symbol is not being correctly encoded on xml messages being returned for some web service calls... For example...

If I issue the call to the getChildren for the folder service....
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:ns0="http://ws.openkm.com" xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Header/>
   <ns1:Body>
      <ns0:getChildren>
         <token>some token</token>
         <fldPath>/okm:root/Kevin/MindMap/test/test2</fldPath>
      </ns0:getChildren>
   </ns1:Body>
</SOAP-ENV:Envelope>
The return is
Code: Select all
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <ns2:getChildrenResponse xmlns:ns2="http://ws.openkm.com">
         <return>
            <author>kevin</author>
            <created>2016-04-16T18:50:38.873-04:00</created>
            <path>/okm:root/Kevin/MindMap/test/test2/test &amp; test</path>
            <permissions>15</permissions>
            <subscribed>false</subscribed>
            <uuid>8dca9bcc-fd4f-425b-b3bf-cb111b144567</uuid>
            <hasChildren>false</hasChildren>
         </return>
      </ns2:getChildrenResponse>
   </soap:Body>
</soap:Envelope>
The actual folder name is actually "test & test". The return is adding the extra characters amp;. (test &amp; test)

Re: problem with & symbol with web service call

PostPosted:Sat Apr 16, 2016 11:03 pm
by fonnerk
I meant to add that I am using the most recent community version of openkm on suse linux with a postgresql database back end.

Kevin

Re: problem with & symbol with web service call

PostPosted:Tue Apr 19, 2016 8:25 pm
by jllort
Why are not using rest api ? and also you can use one of our SDK which helps you on our API integration. Take a look here https://docs.openkm.com/kcenter/