Hello,
I'd like to write an applescript to be able to add messages from Apple's Mail application into Sugar. This would certainly make it a sweeter application. :-) Sugar's SOAP interface seems like a great way to facilitate this connection. But, I can't even login using the SOAP interface.
Here is my applescript:
And here are the errors from sugarcrm.logmy create_session("username", "password")
on create_session(in_user_name, in_password)
tell application "http://iMacG5.local/sugarsuite/soap.php"
set mn to "create_session"
set sa to "http://iMacG5.local/sugarsuite/soap.php/create_session"
set mns to "http://www.sugarcrm.com/sugarcrm"
set params to {}
set paramOrder to {}
set params to params & {user_namein_user_name as string)}
set paramOrder to paramOrder & "user_name"
set params to params & {|password|in_password as string)}
set paramOrder to paramOrder & "password"
set params to params & {record orderaramOrder}
return call soap {method name:mn, parametersarams, SOAPAction:sa, method namespace uri:mns}
end tell
end create_session
Tue May 3 16:11:22 2005,803 [17137] FATAL User - SECURITY: failed login by matt
Tue May 3 16:11:22 2005,804 [17137] FATAL soap_contacts - SECURITY: failed attempted login for matt using SOAP api
Help, advice, suggestions? I am certain that the correct username and password are in the actual script.
As a side note, if anybody else is interested in using SOAP with Applescript, there is a really cool tool in the Develepor tools. Running the command /Developer/Tools/WSMakeStubs -url "http://imacg5.local/sugarsuite/soap.php?wsdl" -x applescript will stub out all the SOAP functions for you in applescript.


LinkBack URL
About LinkBacks
in_user_name as string)}
aramOrder}



Reply With Quote
Bookmarks