Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 11 of 11

Thread: xml request in java code

  1. #1
    Junior Member
    Join Date
    Dec 2010
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default xml request in java code

    hi
    i want to send XML request via java code to web server.
    i hava XML request that i should send to a web srver, i want to send it using java code
    how can i do it?
    i dont hava any idea how to start, i search in google and got nothing.
    pls help.

    thanks,


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,139
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: xml request in java code

    What do you mean by an "XML request"? What protocols does the server respond to?
    The most common is HTTP.
    What is the server going to do when it receives the XML statements?
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Junior Member
    Join Date
    Dec 2010
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: xml request in java code

    the protocol is HTTP,
    i have an application that run on web server,
    and i have API xml file that can run this application.
    so i want to send this XML via java

  4. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,139
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: xml request in java code

    Sounds like you want to upload a file that contains XML statements to the server using the HTTP protocol.
    Have you tried using google for how to upload file to server using HTTP?
    If you don't understand my answer, don't ignore it, ask a question.

  5. #5
    Junior Member
    Join Date
    Dec 2010
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: xml request in java code

    it should be simple,
    i want to send HTTP post request that in java to URL,
    i have XML file that i want to send as HTTTP POST to specific url,
    how i can send the XML with java?

    thanks

  6. #6
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,139
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: xml request in java code

    There is a package with the Apache project that helps sending HTTP requests.
    Also did you try google?
    If you don't understand my answer, don't ignore it, ask a question.

  7. #7
    Junior Member
    Join Date
    Dec 2010
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: xml request in java code

    yes i tried to search in google but found nothing,
    what is the package's name?

  8. #8
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,139
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: xml request in java code

    What did you search on Google for? How to upload file using HTTP POST

    I don't know the spelling. Something from Apache for HTTP requests.
    If you don't understand my answer, don't ignore it, ask a question.

  9. #9
    Junior Member
    Join Date
    Dec 2010
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: xml request in java code

    no, i searched "send HTTP POST xml via java"

  10. #10
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,139
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: xml request in java code

    The XML part has no use. Try file.
    If you don't understand my answer, don't ignore it, ask a question.

  11. #11
    Junior Member
    Join Date
    Dec 2010
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: xml request in java code

    ok thanks i will try

Similar Threads

  1. Monitoring each Java web request
    By namrata.shah in forum Java Theory & Questions
    Replies: 1
    Last Post: May 1st, 2012, 06:39 PM
  2. Java - Tutorials done now request assistance?
    By mdiz in forum Java Theory & Questions
    Replies: 2
    Last Post: January 11th, 2012, 02:26 PM
  3. Calling .Net HttpHandler from Java - "Bad Request" Returned
    By fordej2511 in forum Member Introductions
    Replies: 0
    Last Post: May 5th, 2011, 02:11 PM
  4. Problem sending POST request with Java..
    By lost in forum What's Wrong With My Code?
    Replies: 3
    Last Post: October 20th, 2010, 09:16 PM