+ " is found in service "
+ serviceComponent.getURI()
+ "#"
+ service.getName());
}
InvocationChain chain = new InvocationChainImpl(operation, targetOperation, false, phaseManager, isAsyncInvocation());
if (operation.isNonBlocking()) {
addNonBlockingInterceptor(chain);
}
addServiceBindingInterceptor(chain, operation);
addImplementationInterceptor(serviceComponent, service, chain, targetOperation);
chains.add(chain);
// Handle cases where the operation is an async server
if( targetOperation.isAsyncServer() ) {
createAsyncServerCallback();
} // end if
}
wireProcessor.process(this);
// If we have to support async and there is no binding chain
// then set the response path to point directly to the
// binding provided async response handler
if (isAsyncInvocation() &&
bindingInvocationChain == null){
// fix up the operation chain response path to point back to the
// binding provided async response handler
ServiceBindingProvider serviceBindingProvider = getBindingProvider();
if (serviceBindingProvider instanceof EndpointAsyncProvider){
EndpointAsyncProvider asyncEndpointProvider = (EndpointAsyncProvider)serviceBindingProvider;
InvokerAsyncResponse asyncResponseInvoker = asyncEndpointProvider.createAsyncResponseInvoker();
for (InvocationChain chain : getInvocationChains()){
Invoker invoker = chain.getHeadInvoker();
if (invoker instanceof InterceptorAsync){
((InterceptorAsync)invoker).setPrevious(asyncResponseInvoker);
} else {
//TODO - throw error once the old async code is removed
} // end if