Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

C#/Mono/CookComputing & xmlrpc2: msg#00002

cms.opengroupware.xmlrpc.devel

Subject: C#/Mono/CookComputing & xmlrpc2

I've been running back and forth trying to call OpenGroupware's xmlrpcd
from mono, and then I found this message from The Man Helge himself -
http://lists.ximian.com/archives/public/mono-list/2003-November/016697.html
- and I'm curious if anyone has been able to get this to work?

I've got a bunch of code and a Gtk# interface defined for tasks, but I
can't communicate with the server to get the tasks. :( Making
interfaces with Glade# is almost fun.
http://www.gotmono.com/docs/gnome/bindings/glade/glade.html

My test code is simple, and works for other XML-RPC servers, but when I
turn it on xmlrpcd I just get "crap", and 401 errors in the log.

Output in RPC server log - note 401 "authentication failed" code -
-----------------------------------------------------------------
192.168.1.20 - - [28/Jan/2004:03:43:34 GMT] "POST /RPC2 HTTP/1.1" 401 0
0.003 - - 0

Compiled via -
mcs -r CookComputing.XmlRpc.dll test.cs opengroupwareServer.cs

test.cs
-----------------------------------------------------------------
using System.Net;
using System;

class Test {
opengroupwareServer ogo;

static void Main() {
opengroupwareServer ogo = new opengroupwareServer("adam", "XXXXXX",
"SKYRiX");
Console.WriteLine(ogo.getHostName());
}
}

opengroupwareServer.cs
-----------------------------------------------------------------
using CookComputing.XmlRpc;
using System.Net;
using System;

[XmlRpcUrl("http://kohocton/RPC2";)]
class opengroupwareServer : XmlRpcClientProtocol
{
public opengroupwareServer(string userName, string password, string
realm) {
this.Credentials = new NetworkCredential(userName, password, realm);
}

[XmlRpcMethod("system.getHostname")]
public string getHostName() {
return (string)Invoke("getHostName");
}
}
-------------------------------
Pukes, after a long pause, with -
[awilliam@estate2 mogo]$ mono test.exe

Unhandled Exception: System.Net.WebException: Error getting response
stream ---> System.Exception:
at System.Net.WebConnection.HandleError()
at System.Net.WebConnection.ReadDone()
at System.MulticastDelegate.invoke_void_IAsyncResult()
at System.Net.Sockets.Socket+Worker.End()
at System.Net.Sockets.Socket+Worker.Receive()
in <0x000d5> System.Net.WebConnection:HandleError
(System.Net.WebExceptionStatus,System.Exception)
--- End of inner exception stack trace ---

in <0x00076> System.Net.HttpWebRequest:CheckFinalStatus
(System.Net.WebAsyncResult)
in <0x00065> (wrapper remoting-invoke-with-check)
System.Net.HttpWebRequest:CheckFinalStatus (System.Net.WebAsyncResult)
in <0x001c3> System.Net.HttpWebRequest:EndGetResponse
(System.IAsyncResult)
in <0x00092> System.Net.HttpWebRequest:GetResponse ()
in <0x00078>
System.Web.Services.Protocols.WebClientProtocol:GetWebResponse
(System.Net.WebRequest)
in <0x000ab>
System.Web.Services.Protocols.WebClientProtocol:GetWebResponse
(System.Net.WebRequest)
in <0x001c7> CookComputing.XmlRpc.XmlRpcClientProtocol:Invoke
(object,string,object[])
in <0x0001d> CookComputing.XmlRpc.XmlRpcClientProtocol:Invoke
(string,object[])
in <0x0006b> (wrapper remoting-invoke-with-check)
CookComputing.XmlRpc.XmlRpcClientProtocol:Invoke (string,object[])
in <0x00029> .opengroupwareServer:getHostName ()
in <0x00050> (wrapper remoting-invoke-with-check)
.opengroupwareServer:getHostName ()
in <0x00047> .Test:Main ()


--
OpenGroupware.org XML-RPC
xmlrpc@xxxxxxxxxxxxxxxxx
http://mail.opengroupware.org/mailman/listinfo/xmlrpc



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
solaris.opensol...    editors.vim/200...    web.turbogears....    jakarta.ant.dev...    mathematics.max...    text.unicode.ge...    lang.ruby.core/...    xfce.announce/2...    network.centeri...    php.cvs.pear/20...    user-groups.lin...    kde.devel.quant...    file-systems.ar...    redhat.fedora.t...    apple.fink.auto...    gnome.orbit.gen...    qplus.devel/200...    culture.transpo...    video.dri.user/...    operators.nanog...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation