Examples of HandlerResolver


Examples of javax.xml.ws.handler.HandlerResolver

        binding = (org.apache.axis2.jaxws.spi.Binding) BindingUtils.createBinding(endpointDesc);
        if(log.isDebugEnabled()){
            log.debug("Lookign for Handler Resolver");
        }
        // TODO should we allow the ServiceDelegate to figure out the default handlerresolver?  Probably yes, since a client app may look for one there.
        HandlerResolver handlerResolver = null;
        if(serviceDelegate.getHandlerResolver() != null){
            if(log.isDebugEnabled()){
                log.debug("Reading default Handler Resolver ");
            }
            handlerResolver = serviceDelegate.getHandlerResolver();
        }
        else{
            handlerResolver = new HandlerResolverImpl(endpointDesc.getServiceDescription(), serviceDelegate);
            if(log.isDebugEnabled()){
                log.debug("Creating new Handler Resolver using HandlerResolverImpl");
            }
        }

        // See if the metadata from creating the service indicates that MTOM should be enabled
        if (binding instanceof SOAPBinding) {
            // MTOM can be enabled either at the ServiceDescription level (via the WSDL binding type) or
            // at the EndpointDescription level via the binding type used to create a Dispatch.
            boolean enableMTOMFromMetadata = endpointDesc.getServiceDescription().isMTOMEnabled(serviceDelegate);
            if (!enableMTOMFromMetadata) {
                String bindingType = endpointDesc.getClientBindingID();
                enableMTOMFromMetadata = (bindingType.equals(SOAPBinding.SOAP11HTTP_MTOM_BINDING) ||
                                          bindingType.equals(SOAPBinding.SOAP12HTTP_MTOM_BINDING));
            }
           
            if (enableMTOMFromMetadata) {
                ((SOAPBinding) binding).setMTOMEnabled(true);
            }
        }
        binding.setHandlerChain(handlerResolver.getHandlerChain(endpointDesc.getPortInfo()));
       
        //Set JAX-WS 2.1 related properties.
        try {
            binding.setAxis2EndpointReference(epr);
            binding.setAddressingNamespace(addressingNamespace);
View Full Code Here

Examples of javax.xml.ws.handler.HandlerResolver

        }

        if (!handlerChains.isEmpty()) {
            final InjectionMetaData injectionMetaData = ClientInstance.get().getComponent(InjectionMetaData.class);
            final List<Injection> injections = injectionMetaData.getInjections();
            final HandlerResolver handlerResolver = new ClientHandlerResolverImpl(handlerChains, injections, new InitialContext());
            instance.setHandlerResolver(handlerResolver);
        }

        final Object port;
        if (referenceClass != null && !Service.class.isAssignableFrom(referenceClass)) {
View Full Code Here

Examples of javax.xml.ws.handler.HandlerResolver

            binding = BindingUtils.createBinding(endpointDesc);
            if(log.isDebugEnabled()){
                log.debug("Lookign for Handler Resolver");
            }
            // TODO should we allow the ServiceDelegate to figure out the default handlerresolver?  Probably yes, since a client app may look for one there.
            HandlerResolver handlerResolver = null;
            if(serviceDelegate.getHandlerResolver() != null){
                if(log.isDebugEnabled()){
                    log.debug("Reading default Handler Resolver ");
                }
                handlerResolver= serviceDelegate.getHandlerResolver();
            }
            else{
                handlerResolver = new HandlerResolverImpl(endpointDesc.getServiceDescription());
                if(log.isDebugEnabled()){
                    log.debug("Creating new Handler Resolver using HandlerResolverImpl");
                }
            }
            binding.setHandlerChain(handlerResolver.getHandlerChain(endpointDesc.getPortInfo()));
        }

    }
View Full Code Here

Examples of javax.xml.ws.handler.HandlerResolver

            URL documentLocation = serviceDelegate.getWSDLDocumentLocation();
            return documentLocation;
        }

        public HandlerResolver getHandlerResolver() {
            HandlerResolver handlerResolver = serviceDelegate.getHandlerResolver();
            return handlerResolver;
        }
View Full Code Here

Examples of javax.xml.ws.handler.HandlerResolver

            URL documentLocation = serviceDelegate.getWSDLDocumentLocation();
            return documentLocation;
        }

        public HandlerResolver getHandlerResolver() {
            HandlerResolver handlerResolver = serviceDelegate.getHandlerResolver();
            return handlerResolver;
        }
View Full Code Here

