• 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.
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.
 #41610  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)

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.