<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><category>pcsoft.us.windev</category><copyright>Copyright 2026, PC SOFT</copyright><lastBuildDate>22 Aug 2016 22:26:00 Z</lastBuildDate><pubDate>18 Aug 2016 14:34:00 Z</pubDate><description>Hi,&#13;
&#13;
I'm working on a SharePoint interface using the SP web services.&#13;
This works pretty OK but I'm having a problem where the WX runtime tries to be too smart and breaks the XML being send.&#13;
&#13;
It's likely that I am missing something and that there is an XML standard to force data in an XML node NOT to be altered in any way by a parsing engine. I can't know it all of course...&#13;
&#13;
Anyway, here's the story:&#13;
1. The ISSUE:&#13;
The WX runtime tries to be too intelligent and parses an XML body passed in a webservice parameter of string type into text without reserved xml characters.&#13;
&#13;
E.g. "&lt; Query &gt; becomes &amp; ltQuery&amp; gt…&#13;
&#13;
2. The QUESTION:&#13;
Is there a W-Language method/option or an XML attribute where we can force that the WX webservice execution engine does not parse xml text into text without reserved xml characters for a web service parameter of string type?&#13;
[(&lt;,&gt;,&amp;,…) becomes (&amp; lt,&amp; gt,&amp; amp,…) etc.]&#13;
&#13;
As we need to pass an XML into a SharePoint parameter which is defined as a string parameter.&#13;
&#13;
3. EXAMPLE: Sharepoint GetListItems Webservice&#13;
SOAP 1.2&#13;
The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values.&#13;
POST /_vti_bin/lists.asmx HTTP/1.1 Host: test.hamon.com Content-Type: application/soap+xml; charset=utf-8 Content-Length: length &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt; soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope" &gt; &lt; soap12:Body &gt; &lt; GetListItems xmlns="http://schemas.microsoft.com/sharepoint/soap/" &gt; &lt; listName &gt; string&lt; /listName &gt; &lt; viewName &gt; string&lt; /viewName &gt; &lt; query &gt; string&lt; /query &gt; &lt; viewFields &gt; string&lt; /viewFields &gt; &lt; rowLimit &gt; string&lt; /rowLimit &gt; &lt; queryOptions &gt; string&lt; /queryOptions &gt; &lt; webID &gt; string&lt; /webID &gt; &lt; /GetListItems &gt; &lt; /soap12:Body &gt; &lt; /soap12:Envelope &gt;&#13;
Imported in WX as a web service...&#13;
As you can see the Query parameter is defined as a string by the Sharepoint wsdl contract above but in practice it needs to be completed with an XML itself that contains the query in xml format.&#13;
&#13;
4. Execution in WX (Simplified)&#13;
This is how it looks in WX (simplified test block):&#13;
... //WS INIT Stuff //Set Web service address and authentication Lists..Address = pWSAddress Lists..Authentication = auNegotiate Lists..User = pWSUserName Lists..Password = pWSUserPassword Lists..MethodHTTP = httpPost Lists..IgnoreError = httpIgnoreExpiredCertificate+httpIgnoreInvalidCertificate+httpIgnoreInvalidCertificateName+httpIgnoreRedirection ... //DECLARE … SPLst is Lists.GetListItems SPWSResponse is Lists.GetListItemsResponse //SET PARAMS SPLst.listName = "AP" SPLst.query = [ &lt; Query &gt; &lt; Where &gt; &lt; Eq &gt; &lt; FieldRef Name='ProjectID' / &gt; &lt; Value Type='Text' &gt; a&lt; /Value &gt; &lt; /Eq &gt; &lt; /Where &gt; &lt; /Query &gt; ] SPWSResponse = Lists.GetListItems(SPLst) //Return Result IF ErrorOccurred() THEN ErrMsg:AddToList(pErrLst,soErrorMessage::EM_ERROR,"WEBSERVICE","Error encountered. Contact your supplier if the problem persists.",ErrorInfo(errMessage)) WXApplication::LogError(pErrLst) RESULT (False, WSResponse) ELSE RESULT (True, WSResponse) END&#13;
5. Response in WX returned by the Sharepoint server&#13;
The following error was returned by the service by hErrorInfo():&#13;
Code: 'Server'&#13;
Message: Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown.&#13;
&#13;
6. Sharepoint server logs&#13;
If we look on the server, we can trace the execution of the SOAP request which is broken at the point where the WX runtime replaced &lt; by &amp;lt:&#13;
&lt; ?xml version="1.0" encoding="UTF-8"?&gt; &lt; SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt; &lt; SOAP-ENV:Header/&gt; &lt; SOAP-ENV:Body&gt; &lt; ns1:GetListItems xmlns:ns1="http://schemas.microsoft.com/sharepoint/soap/" &gt; &lt; ns1:listName&gt; AP&lt; /ns1:listName &gt; &lt; ns1:query &gt; &amp;lt&#13;
SOAP exception: System.Runtime.InteropServices.COMException (0x82000000): Element &lt; Query &gt; of parameter query is missing or invalid.…&#13;
&#13;
7. And what if we use SOAPPrepare to get the XML to send manually?&#13;
SOAPPrepare() works fine as well but does the exact same trick...&#13;
This is the XML string returned by SOAPPrepare for the above WX code.&#13;
&#13;
As you can see the &lt; Query &gt; element is parsed as well by the WX Runtime Engine as non xml text...&#13;
&#13;
&lt; ?xml version="1.0" encoding="UTF-8"? &gt; &lt; SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" &gt; &lt; SOAP-ENV:Header/ &gt; &lt; SOAP-ENV:Body &gt; &lt; ns1:GetListItems xmlns:ns1="http://schemas.microsoft.com/sharepoint/soap/" &gt; &lt; ns1:listName &gt; AP&lt; /ns1:listName &gt; &lt; ns1:query &gt; &amp; lt;Query&amp; gt;&amp; #13; &amp; lt;Where&amp; gt;&amp; #13; &amp; lt;Eq&amp; gt;&amp; #13; &amp; lt;FieldRef Name='ProjectID' /&amp; gt;&amp; #13; &amp; lt;Value Type='Text'&amp; gt;a&amp; lt;/Value&amp; gt;&amp; #13; &amp; lt;/Eq&amp; gt;&amp; #13; &amp; lt;/Where&amp; gt;&amp; #13; &amp; lt;/Query&amp; gt; &lt; /ns1:query &gt; &lt; /ns1:GetListItems &gt; &lt; /SOAP-ENV:Body &gt; &lt; /SOAP-ENV:Envelope &gt;&#13;
8. CONCLUSION&#13;
The WX runtime has altered the &lt; Query &gt; &lt; Where &gt;… string into non xml text &amp; lt;Query&amp; gt;&amp; &amp; lt;Where&amp; gt;&#13;
This is an unwanted behaviour.&#13;
&#13;
Therefore we would like to know if it is possible in W-Language or by a W3 XML standard to force the WX runtime not to alter an xml body if it passed intentionally into web service parameter of string type.&#13;
&#13;
TIA all for any feedback that leads to a solution !&#13;
&#13;
Cheers,&#13;
&#13;
Peter Holemans ?&#13;
&#13;
PS: Never mind the extra spaces etc. in the XML files as I had to alter this in order for it to display reasonably within this forum software</description><ttl>30</ttl><generator>WEBDEV</generator><language>en_US</language><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/59148-consume-web-service-string-parameter/read.awp</link><title>WX: Consume Web Service - String parameter</title><managingEditor>moderateur@pcsoft.fr (El moderador)</managingEditor><webMaster>webmaster@pcsoft.fr (El webmaster)</webMaster><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/59148-consume-web-service-string-parameter-59175/read.awp</comments><pubDate>22 Aug 2016 22:26:00 Z</pubDate><description>Hi Bart,&#13;
&#13;
Thanks for the suggestion but I already tried that and the CDATA tag doesn't make any difference during the executio…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/59148-consume-web-service-string-parameter-59175/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/59148-consume-web-service-string-parameter-59175/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/59148-consume-web-service-string-parameter/read.awp">WX: Consume Web Service - String parameter</source><title>Re: WX: Consume Web Service - String parameter</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/59148-consume-web-service-string-parameter-59174/read.awp</comments><pubDate>22 Aug 2016 20:41:00 Z</pubDate><description>Hi,&#13;
&#13;
Maybe you can insert a CDATA tag in where you can put your data that not should be interpreted as XML markup&#13;
&#13;
Regards,&#13;…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/59148-consume-web-service-string-parameter-59174/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/59148-consume-web-service-string-parameter-59174/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/59148-consume-web-service-string-parameter/read.awp">WX: Consume Web Service - String parameter</source><title>Re: WX: Consume Web Service - String parameter</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/59148-consume-web-service-string-parameter-59172/read.awp</comments><pubDate>22 Aug 2016 17:35:00 Z</pubDate><description>Hi Peter,&#13;
&#13;
I hope you will find a nice solution.&#13;
&#13;
As for the delays, this is 24 to 48 hours of working hours. This means 3 t…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/59148-consume-web-service-string-parameter-59172/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/59148-consume-web-service-string-parameter-59172/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/59148-consume-web-service-string-parameter/read.awp">WX: Consume Web Service - String parameter</source><title>Re: WX: Consume Web Service - String parameter</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/59148-consume-web-service-string-parameter-59169/read.awp</comments><pubDate>22 Aug 2016 14:34:00 Z</pubDate><description>Hi again Peter,&#13;
&#13;
Yep, in the help they say that the SOAP* commands can be used to “inject” some additional data in a soap quer…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/59148-consume-web-service-string-parameter-59169/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/59148-consume-web-service-string-parameter-59169/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/59148-consume-web-service-string-parameter/read.awp">WX: Consume Web Service - String parameter</source><title>Re: WX: Consume Web Service - String parameter</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/59148-consume-web-service-string-parameter-59166/read.awp</comments><pubDate>22 Aug 2016 14:28:00 Z</pubDate><description>Hi Peter,&#13;
&#13;
So, if I understand, the Lists.GetListItems structure does not include the xml elements definition for the &lt; query …</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/59148-consume-web-service-string-parameter-59166/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/59148-consume-web-service-string-parameter-59166/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/59148-consume-web-service-string-parameter/read.awp">WX: Consume Web Service - String parameter</source><title>Re: WX: Consume Web Service - String parameter</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/59148-consume-web-service-string-parameter-59165/read.awp</comments><pubDate>22 Aug 2016 10:11:00 Z</pubDate><description>Nobody?</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/59148-consume-web-service-string-parameter-59165/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/59148-consume-web-service-string-parameter-59165/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/59148-consume-web-service-string-parameter/read.awp">WX: Consume Web Service - String parameter</source><title>Re: WX: Consume Web Service - String parameter</title></item></channel></rss>
