I just finished uploading the source for the XmlRpc library for Silverlight. You can access it at the google code page for xml-rpc for silverlight. Its work in progress but I believe the library will mature with time.
I have included some documentation on the Usage wiki page.
/
by Alexei Vinidiktov
09 May 2009 at 06:38
Hello, verma!
Thanks for writing the XML-RPC class!
I’m trying to write a simple test app using your XML-RPC class and I have a problem. I’m new to Silverlight development in general, so I may be missing something obvious.
When I make an xml-rpc call from a button click event handler, I get an Invalid cross-thread access error message.
Here’s the stack trace:
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)
Timestamp: Sat, 9 May 2009 05:33:35 UTC
Message: Unhandled Error in Silverlight 2 Application Invalid cross-thread access. at MS.Internal.XcpImports.CheckThread()
at MS.Internal.XcpImports.MessageBox_ShowCore(String messageBoxText, String caption, UInt32 type)
at System.Windows.MessageBox.ShowCore(String messageBoxText, String caption, MessageBoxButton button)
at System.Windows.MessageBox.Show(String messageBoxText)
at SilverlightApplication4.Page.req_XmlRpcCallCompleteHandler(XmlRpcResponse response, Object userState)
at de.soundc.Silverlight.XmlRpc.XmlRpcRequest.ResponseResponse(IAsyncResult result)
at System.Net.BrowserHttpWebRequest.c__DisplayClassd.b__b(Object state2)
at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack)
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)
Line: 1
Char: 1
Code: 0
URI: http://localhost:8000/rpc/static/Debug/TestPage.html
by verma
24 May 2009 at 01:28
Hello Alexei,
I think the problem is that you are trying to access a UI element from the XML-RPC callback method or something. This results in a cross-thread access, which in case you’re not aware, means that a different thread other than the one that created the control is trying to access the control (or a non-UI thread). A simple solution for this is to use the dispatcher instance. Take a look at this:
http://www.silverlightshow.net/items/Tip-Asynchronous-Silverlight-Execute-on-the-UI-thread.aspx
Also, I will update the XmlRpc.cs soon. You should definitely use the newer version since it has been improved a lot and is much more stable.
Take care,
by Alexei Vinidiktov
09 Jun 2009 at 15:02
Hello verma,
Thanks a lot for your help! I used the dispatcher and it worked!!!
I can’t wait to start using your improved version of XmlRpc class!
Is there any other way I can contact you other than by posting a comment on this blog?
I only saw your reply today although I monitored this page for a week after I had posted my question here, then I lost all hope of hearing from you…
Maybe you could start a google group for users of your XmlRpc class?
by verma
09 Jun 2009 at 16:03
That’s a great idea. I have setup a google group for discussing XmlRpc related issues and have also updated the code to the most recent version. It should be way more stable now.
Goup: http://groups.google.com/group/xmlrpc-siverlight
by ksmk
06 Jan 2011 at 09:59
Hello verma!
I want to know about how to use xml-rpc silverlight in ironpython
Is it work??
Thanks…