<xmlrpc>
XML-RPC implementation

JavaScript: lz.xmlrpc
extends <rpc> » <node> » lz.Eventable »

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:

Attributes

Name (CSS property) Type (tag) Type (js) Default Category
service string String null read/write
  (Required) XML-RPC service URL. The URL must be http.

Attributes inherited from <rpc>

autoload, proxy, proxyinfo, secure, secureport

Methods

load()
xmlrpc.load();
Load the object. If successful, this.proxy is set to an object with remote APIs.

Methods inherited from <rpc>

load, makeProxyStubFunction, unload

Methods inherited from lz.Eventable

destroy, setAttribute

Events

Events inherited from <rpc>

ondata, onerror, onload, onunload

Events inherited from <node>

onconstruct, ondata, oninit

Events inherited from lz.Eventable

ondestroy