This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

help with web service to display xml file contents using netbeans

 
Noyce Fischer
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello everybody

I have a written a java DOM code to read xml file and I need to use it to create a web service that reads xml files using netbeans
the problem is in the return type of the code since it's void the web service returns null
so I was wondering if there is another way to make the web service print the xml file contents or another return type for the method

here is my xml file "CV.xml"


and here is my DOM code
I know it's too long but thats how I learnt to write it


thanks in advance>
 
Arjun Abhishek
Ranch Hand
Posts: 57
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Can't you return a string containing the content of xml to print from the method instead of void. so that the WS client will consume the string and print it.

Thanks
Arjun.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13045
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This really sounds like a job for a RESTful web service.

Here is a Netbeans tutorial on creating a RESTful service.

Bill
 
Noyce Fischer
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello

thanks William for your sugesstion but we're not allowed to use RESTful web services

Arjun thanks for your answer i have already found a way to store all returened nodes in strings but how can i return multiple strings to be printed
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic