Package com.sun.xml.internal.ws.client

Examples of com.sun.xml.internal.ws.client.HandlerConfiguration


        this.roles = that.roles;
    }

    private void setUpHandlersOnce() {
        handlers = new ArrayList<Handler>();
        HandlerConfiguration handlerConfig = ((BindingImpl) binding).getHandlerConfig();
        List<MessageHandler> msgHandlersSnapShot= handlerConfig.getMessageHandlers();
        if (!msgHandlersSnapShot.isEmpty()) {
            handlers.addAll(msgHandlersSnapShot);
            roles = new HashSet<String>();
            roles.addAll(handlerConfig.getRoles());
        }
    }
View Full Code Here


        return new ServerSOAPHandlerTube(this, cloner);
    }

    private void setUpHandlersOnce() {
        handlers = new ArrayList<Handler>();
        HandlerConfiguration handlerConfig = ((BindingImpl) binding).getHandlerConfig();
        List<SOAPHandler> soapSnapShot= handlerConfig.getSoapHandlers();
        if (!soapSnapShot.isEmpty()) {
            handlers.addAll(soapSnapShot);
            roles = new HashSet<String>();
            roles.addAll(handlerConfig.getRoles());
        }
    }
View Full Code Here

            }else {
                throw new HandlerException("handler.not.valid.type",
                    handler.getClass());
            }
        }
        return new HandlerConfiguration(roles,portKnownHeaders,handlerChain,
                logicalHandlers,soapHandlers,messageHandlers,handlerKnownHeaders);
    }
View Full Code Here

        if (roles.contains(ROLE_NONE)) {
            throw new WebServiceException(ClientMessages.INVALID_SOAP_ROLE_NONE());
        }
        this.roles = roles;
        addRequiredRoles();
        HandlerConfiguration oldConfig = getHandlerConfig();
        setHandlerConfig(new HandlerConfiguration(this.roles, portKnownHeaders, oldConfig.getHandlerChain(),
                oldConfig.getLogicalHandlers(),oldConfig.getSoapHandlers(), oldConfig.getMessageHandlers(),
                oldConfig.getHandlerKnownHeaders()));
    }
View Full Code Here

                throw new WebServiceException(ClientMessages.NON_LOGICAL_HANDLER_SET(handler.getClass()));
            } else {
                logicalHandlers.add((LogicalHandler) handler);
            }
        }
        return new HandlerConfiguration(
                Collections.<String>emptySet(),
                Collections.<QName>emptySet(),
                handlerChain,logicalHandlers,null,null,null);
    }
View Full Code Here

    void setUpProcessor() {
       // Take a snapshot, User may change chain after invocation, Same chain
        // should be used for the entire MEP
        handlers = new ArrayList<Handler>();
        HandlerConfiguration handlerConfig = ((BindingImpl) binding).getHandlerConfig();
        List<MessageHandler> msgHandlersSnapShot= handlerConfig.getMessageHandlers();
        if (!msgHandlersSnapShot.isEmpty()) {
            handlers.addAll(msgHandlersSnapShot);
            roles = new HashSet<String>();
            roles.addAll(handlerConfig.getRoles());
            processor = new SOAPHandlerProcessor(true, this, binding, handlers);
        }
    }
View Full Code Here

    @Override @NotNull
    public NextAction processResponse(Packet response) {
        if (response.getMessage() == null) {
            return super.processResponse(response);
        }
        HandlerConfiguration handlerConfig = response.handlerConfig;
        Set<QName> knownHeaders;
        Set<String> roles;
        if (handlerConfig != null) {
            knownHeaders = handlerConfig.getKnownHeaders();
            roles = handlerConfig.getRoles();
        } else {
            roles = soapVersion.implicitRoleSet;
            knownHeaders = new HashSet<QName>();
        }
        Set<QName> misUnderstoodHeaders = getMisUnderstoodHeaders(
View Full Code Here

    void setUpProcessor() {
        // Take a snapshot, User may change chain after invocation, Same chain
        // should be used for the entire MEP
        handlers = new ArrayList<Handler>();
        HandlerConfiguration handlerConfig = ((BindingImpl) binding).getHandlerConfig();
        List<SOAPHandler> soapSnapShot= handlerConfig.getSoapHandlers();
        if (!soapSnapShot.isEmpty()) {
            handlers.addAll(soapSnapShot);
            roles = new HashSet<String>();
            roles.addAll(handlerConfig.getRoles());
            processor = new SOAPHandlerProcessor(true, this, binding, handlers);
        }
    }
View Full Code Here

    @Override @NotNull
    public NextAction processResponse(Packet response) {
        if (response.getMessage() == null) {
            return super.processResponse(response);
        }
        HandlerConfiguration handlerConfig = response.handlerConfig;

//        Set<QName> knownHeaders;
//        Set<String> roles;

//        if (handlerConfig != null) {
//            knownHeaders = handlerConfig.getKnownHeaders();
//            roles = handlerConfig.getRoles();
//        } else {
//            roles = soapVersion.implicitRoleSet;
//            knownHeaders = new HashSet<QName>();
//        }
//        Set<QName> misUnderstoodHeaders = getMisUnderstoodHeaders(
//                response.getMessage().getHeaders(), roles,
//                knownHeaders);
        if (handlerConfig == null) {
            //Use from binding instead of defaults in case response packet does not have it,
            //may have been changed from the time of invocation, it ok as its only fallback case.
            handlerConfig = binding.getHandlerConfig();
        }
        Set<QName> misUnderstoodHeaders = getMisUnderstoodHeaders(response.getMessage().getHeaders(), handlerConfig.getRoles(),handlerConfig.getHandlerKnownHeaders());
        if((misUnderstoodHeaders == null) || misUnderstoodHeaders.isEmpty()) {
            return super.processResponse(response);
        }
        throw createMUSOAPFaultException(misUnderstoodHeaders);
    }
View Full Code Here

    void setUpProcessor() {
       // Take a snapshot, User may change chain after invocation, Same chain
        // should be used for the entire MEP
        handlers = new ArrayList<Handler>();
        HandlerConfiguration handlerConfig = ((BindingImpl) binding).getHandlerConfig();
        List<MessageHandler> msgHandlersSnapShot= handlerConfig.getMessageHandlers();
        if (!msgHandlersSnapShot.isEmpty()) {
            handlers.addAll(msgHandlersSnapShot);
            roles = new HashSet<String>();
            roles.addAll(handlerConfig.getRoles());
            processor = new SOAPHandlerProcessor(true, this, binding, handlers);
        }
    }
View Full Code Here

TOP

Related Classes of com.sun.xml.internal.ws.client.HandlerConfiguration

Copyright © 2018 www.massapicom. 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.