Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Web Service Request-Response Association  RSS feed

 
Meghana Reddy
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
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • 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: 42970
73
  • 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.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!