Monday, June 11, 2012

Sending XML Queries in python using urllib2


Query is the xml string that you want to send.  Modify the content type according to your needs.

    def send_xml_query(self, query, host, port):



        query = query.replace ('\n', '')

        headers = {"Content-type": "application/xml"}

        host = 'http://%s:%s' % (host, port)

        request = urllib2.Request(host, query, headers)

        response = urllib2.urlopen(request)

        return request, response

21 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. Very nice post here and thanks for it .I always like and such a super contents of these post.Excellent and very cool idea and great content of different kinds of the valuable information's.
    Good discussion. Thank you.
    Anexas
    Six Sigma Training in Abu Dhabi
    Six Sigma Training in Dammam
    Six Sigma Training in Riyadh

    ReplyDelete
  3. Bodhih’s Virtual Train The Trainer workshop is a Mix of self-paced, interactive, Handson experiential and Practical workshop that is applied to learn and produce better results as a trainer.

    ReplyDelete
  4. Great post! I am actually getting ready to across this information, It's very helpful for this blog.Also great with all of the valuable information you have Keep up the good work you are doing well.Really very informative and creative contents. This concept is a good way to enhance the knowledge.thanks for sharing.
    please keep it up.Java training in Chennai

    Java Online training in Chennai

    Java Course in Chennai

    Best JAVA Training Institutes in Chennai

    Java training in Bangalore

    Java training in Hyderabad

    Java Training in Coimbatore

    Java Training

    Java Online Training

    ReplyDelete
  5. Quite Interesting post!!! Thanks for posting such a useful post. I wish to read your upcoming post to enhance my skill set, keep blogging.I am reading your post from the beginning, it was so interesting to read & I feel thanks to you for posting such a good blog, keep updates regularly.
    selenium training in chennai

    selenium training in chennai

    selenium online training in chennai

    software testing training in chennai

    selenium training in bangalore

    selenium training in hyderabad

    selenium training in coimbatore

    selenium online training

    selenium training

    ReplyDelete
  6. Thanks for sharing an informative blog keep rocking bring more details.I like the helpful info you provide in your articles. I’ll bookmark your weblog and check again here regularly.

    Software Testing Training in Chennai | Certification | Online
    Courses



    Software Testing Training in Chennai

    Software Testing Online Training in Chennai

    Software Testing Courses in Chennai

    Software Testing Training in Bangalore

    Software Testing Training in Hyderabad

    Software Testing Training in Coimbatore

    Software Testing Training

    Software Testing Online Training

    ReplyDelete
  7. Thank you for your informative article, I have been doing research on this subject, and for three days I keep entering sites that are supposed to have what I am searching for, only to be discouraged with the lack of what I needed. Thank you again.
    DevOps Training in Chennai

    DevOps Online Training in Chennai

    DevOps Training in Bangalore

    DevOps Training in Hyderabad

    DevOps Training in Coimbatore

    DevOps Training

    DevOps Online Training

    ReplyDelete
  8. I feel really happy to have seen your webpage.I am feeling grateful to read this.you gave a nice information for us.please updating more stuff content...thanks lot!!

    Android Training in Chennai

    Android Online Training in Chennai

    Android Training in Bangalore

    Android Training in Hyderabad

    Android Training in Coimbatore

    Android Training

    Android Online Training

    ReplyDelete
  9. Very nice post here and thanks for it .I always like and such a super contents of these post.Excellent and very cool idea and great content of different kinds of the valuable information's.



    AWS Course in Bangalore

    AWS Course in Hyderabad

    AWS Course in Coimbatore

    AWS Course

    AWS Certification Course

    AWS Certification Training

    AWS Online Training

    AWS Training

    ReplyDelete