Need rope for SOAP
Need rope for SOAP
- Subject: Need rope for SOAP
- From: Junior Tan <email@hidden>
- Date: Sun, 13 Jan 2002 10:42:54 +0800
Hi all. Been having a bummer with SOAP calls:-
Sample 1 (does NOT work in ASStudio, OK in Script Editor)
--------
Set sms to "yadayadaya"
set this_result to call soap {method name:method_name, method namespace
uri:method_namespace_URI, parameters:{FromAddress:"Sol",
ToAddress:"email@hidden", MsgBody:sms as string},
SOAPAction:SOAP_action}
Sample 1a (works OK in BOTH ASStudio and Script Editor, but useless)
---------
set this_result to call soap {method name:method_name, method namespace
uri:method_namespace_URI, parameters:{FromAddress:"Sol",
ToAddress:"email@hidden", MsgBody:"yadayadayada"},
SOAPAction:SOAP_action}
Somehow, having a variable within a parameter record caused Apple Event
Manager to include extra data* in the XML request, that the SOAP server
choked upon.
XML Request:
<?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-ENC="
http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="
http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<m:SendMail.xmlns:m="urn:EmailIPortTypeInft-IEmailService">
<fromaddress.xsi:type="xsd:string">Sol</fromaddress>
<toaddress.xsi:type="xsd:string">email@hidden</toaddress>
-- begin extra data*
<!--.###.SOAP:.<msgbody>.Don't.know.how.to.serialize.STXT.-->
<!--.###.SOAP:.STXT.to.TEXT.coercion.-->
-- end extra data
<msgbody.xsi:type="xsd:string">wqdqwddqwdqw</msgbody>
</m:SendMail>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
The roadblock, I think, to either variable handling within AppleScript
Studio, specific to SOAP calls and/or an issue with styled text/unicode.
Have tried various coercions. And also tried Jeff Baumann's method but still
no cigar.
Help!
junior