Making a SOAP request via Applescript, w/ a param named "name"

NOTE
I’m using applescript to send SOAP requests around here and parse the results, but with one specific webservice call I need to make, the parameter “name” is tripping me up:


tell application "http://web/service/url"
    set resultText to call soap {method name:"soapMethod", method namespace uri:"http://web/service/uri", parameters:{buildId:5 as integer, name:"this is a test" as string, ldapId:"user" as string}}
end tell

For some reason, the “name” parameter is changed to “pnam”, and the order of the parameter is broken…
Here is the output from a packet sniffer:

<?xml version="1.0" encoding="UTF-8"?> <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/"> <SOAP-ENV:Body> <m:soapMethod xmlns:m="http://web/service/uri"> <pnam xsi:type="xsd:string">this is a test</pnam> <buildid xsi:type="xsd:int">5</buildid> <ldapid xsi:type="xsd:string">user</ldapid> </m:createTestSession> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
As you can tell, “name” is being munged to pnam, for no reason I can figure out. I was hoping the experts here could shed some light :slight_smile: BTW, I tried quoting the SOAP call parameter names, like this:
parameters:{“buildId”:5 as integer, “name”:“this is a test” as string, “ldapId”:“user” as string}

Applescript didn’t like that, neither did it like single quotes.