Examples of javax.xml.ws.handler.HandlerResolver

        } finally {
            ProviderWrapper.afterCreate();
        }

        if (!handlerChains.isEmpty()) {
            final HandlerResolver handlerResolver = new HandlerResolverImpl(handlerChains, injections, new InitialContext());
            instance.setHandlerResolver(handlerResolver);
        }

        final Object port;
        if (referenceClass != null && !Service.class.isAssignableFrom(referenceClass)) {
View Full Code Here

Examples of javax.xml.ws.handler.HandlerResolver

            final URL documentLocation = serviceDelegate.getWSDLDocumentLocation();
            return documentLocation;
        }

        public HandlerResolver getHandlerResolver() {
            final HandlerResolver handlerResolver = serviceDelegate.getHandlerResolver();
            return handlerResolver;
        }
View Full Code Here

Examples of javax.xml.ws.handler.HandlerResolver

            serviceClass = GenericService.class;
        }

        instance = createServiceProxy(serviceClass, this.classLoader, this.serviceQName, wsdlURL);

        HandlerResolver handlerResolver = getHandlerResolver(serviceClass);
        if(handlerResolver != null) {
            instance.setHandlerResolver(handlerResolver);
        }

        if (referenceClass != null && !Service.class.isAssignableFrom(referenceClass)) {
View Full Code Here

Examples of javax.xml.ws.handler.HandlerResolver

        binding = (org.apache.axis2.jaxws.spi.Binding) BindingUtils.createBinding(endpointDesc);
        if(log.isDebugEnabled()){
            log.debug("Lookign for Handler Resolver");
        }
        // TODO should we allow the ServiceDelegate to figure out the default handlerresolver?  Probably yes, since a client app may look for one there.
        HandlerResolver handlerResolver = null;
        if(serviceDelegate.getHandlerResolver() != null){
            if(log.isDebugEnabled()){
                log.debug("Reading default Handler Resolver ");
            }
            handlerResolver = serviceDelegate.getHandlerResolver();
        }
        else{
            handlerResolver = new HandlerResolverImpl(endpointDesc.getServiceDescription(), serviceDelegate);
            if(log.isDebugEnabled()){
                log.debug("Creating new Handler Resolver using HandlerResolverImpl");
            }
        }

        // See if the metadata from creating the service indicates that MTOM should be enabled
        if (binding instanceof SOAPBinding) {
            // MTOM can be enabled either at the ServiceDescription level (via the WSDL binding type) or
            // at the EndpointDescription level via the binding type used to create a Dispatch.
            boolean enableMTOMFromMetadata = false;
           
            // if we have an SEI for the port, then we'll use it in order to search for MTOM configuration
            if(endpointDesc.getEndpointInterfaceDescription() != null
                    &&
                    endpointDesc.getEndpointInterfaceDescription().getSEIClass() != null) {
                enableMTOMFromMetadata = endpointDesc.getServiceDescription().isMTOMEnabled(serviceDelegate,
                                                                   endpointDesc.getEndpointInterfaceDescription().getSEIClass());
            }
            else {
                enableMTOMFromMetadata = endpointDesc.getServiceDescription().isMTOMEnabled(serviceDelegate);
            }
            if (!enableMTOMFromMetadata) {
                String bindingType = endpointDesc.getClientBindingID();
                enableMTOMFromMetadata = (bindingType.equals(SOAPBinding.SOAP11HTTP_MTOM_BINDING) ||
                                          bindingType.equals(SOAPBinding.SOAP12HTTP_MTOM_BINDING));
            }
           
            if (enableMTOMFromMetadata) {
                ((SOAPBinding) binding).setMTOMEnabled(true);
            }
        }
               
        // check for properties that need to be set on the BindingProvider
        String seiName = null;
        if(endpointDesc.getEndpointInterfaceDescription() != null
                &&
                endpointDesc.getEndpointInterfaceDescription().getSEIClass() != null) {
            seiName = endpointDesc.getEndpointInterfaceDescription().getSEIClass().getName();
        }
        String portQNameString = endpointDesc.getPortQName().toString();
        String key = seiName + ":" + portQNameString;
        Map<String, Object> bProps = endpointDesc.getServiceDescription().getBindingProperties(serviceDelegate, key);
        if(bProps != null) {
            if(log.isDebugEnabled()) {
                log.debug("Setting binding props with size: " + bProps.size() + " on " +
                "BindingProvider RequestContext");
            }
            requestContext.putAll(bProps);
        }
       
        binding.setHandlerChain(handlerResolver.getHandlerChain(endpointDesc.getPortInfo()));
       
        //Set JAX-WS 2.1 related properties.
        try {
            binding.setAxis2EndpointReference(epr);
            binding.setAddressingNamespace(addressingNamespace);
View Full Code Here

Examples of javax.xml.ws.handler.HandlerResolver

            URL documentLocation = serviceDelegate.getWSDLDocumentLocation();
            return documentLocation;
        }

        public HandlerResolver getHandlerResolver() {
            HandlerResolver handlerResolver = serviceDelegate.getHandlerResolver();
            return handlerResolver;
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.