Converting XML Document to string

Discussion in 'Java' started by Sunil Sabir, May 10, 2005.

  1. Sunil Sabir

    Sunil Sabir Guest

    Dear All,

    I am quite new to Java Web Services. I have made a Java Class which
    calls all the web services . I am displaying the results on a Command
    prompt. Below is my sample code:

    import javax.xml.rpc.Service;
    import javax.xml.rpc.Stub;
    import horusWS.Horus_x0020_Web_x0020_Services_Impl;
    import horusWS.Horus_x0020_Web_x0020_ServicesSoap;

    public class JavaClient {
    public static void main(String[] args)

    {
    Horus_x0020_Web_x0020_Services_Impl service = new
    Horus_x0020_Web_x0020_Services_Impl();

    Horus_x0020_Web_x0020_ServicesSoap port =
    service.getHorus_x0020_Web_x0020_ServicesSoap();

    String str;
    str = port.getTextFeedbackLearner(1,"P001",1);
    //where getTextFeedbackLearner is the my Web Service.
    System.out.println(str);

    System.out.println returns the web service in string format. Now I want
    to compare this string to my actual getTextFeedbackLearner.xml file.
    But I think I need to convert getTextFeedbackLearner.xml to string
    first. Please let me know
    how can I convert an XML Document to String.

    Thanking you in Anticipation.

    cheers,
    Sunil Sabir
    Sunil Sabir, May 10, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andy Dingley
    Replies:
    0
    Views:
    387
    Andy Dingley
    Aug 26, 2003
  2. frigot eric
    Replies:
    0
    Views:
    604
    frigot eric
    Aug 28, 2003
  3. Tony Prichard
    Replies:
    0
    Views:
    715
    Tony Prichard
    Dec 12, 2003
  4. Manish Hatwalne
    Replies:
    1
    Views:
    392
    Martin Honnen
    Jul 13, 2004
  5. jkflens
    Replies:
    2
    Views:
    1,448
    jkflens
    May 30, 2006
Loading...

Share This Page