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 3 of 3

Thread: Sending XML over HTTP to Another Application

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

    Default Sending XML over HTTP to Another Application

    Hi,
    I have 2 web application ClientA and ServerB. On ClientA application My requirement is I need to read an XML from a file system and then send it to
    ServerB. This XML needs to be sent to ServerB over HTTP or HTTPs. HTTP is enough right now. When ServerB receives the XML, it will
    do some basic validation, say for example one of the validation is if it is well formed. If everything is fine it will send response back to
    ClientA

    Input Message:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <note>
    <from>Jani</from>
    <to>Tove</to>
    <message>Send me Amount details</message>
    </note>

    Syschronous Response:

    <?xml version="1.0" encoding="ISO-8859-1"?>
    <response>
    <Status code="201" text="Accepted">Acknowledged</Status>
    </response>


    Requirement 2:


    On the server side I need to create a thread or a process which will read say n number of XMLs and send asychronously to ClientA.

    <?xml version="1.0" encoding="ISO-8859-1"?>
    <note>
    <from>Tove</from>
    <to>Jani</to>
    <amount>29</amount>
    </note>

    How can it be done? Any thought on this.... I want to use Java/Servlets...


  2. #2
    Junior Member
    Join Date
    Jul 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Sending XML over HTTP to Another Application

    Hi darasgar,

    i know i'm waaaaay tooo late ...but i was hoping that you've found a solution for ur issue above cause i've the same problem
    i reallllly need ur help.

    thank you in advance

  3. #3
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 294 Times in 227 Posts
    Blog Entries
    4

    Default Re: Sending XML over HTTP to Another Application

    Quote Originally Posted by engmti85 View Post
    Hi darasgar,

    i know i'm waaaaay tooo late ...but i was hoping that you've found a solution for ur issue above cause i've the same problem
    i reallllly need ur help.

    thank you in advance
    This is quite an old thread! It may be worth starting your own new thread engmti85.

    For validating the XML, I suggest checking this tutorial:

    http://www.javaprogrammingforums.com...dom-parse.html


    When you say transfer XML via HTTP, do you mean locally on port 80 or over the internet?
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

Similar Threads

  1. Replies: 0
    Last Post: December 3rd, 2009, 04:43 PM
  2. cant get rid of http connection
    By kartik in forum Java Networking
    Replies: 1
    Last Post: July 21st, 2009, 03:09 AM
  3. sending an email with pdf file everyday
    By pradeepptp in forum JavaServer Pages: JSP & JSTL
    Replies: 2
    Last Post: June 21st, 2009, 10:49 AM
  4. Sending and Receiving mail using J2ME without server
    By chals in forum Java ME (Mobile Edition)
    Replies: 5
    Last Post: June 2nd, 2009, 09:59 AM