> -----Original Message----- > From: Unreal Jiang [mailto:[EMAIL PROTECTED] > Sent: 10 January 2007 08:27 > To: [email protected] > 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
