cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Glynn, Eoghan" <eoghan.gl...@iona.com>
Subject RE: What's the use of isRequestor(Message) in AbstractJAXWSHandlerInterceptor?
Date Wed, 10 Jan 2007 10:20:34 GMT


> -----Original Message-----
> From: Unreal Jiang [mailto:sinbad_jia@yahoo.com] 
> Sent: 10 January 2007 08:27
> To: cxf-dev@incubator.apache.org
> Subject: What's the use of isRequestor(Message) in 
> AbstractJAXWSHandlerInterceptor?
> 
> Hi all,
> What's the use of isRequestor(Message) method?  Actually,  it 
> alway returns true, no matter it's inbound, outbound or 
> client ,server side.

Well that's clearly wrong, must be some sort of over-sight.

For an example of what this logic should look like, see
org.apache.cxf.ws.addressing.ContextUtils.isRequestor().

Note that the question of being inbound or outbound is irrelevant to
whether the message is on the requestor side, instead its determined by
the presence of the REQUESTOR_ROLE property.

To sum up the logic in psuedo-code:

isOutbound:  message == message.getExchange().getOutMessage() || message
== message.getExchange().getOutFaultMessage()

isInbound:   !isOutbound

isRequestor: Boolean.TURE.equals(message.get(Message.REQUESTOR_ROLE))

Cheers,
Eoghan

Mime
View raw message