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: How web service returns xml?

  1. #1
    Junior Member
    Join Date
    Oct 2010
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How web service returns xml?

    Hi everyone. I am new to the forum and java too. Forgive me for my English. I am from Greece.

    I have made a web service that gathers some data from a database and then returns them as a XML schema. They way i've done tha is by puting the data into a domdocument and then puting the document's content into a string object and return it.

    My goal i to invoke the web service via a .jsp client and take this xml ( that web service returns) from the HTTP response body.

    Is it correct to return the xml as string??

    Do you have any idea how to get the HTTP response body and manipulate it??

    thanks


  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,302
    Thanks
    181
    Thanked 824 Times in 767 Posts
    Blog Entries
    5

    Default Re: How web service returns xml?

    Welcome to the forums.

    In jsp, HTTPServletResponse is implicit and you should be able to access it through the 'response' variable (see JSP Request Object )

  3. #3
    Junior Member
    Join Date
    Oct 2010
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: How web service returns xml?

    thanks a lot. i'll check it.

Similar Threads

  1. [SOLVED] Trying to call web service (and failing)
    By jamesruk21 in forum What's Wrong With My Code?
    Replies: 2
    Last Post: January 15th, 2011, 11:35 AM
  2. Java web client - > .NET web service
    By codeJ in forum Web Frameworks
    Replies: 0
    Last Post: July 8th, 2010, 04:34 AM
  3. [SOLVED] Web Service from WSDL
    By wilky in forum Java Theory & Questions
    Replies: 3
    Last Post: January 25th, 2010, 09:45 AM
  4. simple login web service
    By mr_aliagha in forum JavaServer Pages: JSP & JSTL
    Replies: 3
    Last Post: January 5th, 2010, 02:49 PM
  5. Free java hosting service providers
    By servlet in forum Java Servlet
    Replies: 1
    Last Post: May 14th, 2009, 07:28 AM