• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to write xml to stream  RSS feed

 
Mahtab Alam
Ranch Hand
Posts: 391
1
Java MySQL Database PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am writing a basic Restful web service with JAX-WS API , where you provide the city name and it gives you the min and max temperature along with some other info.

I am getting the response from Weather API


Here is the code for weather service


And below is the publisher



I do get the xml printed in the console when I hit the URL in browser , but I want to show the generated XML response in browser.

How can I serve the xml to the browser , how can I write XML response from the weather service to browser

Below is the response from the service printed in console, I want this in browser also

 
Stefan Evans
Bartender
Posts: 1837
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well if you want your webservice to respond with something, you have to return something from the invoke method.

Currently your invoke method returns null which indicates no response.




 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!