AppleScript and dirty SOAP

I’m writing an AppleScript Studio application which needs to call some SOAP web services before running an installer. Somehow AppleScript seems to be adding a bogus namespace to the SOAP call.

The method I want to call should look something like this (actual names changed):

<RegisterUser>
<UserData>xyzzy</UserData>
</RegisterUser>

Instead, the request looks like this:

<m:RegisterUser xmlns:m="http://myserver/mynamespace">
<UserData>xyzzy</UserData>
</m:RegisterUser>

The AppleScript code looks pretty standard:

	tell application "http://myserver/endpoint" to¬
		call soap {method name:"RegisterUser", ¬
			parameters:{|UserData|:"xyzzy"},¬
			SOAPAction:"http://myserver/namespace/RegisterUser", ¬
			method namespace:"http://myserver/namespace"}

I have no idea where the bogus ‘m’ prefix came from. This same method is being called successfully from .NET under Windows.

1 thought on “AppleScript and dirty SOAP”

Leave a Comment