Jim,

On Tuesday 14 December 2010 7:07:47 pm e...@apache.org wrote:
> MustUnderstandEndingInterceptor(); +
>      public MustUnderstandInterceptor() {
>          super(Phase.PRE_PROTOCOL);
>      }
> @@ -80,12 +83,18 @@ public class MustUnderstandInterceptor e
>          checkUnderstand(mustUnderstandHeaders, mustUnderstandQNames,
> notUnderstandHeaders);
> 
>          if (!notUnderstandHeaders.isEmpty()) {
> -            throw new SoapFault(new Message("MUST_UNDERSTAND", BUNDLE,
> notUnderstandHeaders), -                           
> soapVersion.getMustUnderstand());
> +            SoapFault soapFault = new SoapFault(new
> Message("MUST_UNDERSTAND", BUNDLE, notUnderstandHeaders), +               
>                                 soapVersion.getMustUnderstand()); +       
>     if (!isRequestor(soapMessage)) {
> +                soapMessage.put(MustUnderstandInterceptor.FAULT,
> soapFault); +            } else {
> +                throw soapFault;
> +            }
>          }
>          if (!ultimateReceiverHeaders.isEmpty() &&
> !isRequestor(soapMessage)) {
> checkUltimateReceiverHeaders(ultimateReceiverHeaders,
> mustUnderstandQNames, soapMessage); }
> +        soapMessage.getInterceptorChain().add(ending);
>      }


Can this be optimized a bit?   Basically, could the call to:

soapMessage.getInterceptorChain().add(ending);

be placed into the 
 if (!isRequestor(soapMessage)) {

block?   Since the interceptor only does anything if that block is called, we 
don't need to add it for every invokation.   Right?

-- 
Daniel Kulp
dk...@apache.org
http://dankulp.com/blog

Reply via email to