• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Soap and Applescript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Soap and Applescript


  • Subject: Re: Soap and Applescript
  • From: Luc Naets <email@hidden>
  • Date: Tue, 18 Jan 2011 08:22:12 +0100
  • Acceptlanguage: nl-NL, nl-BE
  • Thread-topic: Soap and Applescript

Hi Bernardo,

On 17-jan-2011, at 21:00, <email@hidden> wrote:

> On 16 Jan 2011, at 21:46, Bernardo Hoehl wrote:
>
>> No matter what service I try to talk to it returns me always:
>> error "soap got an error: Transport error" number -916
>> Does anyone on this list use soap with applescript?
>> I am wondering if Apple gave up soap support for Applescript...
>
> No, the RPC services in the examples don't exist any more. You'll have to try something else.

Maybe the RPC won't work but the soap call does work but only in a SOAP 1.1 type call. We use it all the day to talk to a selfwritten WebService that talks to the API of Adam Software.

It's mainly the problem of the Soap 1.1 implementation on the Windows WebService site that has given us most of the problems, but once this is solved you're ready to go.

A little example of a call, in our ScriptLibary we have wrapped everything up in handlers.
set pAdamWebService to "http://"; & mServerIPAddress & "/xxxxWS/Service.asmx"

----

set mMethodName to "getVersion"
set mParameters to {}

with timeout of gDefaultTimeout seconds -->> TIMEOUT CONNECTION
using terms from application "http://www.apple.com";
try
   tell application pWebService
      set mSoapAction to (pWebServiceUrl & "/" & mMethodName)
      return (call soap {method name:mMethodName, method namespace uri:pWebServiceUrl, parameters:mParameters, SOAPAction:mSoapAction})
   end tell
on error errMsg number err
   if errMsg is "Transport Error" then set errMsg to errMsg & "!" & sr & "Probably the WebService is not active." & sr & "(" & pWebService & ")"
   error errMsg number err -- Raise new error
end try

end using terms from
end timeout
-----

Please be carefull with the capitalization of parameters because they are case-sensitive. Some parameter names are assigned to AppleScript variables so they can't be used in a default manner. How to keep capitalization of a record key in AppleScript just add vertical lines before and after the name.

{name:"Albert", |Name|:"Albert}

Hope this will help and put you on the right track :-) Good luck

--
Luc Naets
PX
Antwerpsestraat 108-116
2640 Mortsel
Belgium

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Prev by Date: Re: Look-Up-Table (was Re: Convert Text to Variable Name)
  • Next by Date: Re: varibles in handler
  • Previous by thread: Re: Soap and Applescript
  • Next by thread: more scoping aggravation
  • Index(es):
    • Date
    • Thread