Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Converting XML Document to string

Reply
Thread Tools

Converting XML Document to string

 
 
Sunil Sabir
Guest
Posts: n/a
 
      05-10-2005
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ElementTree.XML(string XML) and ElementTree.fromstring(string XML)not working Kee Nethery Python 12 06-27-2009 06:06 AM
Problem to insert an XML-element by XSLT-converting from one XML-file into another XML-file jkflens XML 2 05-30-2006 09:41 AM
Refer to an XML document from within an XML document Manish Hatwalne XML 1 07-13-2004 10:24 AM
WebService returns XML in a String - how can I 'convert' this to an XML document? Ben Turner ASP .Net 2 01-02-2004 05:20 AM
Help on including one XML document within another XML document using XML Schemas Tony Prichard XML 0 12-12-2003 03:18 PM



Advertisments