still having trouble with SOAP
still having trouble with SOAP
- Subject: still having trouble with SOAP
- From: Matt Neuburg <email@hidden>
- Date: Fri, 02 Sep 2005 11:52:13 -0700
[Resent because no one responded and I have not seen it show up in the list
digest. Those who insist that SOAP works, please help me out here!]
I'm still having trouble with AppleScript's implementation of SOAP. I'm
trying to call the service described here:
http://www.xmlme.com/WSShakespeare.asmx?op=GetSpeech
Here is my AppleScript code, which is not working:
tell application "http://www.xmlme.com/WSShakespeare.asmx"
call soap {method name:"GetSpeech",
SOAPAction:"http://xmlme.com/WebServices/GetSpeech",
parameters:{|Request|:"poor and content is rich"}, method namespace
uri:"http://xmlme.com/WebServices"}
end tell
What I need to form, according to the authorities, is a request that looks
like this:
POST /WSShakespeare.asmx HTTP/1.1
Host: www.xmlme.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://xmlme.com/WebServices/GetSpeech"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetSpeech xmlns="http://xmlme.com/WebServices">
<Request>string</Request>
</GetSpeech>
</soap:Body>
</soap:Envelope>
What I'm actually sending (snooped with Interarchy) looks more like this:
POST /WSShakespeare.asmx HTTP/1.1
User-Agent: Mac OS X; WebServicesCore.framework (1.1.0)
Host: www.xmlme.com
Content-Type: text/xml
Soapaction: "http://xmlme.com/WebServices/GetSpeech"
Content-Length: 608
Connection: close
<?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:GetSpeech xmlns:m="http://xmlme.com/WebServices">
<Request xsi:type="xsd:string">poor and content is rich</Request>
</m:GetSpeech>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Not very much alike, are they? Yet it seems to me I'm getting correct every
parameter I'm allowed to supply. Another thing I notice that might be a
problem is that my header is called Soapaction, whereas the proper
capitalization is called SOAPAction; I don't know whether http headers are
case-sensitive, I'm just looking for every possible source of error.
I can't help feeling that the schema for SOAP has changed dramatically and
that AppleScript's implementation is failing to keep up. But perhaps someone
can show me how to call this service successfully using AppleScript? Thx -
m.
--
matt neuburg, phd = email@hidden, http://www.tidbits.com/matt/
pantes anthropoi tou eidenai oregontai phusei
AppleScript: the Definitive Guide -
http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt
Take Control of Word 2004, Tiger, and more -
http://www.takecontrolbooks.com/tiger-customizing.html
Subscribe to TidBITS! It's free and smart. http://www.tidbits.com/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden