• Post Reply Bookmark Topic Watch Topic
  • New Topic

Displaying Restful request and response on client browser  RSS feed

 
sangeetha singh
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • 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
 
Anthony D'Souz
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • 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.
 
Kesava Krishna
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!