Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6146421
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T18:56:44+00:00 2026-05-23T18:56:44+00:00

Following this link I tried sending a XML file to my web service using

  • 0

Following this link I tried sending a XML file to my web service using GET:

import urllib
from createfile import XML


URL = "http://http://localhost:8080/mywebservice

parameter = urllib.urlencode({'XML': XML})

response = urllib.urlopen(URL + "?%s" % parameter)

print response.read()

But it gives me this error:

Traceback (most recent call last):
  File "C:\eclipse\testing_workspace\http tester\src\Main.py", line 15, in <module>
    response = urllib.urlopen(URL + "?%s" % parameter)
  File "C:\Python27\lib\urllib.py", line 84, in urlopen
    return opener.open(url)
  File "C:\Python27\lib\urllib.py", line 205, in open
    return getattr(self, name)(url)
  File "C:\Python27\lib\urllib.py", line 331, in open_http
    h = httplib.HTTP(host)
  File "C:\Python27\lib\httplib.py", line 1047, in __init__
    self._setup(self._connection_class(host, port, strict))
  File "C:\Python27\lib\httplib.py", line 681, in __init__
    self._set_hostport(host, port)
  File "C:\Python27\lib\httplib.py", line 706, in _set_hostport
    raise InvalidURL("nonnumeric port: '%s'" % host[i+1:])
httplib.InvalidURL: nonnumeric port: ''

But if I use POST method described in that link, it works good, my problem is that I need to use GET, so why I am getting thoose errors ?

response = urllib.urlopen(URL, parameter)  // this works
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T18:56:45+00:00Added an answer on May 23, 2026 at 6:56 pm

    Sending a XML file through a GET request is bare nonsense.

    Use POST instead.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have tried to do this refering to following link. http://skypher.com/index.php/2008/07/28/function-list-for-php/ But no success.
following this link i was able to load and read pixels from a .gif.
Following this thread, I tried to upload a file on the server. If I
Following this question, it seems that it is possible to open a file from
I've tried following this link Asynchronous call but some classes are obsolete. So I
I'm following this Railscast here for sending mails from my rails app. At first
I upgrade my magento store 1.4.1.1 to 1.6.1.0 following instruction from this link .
I am following this tutorial on creating a top-down car using Box2D: Link: Two
I am trying to model this relationship following this link http://www.javaworld.com/javaworld/jw-01-2008/images/datamodel.gif Its the usual
I have created a static library following this link . But I am facing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.