eggplant to post captured images using XMLRPC

I have a situtaion wherin I want to post some catutred image to another m/c using xml rpc . Can you advise if there are any tricks to achieve this


(*Handler is the Class that will be invoked when an RPC Call is made;
method is the Method is class Handler which would be invoked;
Strparams is a list of arguments passed as a String sperated by commas;
xmlrpcServerIP is the IPAddress of the XMLRPCServer;
xmlrpcServerPort is the Port  of the XMLRPCServer to connect to *)


params handler , method ,Strparams , returnVal 

put handler&"."&method   into meth
put  my folder into currFolder
put currFolder&"/../Data/Config/xmlrpc.ini" into rpcini
open file rpcini
repeat forever
	read 1 line from file rpcini
	if it is empty then  exit repeat -- we've reached the end of the file    
	put it into currLIne
	if "xmlrpcserverIP" is in currLine then
		put item 2 of split(currLine ,":") into xmlrpcserverIP
	End If	
	if "xmlrpcserverPort" is in currLine then
		put item 2 of split(currLine ,":") into xmlrpcserverPort
	End If
end repeat
put xmlrpcserverIP&":"&xmlrpcserverPort into servDet
close file rpcini


if Strparams is null then
	put  <<return>>&backslash&quote&handler&<<.>>&method&backslash&quote&<< }>> into command
	
else
	put  <<return>>&backslash&quote&handler&<<.>>&method&backslash&quote&<<parameter>>& Strparams&<<}}>> into command
end if
answer Strparams
answer command
answer handler 
answer returnVal 



set temp to merge of {{

script test
	
	on func(serverDetails, commandDetails)
		using terms from application "http://localhost/"
			tell application ("http://" & serverDetails )
				commandDetails
			end tell
		end using terms from
	end func
	
end script




test's func("[[servDet]]", [[command]])
}}


answer temp

do Applescript temp

put the result


This is the generic script which is called by other scripst .eg. start a NFS SErverice etc

Comments

  • Is there any specific reason why you want to use xml rpc to do this? Have you tried mounting the file system of the remote machine and saving your images to the mounted drive?
Sign In or Register to comment.