Win a copy of Head First Android this week in the Android forum!
  • 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
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

Displaying Restful request and response on client browser

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ,

I designed a swing application which as a client for restful webservice. Now i want to display both request and response of the webservice as the business want to see
what is the request and response that has gone to webservice as that it acts as a debug too along with viewing the data returned by restful service. I can view response xml
but request i do not know how to generate xml for webservice request from client side. Please help me.

Thanks
Sangeetha
 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

For logging the request and response, we used to implement "handlers" in a web service which means all the request and response has to go via this handlers.

For your case, what you can do is to implement an handler in the web service, save the request and response xml somewhere i.e. a file or a BLOB column, and read the same from your swing application.

Thanks.
 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Sangeetha,

If you are using cxf framework you can use LogginIninterceptors and LogginOutinterceptors which will capture you request and responses respectively and further you can handle them however you want.
Also handlers as Anthony said, in case if you are using plain jax-ws.

Thanks,
Kesava.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic