How to specify SOAP 2001 Schema in AppleScript?

I am making a SOAP call to a .net web service which requires the 2001 schema to be used.

I see in the Apple SOAP/XMLRPC Guide on page 16 that you can specify the SOAP Schema Version kSOAP2001Schema (or “ss01”) in making an Apple Event call from an application.

But I do not see how to specify this in AppleScript.

Having searched hi and low, is there an example of this anywhere? What am I missing?

Thanks Much In Advance,
Evan C.

From the Guide:

The SOAP specification defines a schema for encoding (or serializing) information. The Apple Event
Manager can work with both the 1999 (or SOAP specification version 1.1) and 2001 (SOAP specification
version 1.2) schemas. Listing 1-4 (page 16) shows the constants for specifying the SOAP schema used
to format the SOAP request in a remote procedure call Apple event.

You can specify a serialization schema by adding a parameter of type typeType and key
keySOAPSchemaVersion to the direct object of a SOAP request Apple event. If you do not specify a
schema, the default is kSOAP1999Schema.

Listing 1-4 Constants for specifying a SOAP schema.
enum {
kSOAP1999Schema = ‘ss99’,
kSOAP2001Schema = ‘ss01’,
//…
keySOAPSchemaVersion = ‘ssch’
};

I don’t know if this answers your question (and I wrote it a long time ago) but here is an example of a piece of applescript I wrote to get the cost of buying or selling a US$ in Canada.

set c1 to "united states"
set c2 to "canada"
set agio to " ± $0.02"
-- get the rate
--set countryList to {"canada"}
set mn to "getRate"
set mnsurl to "urn:xmethods-CurrencyExchange"
set exch_rates to {}
try
	with timeout of 60 seconds
		--repeat with c2 in countryList
		tell application "http://services.xmethods.net:9090/soap/servlet"
			set theResult to ¬
				call soap {method name:mn, parameters:{country1:c1, country2:c2}, method namespace uri:mnsurl}
		end tell
		set end of exch_rates to {(contents of c2), (theResult as number)}
		--end repeat
	end timeout
on error
	display dialog "SOAP Server not responding"
	return
end try

set theRate to (item 2 of item 1 of exch_rates)
set msg1 to "$" & theRate & agio

Thanks Adam but my problem is not making a web service call, but making one and specifying the 2001 xml schema.

But thanks anyway!

  • Evan

Here’s an example I presume you saw. The problem is to find out what the method and parameters requrired are. Haven’t found that.