problem with & symbol with web service call

Do you want to create a native client or integrate with third party applications: webservices are the solution.
Forum rules
Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
Post Reply
fonnerk
Junior Boarder
Junior Boarder
Posts: 32
Joined: Tue Nov 06, 2012 3:24 pm

problem with & symbol with web service call

Post by fonnerk » Sat Apr 16, 2016 11:02 pm

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)

fonnerk
Junior Boarder
Junior Boarder
Posts: 32
Joined: Tue Nov 06, 2012 3:24 pm

Re: problem with & symbol with web service call

Post by fonnerk » Sat Apr 16, 2016 11:03 pm

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

jllort
Moderator
Moderator
Posts: 9119
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: problem with & symbol with web service call

Post by jllort » Tue Apr 19, 2016 8:25 pm

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/

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest