473,508 Members | 2,457 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

xmlrpc username/password failures

Hi,

I'm trying to get xmlrpc working with usernames and passwords and
having some issues. This is on Linux (WBEL3.0R1).

First of all with python 2.2.3 which comes with WBEL the following
simple code fails (passwords & server names altered to protect the
innocent):

#!/usr/bin/python

import xmlrpclib
from xmlrpclib import *

test =
Server('http://3tier:My*******@www.server.net/Forecast')

print test.ReturnSimpleInt()

Returns the following error:

Traceback (most recent call last):
File "./testCondon.py", line 8, in ?
print test.ReturnSimpleInt()
File "/usr/lib/python2.2/xmlrpclib.py", line 821, in __call__
return self.__send(self.__name, args)
File "/usr/lib/python2.2/xmlrpclib.py", line 975, in __request
verbose=self.__verbose
File "/usr/lib/python2.2/xmlrpclib.py", line 833, in request
h = self.make_connection(host)
File "/usr/lib/python2.2/xmlrpclib.py", line 862, in make_connection
return httplib.HTTP(host)
File "/usr/lib/python2.2/httplib.py", line 969, in __init__
self._setup(self._connection_class(host, port, strict))
File "/usr/lib/python2.2/httplib.py", line 491, in __init__
self._set_hostport(host, port)
File "/usr/lib/python2.2/httplib.py", line 502, in _set_hostport
raise InvalidURL("nonnumeric port: '%s'" % host[i+1:])
httplib.InvalidURL: nonnumeric port:
'M********@sd-portal.prasentia.net'

Strangely enough, the URL is not considered invalid by Python 2.4
(compiled fresh on WBEL), but I get 401 Unauthorized even though I can
cut/paste the URL into my browser (firefox 1.0) and I'm given
access...so I *know* it is not a typo:

Traceback (most recent call last):
File "./testCondon.py", line 8, in ?
print test.ReturnSimpleInt()
File "/usr/lib/python2.4/xmlrpclib.py", line 1096, in __call__
return self.__send(self.__name, args)
File "/usr/lib/python2.4/xmlrpclib.py", line 1383, in __request
verbose=self.__verbose
File "/usr/lib/python2.4/xmlrpclib.py", line 1137, in request
headers
xmlrpclib.ProtocolError: <ProtocolError for
3tier:My*******@www.server.net/Forecast: 401 Unauthorized>

The _only_ thing I was able to find in google about this is this one
bug:
https://sourceforge.net/tracker/?fun...&group_id=5470

which seems to indicate that username:password@hostname is not
*actually* an RFC valid syntax. However the xmlrpclib documenation
clearly indicates that that is *the* syntax to use:

http://docs.python.org/lib/module-xmlrpclib.html

What gives? What is the "right" way to do it?

Thanks,
Paul

Jul 18 '05 #1
0 1320

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
2785
by: Candice | last post by:
Please somebody help! I've deleted my admin username and password which was initially set at test. Now I can't log into my website as the administrator. How do I put Username and Password back so...
0
1816
by: glin | last post by:
Hi I am trying to integrate the xmlrpc server into a class, does anyone know how to get it working? test.html: <html> <head> <title>XMLRPC Test</title> <script src="jsolait/init.js"></script>...
0
1722
by: Juan Carlos CORUÑA | last post by:
Hello all, I'm trying to create a COM Server with an embedded xmlrpc server. Here is way it must work: - The client application (programmed with a COM capable language) instantiates my COM...
6
5324
by: Michael Urman | last post by:
Hi. I'm a user of python for about 3 years now. I've written a client-server application that uses SimpleXMLRPCServer and xmlrpclib.ServerProxy to communicate. It's intended to be used by a...
1
3235
by: Thomas Liesner | last post by:
Hi all, this may have been asked before, but as a newbie with xmlrpc i can't find any suitable info on that. Sorry. I am trying to write a simple xmlrpc-client in python and the server i am...
5
3759
by: libra786 | last post by:
I have created a blog and have added a login box which prompts the user for login and id before posting- The username and password have been stored in the database, however when i enter the username...
0
8291
by: roamnet | last post by:
hi i created database file with .mdf extention ,sql server as a source and use grid view to display data there're no problem in data retrieve and display,but i want to edit it or insert new...
0
2737
by: Benjamin Grieshaber | last post by:
Hi, I´m on SuSE 9.3 with xmlrpc-c and xmlrpc-c-devel installed (ver. 0.9.10) I tried to compile php with xmlrpc support and got the following errors: ...
0
1805
by: Gustavo Rahal | last post by:
Hi I'm trying to build a xmlrpc client that uses a proxy to connect to a xmlrpc server in https. I've googled and came up with a code snippet that doesn't actually work. What is missing?
0
7224
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7379
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7038
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7493
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4706
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3192
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3180
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1550
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
763
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.