requestReceived(eic);
MessageContext request = eic.getRequestMessageContext();
Class serviceEndpoint = getServiceImplementation(request);
EndpointDescription endpointDesc = getEndpointDescription(request);
request.setEndpointDescription(endpointDesc);
// TODO: review: make sure the handlers are set on the InvocationContext
// This implementation of the JAXWS runtime does not use Endpoint, which
// would normally be the place to initialize and store the handler list.
// In lieu of that, we will have to intialize and store them on the
// InvocationContext. also see the InvocationContextFactory. On the client
// side, the binding is not yet set when we call into that factory, so the
// handler list doesn't get set on the InvocationContext object there. Thus
// we gotta do it here.
//
// Since we're on the server, and there apparently is no Binding object
// anywhere to be found...
List<String> handlerRoles = null;
if (eic.getHandlers() == null) {
if (log.isDebugEnabled()) {
log.debug("No handlers found on the InvocationContext, initializing handler list.");
}
HandlerResolverImpl hri = new HandlerResolverImpl(endpointDesc.getServiceDescription());
PortInfo portInfo = endpointDesc.getPortInfo();
eic.setHandlers(hri.getHandlerChain(portInfo));
handlerRoles = hri.getRoles(portInfo);
}
// Get the service instance. This will run the @PostConstruct code.
ServiceInstanceFactory instanceFactory = (ServiceInstanceFactory)
FactoryRegistry.getFactory(ServiceInstanceFactory.class);
Object serviceInstance = instanceFactory.createServiceInstance(request, serviceEndpoint);
// The application handlers and dispatcher invoke will
// modify/destroy parts of the message. Make sure to save
// the request message if appropriate.
saveRequestMessage(request);
boolean success = true;
// Perform inbound header/handler processing only if there is are headers OR handlers
if ( (request.getAxisMessageContext() != null &&
request.getAxisMessageContext().getEnvelope().getHeader() != null) ||
(eic.getHandlers() != null && !eic.getHandlers().isEmpty())) {
success = inboundHeaderAndHandlerProcessing(request, eic, handlerRoles);
}
if (success) {
if (log.isDebugEnabled()) {
log.debug("JAX-WS inbound handler chain invocation complete.");
}
// Set the dispatcher.
EndpointDispatcher dispatcher = getEndpointDispatcher(request, serviceEndpoint, serviceInstance);
Boolean ignoreSOAPVersion = false;
if(log.isDebugEnabled()){
log.debug("Checking for ProviderDispatcher instance");
}
if(dispatcher instanceof ProviderDispatcher){
if(log.isDebugEnabled()){
log.debug("ProviderDispatcher instance Found");
}
String bindingType = endpointDesc.getBindingType();
if(bindingType.equals(org.apache.axis2.jaxws.Constants.SOAP_HTTP_BINDING)){
ignoreSOAPVersion = true;
}
if(log.isDebugEnabled()){
log.debug("ignoreSOAPVersion Value ="+ignoreSOAPVersion.booleanValue());