Win a copy of Svelte and Sapper in Action this week in the JavaScript 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Web Service Request-Response Association

 
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can we associate a Web service Request with a corresponding reponse?

We are using JAX-RPC and have configured the handlers(javax.xml.rpc.GenericHandler) to handle the incoming requests and outgoing reponses. But how can we calculate the response time for a specific request? We need to identify a response with its corresponding request!!

Please let me know if any of you have worked on this before?

Thanks in advance
Meghana
 
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can set a property in the MessageContext. The following snippet implements a handler that uses it to measure roundtrip time.
 
Meghana Reddy
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ulf, this solves my problem.

I just have one more question about how the handler is created and used by the JAX-RPC engine.

Does the JAX-RPC engine create a new instance of a handler for each web service ? Or does it create just one instance and would be reused for each web service?

Thanks again

Meghana
 
Ulf Dittmer
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That should be easy to find out by doing some appropriate logging in a no-arg constructor of the handler class.
 
We don't have time for this. We've gotta save the moon! Or check this out:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
    Bookmark Topic Watch Topic
  • New Topic