Re: still having trouble with SOAP
Re: still having trouble with SOAP
- Subject: Re: still having trouble with SOAP
- From: Simon Topliss <email@hidden>
- Date: Sat, 3 Sep 2005 17:26:12 +0100
On 2 Sep 2005, at 19:52, Matt Neuburg wrote:
[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, not sure if you saw my reply to your other SOAP thread, but the
service your trying to get is a MS.NET web service. The server *must*
be configured correctly for it to work with AppleScript's
implementation of SOAP.
The default setting for MS.NET is document-literal. You need to use
the SoapRpcMethod attribute (from the System.Web.Services.Protocols
namespace) before your webmethod like this: <WebMethod(),SoapRpcMethod
()> your webmethod here.
Simon
_______________________________________________
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