Charles Nadeau's Radio Weblog : A weblog about technology, tools and knowledge management
Updated: 2007-02-01; 08:35:08.

 

Subscribe to "Charles Nadeau's Radio Weblog" in Radio UserLand.

Click to see the XML version of this web page.

Click here to send an email to the editor of this weblog.


Categories: (Check them too. My content isn't all on the main page)

Knowledge Management
Technology
My Hardware
My Software
En français!
Top 20 topics!


Currently reading:

The Second World War, Volume 1: The Gathering Storm by Winston S. Churchill

Beginning Linux Programming (Programmer to Programmer) by Richard Stones and Neil Matthew



www.blogwise.com

Male/31-35. Lives in Canada/Ontario/Ottawa/Manor Park, speaks French and English. Spends 80% of daytime online. Uses a Faster (1M+) connection. And likes Cooking/Reading.
This is my blogchalk:
Canada, Ontario, Ottawa, manor Park, French, English, Male, 31-35, Cooking, Reading.


The Political Compass: Economic Left/Right: -3.50
Authoritarian/ Libertarian:
-2.26


Technorati Profile
Popdex Citations



 
 

28 octobre 2002


I order to get to know VB.NET I decided to use it to build a client to nxgate 0.3. I am using Charles Cook XML-RPC library as the interface. nxgate runs on one of my Linux test boxes. Right now I am having problem because the server can't befered by a URL, just by an IP address and a port number. I just posted a message on the XML-RPC message board. Here is the text of the message:

All,

I am trying to build an XML-RPC client in VB.NET and I want to know how it is possible to connect to a stand-alone server. By stand-alone server I mean a server not hosted on a web server. In fact the XML-RPC server is a Perl script running under Linux (see http://radio.weblogs.com/0111823/categories/mySoftware/2002/09/09.html#a47). When I set the URI property (proxy.Url = "192.168.0.51:1234"), which is not an URL, of the proxy, then run the program I get this error message: "XML-RPC server exception: Invalid URI: The URI scheme is not valid". How should I set this property?

Here is the relevant snippet of code:

Imports CookComputing.XmlRpc
Imports System.Net

Public Class Form1
Inherits System.Windows.Forms.Form
Dim XmlRpcClient As CookComputing.XmlRpc.XmlRpcClientProtocol
Public Class GetPostProxy
Inherits XmlRpcClientProtocol
Public Function getpost(ByVal NNTPServer As String, ByVal groupname As String, ByVal number As String) As String
Return Invoke("getpost", New Object() {NNTPServer, groupname, number})
End Function
End Class
Private Function HandleException(ByVal ex As Exception)
Dim msgBoxTitle As String = "Error"
Try
Throw ex
Catch fex As XmlRpcFaultException
MessageBox.Show("Fault response: " + fex.FaultCode + " " + fex.FaultString, msgBoxTitle, MessageBoxButtons.OK, MessageBoxIcon.Error)
Catch webex As WebException
MessageBox.Show("Web exception: " + webex.Message, msgBoxTitle, MessageBoxButtons.OK, MessageBoxIcon.Error)
Catch xmlrpcex As XmlRpcServerException
MessageBox.Show("XML-RPC server exception: " + xmlrpcex.Message, msgBoxTitle, MessageBoxButtons.OK, MessageBoxIcon.Error)
Catch defex As Exception
MessageBox.Show("XML-RPC server exception: " + defex.Message, msgBoxTitle, MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Function

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Cursor = Cursors.WaitCursor
Try
Dim proxy As New GetPostProxy()
proxy.Url = "192.168.0.51:1234"
Dim NNTPServer As String = Convert.ToString(TextBox1.Text)
Dim GroupName As String = Convert.ToString(TextBox2.Text)
Dim Number As String = Convert.ToString(TextBox4.Text)

TextBox3.Text = proxy.getpost(NNTPServer, GroupName, Number)
Cursor = Cursors.Default
Catch ex As Exception
HandleException(ex)
End Try
End Sub
End Class

I am aware that more bugs may creep off this code which isn't finished yet. I am writing this code to get to know VB.NET and Charles XML-RPC library. Thanks for your help

Charles Nadeau http://radio.weblogs.com/0111823/

If you have an idea on how to do it, please let me know!
10:26:45 PM Google It!    comment []   - See Also:  Micro$oft Programming  Trackback: trackback []


© Copyright 2007 Charles Nadeau.



Click here to visit the Radio UserLand website.
 



-->
October 2002
Sun Mon Tue Wed Thu Fri Sat
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    
Sep   Nov


Google
Search the whole web!
Search Charles radio!


www.flickr.com


Top 5 artists I listen to the most often during the last week:


I subscribe to:

Here's how this works.


Weather in Ottawa:
The WeatherPixie
Weather in Fukuoka:
The WeatherPixie