Integration (AddUser)

Marcos Fontana <[email protected]>
Newsgroups gmane.comp.cms.opengroupware.xmlrpc.devel
Message-ID <[email protected]>
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
[email protected]
http://mail.opengroupware.org/mailman/listinfo/xmlrpc
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.