Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>We had the same problem with an ASP.NET-based server (error message when using python/suds, same query worked in SoapUi); after a lot of digging, we found that we need to add a SOAP header (as XML element) which contains the action; having the action in the Content-Type or SOAPAction headers was not enough (but does not hurt either). Here's an example of a successful query (from SoapUi):</p> <pre><code>&lt;SOAP-ENV:Envelope xmlns:ns0="..." xmlns:ns1="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope"&gt; &lt;SOAP-ENV:Header xmlns:wsa="http://www.w3.org/2005/08/addressing"&gt;&lt;wsa:Action&gt;http://www.foo.com/.../SomeJob/getParameters&lt;/wsa:Action&gt;&lt;/SOAP-ENV:Header&gt; &lt;ns1:Body&gt; &lt;ns0:getParameters&gt;...&lt;/ns0:getParameters&gt; &lt;/ns1:Body&gt; &lt;/SOAP-ENV:Envelope&gt; </code></pre> <p>With Python and SUDS, this is how we did it:</p> <pre><code>from suds.sax.element import Element wsans = ('wsa', "http://www.w3.org/2005/08/addressing") client.set_options(soapheaders = Element('Action', ns=wsans).setText(action)) </code></pre> <p>The action can be queried from the method, i.e. if you want to call a method client.service.foo, use</p> <pre><code>action = client.service.foo.method.soap.action </code></pre> <p>We found this by looking at the SoapUi HTTP log. (We also tried Wireshark, but that would not work because we're trying to use an https server which we don't own.)</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload