My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members
Featured
Wiki pages
Links

Please note that the dicussion group has been changed. The links on this page connect to the new group. Please use the new group for any new discussions. The older group can still be accessed here.

Basic and minimal XML-RPC processing for silverlight. Issue XML-RPC calls and receive event notifications when the calls complete. XML-RPC for Silverlight also includes features for easier processing of responses and fault detection.

For suggestions, feedbacks and error reports, please consider posting on the xmlrpc-silverlight group.

Here is how you perform some of the things with XML-RPC for Silverlight.

Issuing a request:

XmlRpcService service = 
        new XmlRpcService ("http://betty.userland.com/RPC2");
XmlRpcRequest req = 
        new xmlrpcslv.XmlRpcRequest (service, "examples.getStateName", new object [] { 10 });
req.XmlRpcCallCompleteHandler += 
        new XmlRpcCallComplete (req_XmlRpcCallCompleteHandler);

req.Execute (null);

Here is how you handle responses:

void req_XmlRpcCallCompleteHandler (xmlrpcslv.XmlRpcResponse response, object userState) {
    Fault f = (Fault)response.TryCast (typeof (Fault));
    if (f != null) {
        Debug.WriteLine ("Fault occured: " + f.ToString ());
        if (f.FaultCode == -1) {
            Debug.WriteLine ("OMG! -1 ERROR!");
        }
    }
    else {
        string result = (string)response.TryCast (typeof (string));
        Debug.WriteLine ("Result: " + result);
    }
}

Fault is user defined class. XML-RPC for Silverlight automatically maps XML-RPC responses to C# classes for easier access and manipulation.

Powered by Google Project Hosting