You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by GIBERT Philippe RD-BIZZ-SOP <ph...@francetelecom.com> on 2006/03/27 14:03:11 UTC

threading problem insidea Handler

Hi,
i have a handler deployed in Axis 1.2 that must call a Web Service at the end of the handle Response operation.
The Web service call is synchronous and works well when called  from a classical WSC ( not in a Handler)
but here inside the handler, the call blocks and never returns... threading  problem?  event select loop  problem?
 
Any idea would be appreciated 
thx
philippe
 

________________________________

De : robert lazarski [mailto:robertlazarski@gmail.com] 
Envoyé : jeudi 23 mars 2006 13:22
À : axis-user@ws.apache.org
Objet : Re: Correlation between SOAP Request an response handlers?


This worked for me back in axis 1.x : 

import javax.xml.rpc.handler.Handler;

public class ClientHandler implements Handler { 
 public boolean handleResponse(MessageContext context) {
   doLDAPLogin(context);
 } 
...
  public boolean doLDAPLogin(javax.xml.rpc.handler.MessageContext javaxcontext) {
     org.apache.axis.MessageContext mc = (org.apache.axis.MessageContext) javaxcontext;
  }
}

Keep in mind in later Axis 1.x releases there is a static method that can get a hold of. From the faq: 

How do I get access to the MessageContext in my service object? 

	Use the static MessageContext.getCurrentContext() method at any time during a method call on your object.

HTH,
Robert 
http://www.braziloutsource.com

On 3/23/06, GIBERT Philippe RD-BIZZ-SOP < philippe.gibert@francetelecom.com <ma...@francetelecom.com> > wrote: 

	Tanks robert... but all these useful operations get* methods areavailable in the case of an Axis handler..
	not in the case of jax rpc handler , right ?  ( i had a glance to javax.xml.rpc.handler javadoc and i have seen nothing on that , just HandlerInfo with little information)
	So , As my handler  could be hosted  on Jonas, Jboss or Axis,  i think it is mandatoryin my case  to be jax-rpc compliant, right ?
	 
	philippe
________________________________

	De : robert lazarski [mailto:robertlazarski@gmail.com] 
	Envoyé : mercredi 22 mars 2006 12:12
	À : axis-user@ws.apache.org
	Objet : Re: Correlation between SOAP Request an response handlers?
	
	
	A session id can be created using java.util.UUID . MessageContext has I believe the other info you're looking for - see the list of get*() methods. 
	
	HTH,
	Robert 
	http://www.braziloutsource.com
	
	
	On 3/22/06, GIBERT Philippe RD-BIZZ-SOP < philippe.gibert@francetelecom.com <ma...@francetelecom.com> > wrote: 


		Greg
		Thanx a lot .. I have seen the source of LogHandler , not far from my problem 
		But i think, i also need :
		        - a kind of SessionID to  map a request and a response ( Axis SessionHandler perhaps as a starting point ?)
		        - the IP source and destination ( possible at the SOAP handler level or may i put in the chain a handler at transport level?)
		
		Any already developed handler with these requirements ?
		
		Philippe
		
		-----Message d'origine-----
		De : Greg Pelly [mailto: gpelly@esri.com <ma...@esri.com> ]
		Envoyé : mardi 21 mars 2006 18:26
		À : axis-user@ws.apache.org
		Objet : RE: Correlation between SOAP Request an response handlers?
		
		Philippe,
		
		Yes, add your handler to the <globalConfiguration> of your server-config.wsdd under the <requestFlow> and <responseFlow> and I believe you should be on your way (provided you want the two cases handled identically).
		
		Greg
		
		-----Original Message-----
		From: GIBERT Philippe RD-BIZZ-SOP
		[mailto:philippe.gibert@francetelecom.com ]
		Sent: Tuesday, March 21, 2006 9:13 AM
		To: axis-user@ws.apache.org
		Subject: Correlation between SOAP Request an response handlers?
		
		
		hi everybody,
		My environment: win XP + Axis 1.2
		My problem :
		i need to do correlation (storing each req/response pairs and
		calculating roundtrip time )  between SOAP requests from WS client and
		SOAP Response/Fault from a Wservice I think handler could be a solution, 
		but i don't know :
		   - If only one handler (intercepting request Flow and just after
		response Flow ) can do the job ?
		   - If the handler could be deployed globally in the Axis runtime to
		intercept all the running web services ? 
		
		Any idea or pointer ?
		
		Thanks
		philippe