**** httplib.InvalidURL: nonnumeric port ****

Anurag Chourasia anurag.chourasia at gmail.com
Mon Dec 20 14:30:36 EST 2010


Hi Kevin,

Thanks for the response.

I tried with HTTPConnection but the same problem.

>>> h1 = httplib.HTTPConnection('
http://joule:8041/DteEnLinea/ws/EnvioGuia.jws')
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/u01/home/apli/wm/python241/lib/python2.4/httplib.py", line 582, in
__init__
    self._set_hostport(host, port)
  File "/u01/home/apli/wm/python241/lib/python2.4/httplib.py", line 594, in
_set_hostport
    raise InvalidURL("nonnumeric port: '%s'" % host[i+1:])
httplib.InvalidURL: nonnumeric port: '8041/DteEnLinea/ws/EnvioGuia.jws'

Do i need to use some other library to be able to send XML Data (and get a
response back) to this Kind of Web Service address i.e.
http://joule:8041/DteEnLinea/ws/EnvioGuia.jws ?

Regards,
Anurag

On Tue, Dec 21, 2010 at 12:42 AM, Kev Dwyer <kevin.p.dwyer at gmail.com> wrote:

> On Tue, 21 Dec 2010 00:01:44 +0530, Anurag Chourasia wrote:
>
> >>> import httplib
> >>> help(httplib.HTTP)
> Help on class HTTP in module httplib:
>
> class HTTP
>  |  Compatibility class with httplib.py from 1.5.
>  |
>  |  Methods defined here:
>  |
>  |  __init__(self, host='', port=None, strict=None)
>
> The constructor doesn't take a complete URL as an argument.
>
> Also, shouldn't you be using httplib.HTTPConnection?  The docs
>  state that httplib.HTTP is for backward compatibility only.
>
> Kev
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20101221/9dfd2776/attachment.html>


More information about the Python-list mailing list