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:
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. |
classroot, cloneManager, data, datapath, defaultplacement, id, ignoreplacement, immediateparent, inited, initstage, name, nodeLevel, options, parent, placement, styleclass, subnodes, transition
Methods
animate, applyConstraintMethod, applyData, childOf, completeInstantiation, construct, createChildren, dataBindAttribute, destroy, determinePlacement, getOption, getUID, init, lookupSourceLocator, releaseConstraint, releaseConstraintMethod, searchImmediateSubnodes, searchSubnodes, setOption, setSelected, updateData
Events
Copyright © 2002-2010 Laszlo Systems, Inc. All Rights Reserved. Unauthorized use, duplication or distribution is strictly prohibited. This is the proprietary information of Laszlo Systems, Inc. Use is subject to license terms.