title: How can I make AppleScript SOAP work with existing SOAP webservices (e.g. W3Schools' CelsiusToFarenheit example)?
body: <p>I'm currently using AppleScript Editor.
  I run the following code there:</p>
  
  <pre><code>tell application "http://www.w3schools.com/webservices/tempconvert.asmx?WSDL"
      call soap {method name:"CelsiusToFahrenheit", method namespace uri:"http://www.w3schools.com/webservices/", parameters:{Celsius:50 as string}, SOAPAction:"http://www.w3schools.com/webservices/CelsiusToFahrenheit"}
  end tell
  </code></pre>
  
  <p>If I execute the above code, I get an "Error" string back (which is not what I expected).
  The generated request is as follows:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
    &lt;SOAP-ENV:Envelope
      xmlns:xsd="http://www.w3.org/1999/XMLSchema"
      xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
      SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"&gt;
        &lt;SOAP-ENV:Body&gt;
          &lt;m:CelsiusToFahrenheit xmlns:m="http://www.w3schools.com/webservices/"&gt;
            &lt;Celsius xsi:type="xsd:int"&gt;50&lt;/Celsius&gt;
          &lt;/m:CelsiusToFahrenheit&gt;
        &lt;/SOAP-ENV:Body&gt;
      &lt;/SOAP-ENV:Envelope&gt;
  </code></pre>
  
  <p>If I edit the request like this (I used Fiddler to edit the request):  </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
        &lt;SOAP-ENV:Envelope
          xmlns:xsd="http://www.w3.org/1999/XMLSchema"
          xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
          SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
          xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
          xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"&gt;
            &lt;SOAP-ENV:Body&gt;
              &lt;CelsiusToFahrenheit xmlns="http://www.w3schools.com/webservices/"&gt;
                &lt;Celsius xsi:type="xsd:int"&gt;50&lt;/Celsius&gt;
              &lt;/CelsiusToFahrenheit&gt;
            &lt;/SOAP-ENV:Body&gt;
          &lt;/SOAP-ENV:Envelope&gt;
  </code></pre>
  
  <ol>
  <li>Change "m:CelsiusToFarenheit" to "CelsiusToFarenheit"</li>
  <li>Change "xmlns:m" to "xmlns"</li>
  </ol>
  
  <p>I receive "122" which is the correct response.</p>
  
  <p>My questions are:  </p>
  
  <ol>
  <li>Why is this happening? Is the SOAP format used by the "call soap" function an old format?</li>
  <li>Is there a way to fix this (e.g. remove ":m" or "m:" in the request or use different SOAP format through code by setting a parameter in the "call soap" method [i don't know if this is possible])?</li>
  </ol>