/dev/random

Reality has a liberal bias

/dev/random random header image

AppleScript and dirty SOAP

April 25th, 2007 · 1 Comment · Programming

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.

Tags:

1 response so far ↓

  • 1 /dev/random :: Clean SOAP // Apr 30, 2007 at 9:36 pm

    [...] gave up on using AppleScript Studio for my Installer front-end application. AppleScript’s SOAP implementation seems to be broken. I ended up writing it in Objective C [...]