if (this.service == null) { Debug.write("xmlrpc ERROR: service not defined"); return; } super.init(); XML-RPC implementation

XML-RPC is simple spec that describes how to invoke a remote operation using XML over HTTP. Laszlo XML-RPC is part of Laszlo RPC and shares many of the same APIs and concepts. Laszlo RPC includes SOAP and JavaRPC. For more information on XML-RPC, go to XML-RPC.com

Most Laszlo RPC objects like JavaRPC and SOAP will set function stubs in the proxy property during load based on methods described by a class (for JavaRPC) or on a service description (using a WSDL in SOAP). Remotecall declarations refer to these function stubs and any remotecalls not pointing to a function stub that doesn't exist will generate an error/warning. In <xmlrpc>, function stubs are created based on remotecall declarations. Note that XML-RPC use dot notation for their operation names. Because that will conflict with the view system's notation, it's suggested that remotecalls are explictly named.

<canvas debug="true" height="400"> <debug x="10" y="40" width="450" height="350"/> <xmlrpc name="math" service="http://www.cookcomputing.com/xmlrpcsamples/math.rem"> <handler name="onload"> Debug.debug('math XML-RPC service loaded'); Debug.debug('proxy:'); Debug.inspect(this.proxy); </handler> <handler name="ondata" args="data"> Debug.debug('got data: %w', data); </handler> <handler name="onerror" args="error"> Debug.debug('onerror: %w', error); </handler> <remotecall name="add" funcname="math.Add"/> <remotecall name="subtract" funcname="math.Subtract"/> <remotecall name="multiply" funcname="math.Multiply"/> <remotecall name="divide" funcname="math.Divide"/> </xmlrpc> <button text="100+200" x="10" y="10"> <handler name="onclick"> Debug.debug('100+200'); math.add.invoke([100,200]); </handler> </button> </canvas>

See Also:

  • <rpc>
  • <javarpc>
  • <soap>
  • <remotecall>
  • Developer's Guide: RPC chapter
  • Developer's Guide: XMLRPC chapter