• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

help with web service to display xml file contents using netbeans

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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>
 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic