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...

Integration (AddUser): msg#00024

cms.opengroupware.xmlrpc.devel

Subject: Integration (AddUser)

Hi all!

I need to integrate OGO with my software. I'm trying to create user account's on OGO with a XMLRPC client but without success. I'm starting now with XML and when I try to execute this simple script below:

---
#!/usr/bin/python
import xmlrpclib

server = xmlrpclib.Server('http://localhost:20000/RPC2',login='root',password='xxx')
LastName = "Fontana"

result = server.person.fetch({'qualifier':'name like "' + LastName + '"','sortOrderings' : ['name',],})
---

I receive the login page in html, no xml!?

My script above send this data to server:

---
POST /RPC2 HTTP/1.0
Host: groupware:20000
User-Agent: xmlrpclib.py/1.0.0 (by www.pythonware.com)
Authorization: Basic cm9vdDpQTEBJc1AyMDAy
Content-Type: text/xml
Content-Length: 379

<?xml version='1.0'?>
<methodCall>
<methodName>person.fetch</methodName>
<params>
<param>
<value><struct>
<member>
<name>sortOrderings</name>
<value><array><data>
<value><string>name</string></value>
</data></array></value>
</member>
<member>
<name>qualifier</name>
<value><string>name like "Fontana"</string></value>
</member>
</struct></value>
</param>
</params>
</methodCall>
---

I receive from python this error of parser
on line "result = server.person.fetch({'qualifier':'name like "' + LastName + '"','sortOrderings' : ['name',],})":

xml.parsers.expat.ExpatError: undefined entity: line 39, column 48

I suspect that this error is caused because script receives html and not xml.

I do not know what to make. The RPC in the server is enable by default? If no will be, as I make to enable this? Somebody can help me?

Sorry by my poor English.

Marcos Fontana.
--
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:
db.postgresql.b...    video.ffmpeg.us...    gis.qgis.devel/...    web.rdf.redland...    file-systems.oc...    recreation.rail...    systems.archos....    python.c++/2003...    lang.c--/2005-0...    multimedia.gpho...    network.unison....    editors.jedit.u...    hardware.pciids...    cms.tiki.cvs/20...    bug-tracking.ma...    java.hadoop.hba...    ietf.rsvp/2002-...    xfree86.devel/2...    qnx.openqnx.dev...    apache.labs.dev...    tex.pdftex/2008...    os.solaris.open...    user-groups.lin...    kde.koffice/200...   
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