Greetings; brand-new to SOAP, brand-new to the suds library, I hope I use the correct terms to describe my problem.<br><div><br></div><div>Executive summary: I need to send elements with leading underscores in their names but they are modified/dropped by suds.</div>
<div><br></div><div>1: Why does the code modify element names with leading underscores?  e.g. &#39;__limit&#39; becomes &#39;_limit&#39; (or is it &#39;@_limit&#39;)</div><div>2: is there a workaround?</div><div><br></div>
<div><br></div><div><br></div><div>I have a service which, in general, is working fine with suds as a client.  The vendor&#39;s docs tell me that the message style </div><div>is &quot;Document/Literal&quot;.   So far I&#39;m doing fine just calling the service ]= RPC-style:</div>
<div><br></div><div>&gt;&gt;&gt; client = Client(url, transport)</div><div>&gt;&gt;&gt;</div><div>&gt;&gt;&gt; rslt = client.service.getKeys(name=&#39;foo&#39;)</div><div>&gt;&gt;&gt;</div><div><br></div><div>However, for some of my queries, I need to set/send parameters with names that have leading underscores.  But, I have found </div>
<div>that the appenders deliberately modify these names and do something other than expected (by myself, at least) with the </div><div>values.  Thus, they are just dropped.</div><div><br></div><div><br></div><div>This example </div>
<div>below is my experiment in injecting raw SOAP with __inject, and it worked fine:</div><div><br></div><div><div>msg2 = &quot;&quot;&quot;\</div><div>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</div>
<div>&lt;SOAP-ENV:Envelope xmlns:ns0=&quot;<a href="http://www.service-now.com/sys_journal_field">http://www.service-now.com/sys_journal_field</a>&quot; </div><div>  xmlns:ns1=&quot;<a href="http://schemas.xmlsoap.org/soap/envelope/">http://schemas.xmlsoap.org/soap/envelope/</a>&quot; </div>
<div>  xmlns:xsi=&quot;<a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>&quot; </div><div>  xmlns:SOAP-ENV=&quot;<a href="http://schemas.xmlsoap.org/soap/envelope/">http://schemas.xmlsoap.org/soap/envelope/</a>&quot;&gt; &lt;SOAP-ENV:Header/&gt;</div>
<div>   &lt;ns1:Body&gt;</div><div>      &lt;ns0:getKeys&gt;</div><div>         &lt;ns0:name&gt;NOYB&lt;/ns0:name&gt;</div><div>         &lt;ns0:__limit&gt;1&lt;/ns0:__limit&gt;</div><div>      &lt;/ns0:getKeys&gt;</div><div>
   &lt;/ns1:Body&gt;</div><div>&lt;/SOAP-ENV:Envelope&gt;</div><div>&quot;&quot;&quot;</div></div><div><br></div><div>But if I send &quot;client.service.getKeys(name=&#39;foo&#39;, __limit=1)&quot;, it hits this code:</div>
<div><br></div><div>  <a href="https://fedorahosted.org/suds/browser/trunk/suds/mx/appender.py#L191">https://fedorahosted.org/suds/browser/trunk/suds/mx/appender.py#L191</a></div><div><br></div><div>Even more interesting (and what makes me think that it&#39;s a logical bug) is that this is preventing me from using a </div>
<div>message created from the WSDL:</div><div><br></div><div><div>&gt;&gt;&gt; getKeysMessage = uut.factory.create(&#39;tns:getKeys&#39;)</div><div>&gt;&gt;&gt; print getKeysMessage</div><div>(getKeys){</div><div>   element = None</div>
<div>   element_id = None</div><div>   name = None</div><div>   sys_created_by = None</div><div>   sys_created_on = None</div><div>   value = None</div><div>   __use_view = None</div><div>   __encoded_query = None</div><div>
   __limit = None</div><div>   __first_row = None</div><div>   __last_row = None</div><div> }</div></div><div><br></div><div><div>  File &quot;/usr/lib/python2.6/site-packages/suds/mx/core.py&quot;, line 88, in append</div>
<div>    self.appender.append(parent, content)</div><div>  File &quot;/usr/lib/python2.6/site-packages/suds/mx/appender.py&quot;, line 118, in append</div><div>    appender.append(parent, content)</div><div>  File &quot;/usr/lib/python2.6/site-packages/suds/mx/appender.py&quot;, line 275, in append</div>
<div>    Appender.append(self, child, cont)</div><div>  File &quot;/usr/lib/python2.6/site-packages/suds/mx/appender.py&quot;, line 200, in append</div><div>    self.marshaller.append(parent, content)</div><div>  File &quot;/usr/lib/python2.6/site-packages/suds/mx/core.py&quot;, line 87, in append</div>
<div>    if self.start(content):</div><div>  File &quot;/usr/lib/python2.6/site-packages/suds/mx/literal.py&quot;, line 102, in start</div><div>    raise TypeNotFound(content.tag)</div><div>TypeNotFound: Type not found: &#39;__use_view&#39;</div>
<div><br></div><div><br></div><div><br></div></div><div>If I delattr all of the elements with leading underscores, then calling the method with that object works just fine.</div><div><br></div><div>Can anyone explain what&#39;s going on?  Why is startswith(&#39;_&#39;) looked for in the code?  What&#39;s the workaround?</div>
<div><br></div><div>Thanks!</div><div><br></div><div><br></div>