Package com.sun.xml.ws.client

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


    void setUpProcessor() {
      if (handlers == null) {
          // 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) getBinding()).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, getBinding(), handlers);
          }
      }
    }
View Full Code Here


            return !(packet.expectReply != null && packet.expectReply);
        }
    }
   
    private void setUpProcessorInternal() {
      HandlerConfiguration hc = ((BindingImpl) binding).getHandlerConfig();
      if (hc != this.hc)
        resetProcessor();
      this.hc = hc;
     
      setUpProcessor();
View Full Code Here

        this.roles = that.roles;
    }

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

        super(tubeContext.getEndpoint().getBinding(), next);

        this.tubeContext = tubeContext;

        //On Server, HandlerConfiguration does n't change after publish, so store locally
        HandlerConfiguration handlerConfig = binding.getHandlerConfig();
        roles = handlerConfig.getRoles();
        handlerKnownHeaders = binding.getKnownHeaders();
    }
View Full Code Here

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

        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(),binding.getKnownHeaders());
        if((misUnderstoodHeaders == null) || misUnderstoodHeaders.isEmpty()) {
            return super.processResponse(response);
        }
        throw createMUSOAPFaultException(misUnderstoodHeaders);
    }
View Full Code Here

     * Sets the handlers on the binding and then sorts the handlers in to logical and protocol handlers.
     * Creates a new HandlerConfiguration object and sets it on the BindingImpl. Also parses Headers understood by
     * Protocol Handlers and sets the HandlerConfiguration.
     */
    public void setHandlerChain(List<Handler> chain) {
        setHandlerConfig(new HandlerConfiguration(getHandlerConfig().getRoles(), chain));
    }
View Full Code Here

        }
        if (roles.contains(ROLE_NONE)) {
            throw new WebServiceException(ClientMessages.INVALID_SOAP_ROLE_NONE());
        }
        addRequiredRoles(roles);
        setHandlerConfig(new HandlerConfiguration(roles, getHandlerConfig()));
    }
View Full Code Here

        for (Handler handler : chain) {
            if (!(handler instanceof LogicalHandler)) {
                throw new WebServiceException(ClientMessages.NON_LOGICAL_HANDLER_SET(handler.getClass()));
            }
        }
        setHandlerConfig(new HandlerConfiguration(Collections.<String>emptySet(), chain));
    }
View Full Code Here

    protected MessageContextFactory messageContextFactory;

    protected BindingImpl(BindingID bindingId, WebServiceFeature ... features) {
        this.bindingId = bindingId;
        handlerConfig = new HandlerConfiguration(Collections.<String>emptySet(), Collections.<Handler>emptyList());
        if (handlerConfig.getHandlerKnownHeaders() != null)
            knownHeaders.addAll(handlerConfig.getHandlerKnownHeaders());
        this.features = new WebServiceFeatureList(features);
        this.features.validate();
    }
View Full Code Here

TOP

Related Classes of com.sun.xml.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.