Lasso XML-RPC & AppleScript

Has anybody had any success getting AppleScript to talk to a Lasso XML-RPC tag?
Is it a problem with Applescript or Lasso?

Lasso is made by Blue World and is a bit like PHP.

Applescript:
tell application “http://dev.azudio.co.uk/RPC.LassoApp
set returnValue to call xmlrpc {method name:“Test.Echo”, parameters:{“Hello World!”}}
end tell

tell application “Finder”
display dialog returnValue
end tell

I just get {“”} returned from Lasso in the AS Event Log

It looks like Applescript, when I use PHP I get the correct responses back.

Any ideas?

I don’t have access to Lasso and I’ve never used it but I still have a question. What are you expecting to be returned from the RPC call? On another note, just in case you aren’t aware, ‘display dialog’ doesn’t require the Finder, although there are times when it might be beneficial/desirable to use it that way. :slight_smile:

Rob,
All this call should do is echo the text back, its just a test method.

I’ve worked out that the response I get back is a list with 1 element, which is a string & thats about all I can gather, how can I see the XML being sent back?.

It seems to be working right with a PHP XML-RPC call & Java, but AS is having probs.

Here is a modifed version which you should be able to try yourself.

tell application “http://dev.azudio.co.uk/RPC.LassoApp
set returnValue to call xmlrpc {method name:“Test.Echo”, parameters:{“Hello World!”}}
end tell

display dialog  item 1 of returnValue

Any clues?

Nope, I get an empty string back. To see an example of a result from a RPC via AppleScript, try this:

tell application "http://osaxen.com/xmlrpc.php" to return call xmlrpc {method name:"osaxen.getPackage", parameters:"xml_tools"}

Do you get a record with 10 items in it?

Yeah, that seems to be working right, 10 items.
So is there any way that you can see the resulting raw XML being genereated by AS and the resulting XML from Lasso?

Can’t seem to understand why PHP & Java are getting a result back but AS is getting diddly?

I don’t have a lot of experience with XML scripts so hopefully someone else will offer advice. Sorry.

Thanks anyway Rob, I’ll keep plugging away.

ITMT here is the XML serialised output when I use a PHP library.

From php to my Lasso XML-RPC method:
POST /Lasso/RPC.LassoApp HTTP/1.0
Host: 127.0.0.1
Connection: close
Content-Type: text/xml
Content-Length: 188

<?xml version="1.0" ?> Test.Echo What

Lasso Responds with:
HTTP/1.0 200 OK
Server: Lasso/6.0
MIME-Version: 1.0
Content-Type: text/xml

<?xml version='1.0'?>

Using AS I don’t know if nothing is being returned because Lasso is not receiving a proper request of there is a problem with the Lasso’s response XML, That <!CDATA[What]]> bit seems a bit suspect? Is that what causing it to fail?

Any takers?


It makes me wonder if there’s an encoding issue. It seems like there has been discussion of this on various mailing lists but I didn’t pay close attention. :?