Package javax.xml.rpc.handler

Examples of javax.xml.rpc.handler.HandlerChain


    }


    private void initHandlerChain(QName portName, HandlerRegistry handlerRegistry,
            HandlerInfo handlerInfo, ArrayList<String> soaprolesToAdd) {
        HandlerChain handlerChain = (HandlerChain) handlerRegistry.getHandlerChain(portName);
        @SuppressWarnings("unchecked") // Can't change the API
        Iterator<Handler> iter = handlerChain.iterator();
        while (iter.hasNext()) {
            Handler handler = iter.next();
            handler.init(handlerInfo);
        }
        String[] soaprolesRegistered = handlerChain.getRoles();
        String [] soaproles = new String[soaprolesRegistered.length + soaprolesToAdd.size()];
        int i;
        for (i = 0;i < soaprolesRegistered.length; i++)
            soaproles[i] = soaprolesRegistered[i];
        for (int j = 0; j < soaprolesToAdd.size(); j++)
            soaproles[i+j] = soaprolesToAdd.get(j);
        handlerChain.setRoles(soaproles);
        handlerRegistry.setHandlerChain(portName, handlerChain);
    }
View Full Code Here


   /** Get the handler chain for the given endpoint name, maybe null.
    */
   HandlerChain getHandlerChainInstance(QName portName)
   {
      HandlerChain handlerChain = handlerChains.get(portName);
      return handlerChain;
   }
View Full Code Here

    public List getHandlerInfos() {
        return this.handlerInfos;
    }

    public HandlerChain createHandlerChain() {
        HandlerChain hc = new HandlerChainImpl(handlerInfos);
        return hc;
       
    }
View Full Code Here

         }
      }

      boolean status = true;

      HandlerChain handlerChain = null;
      if (type == HandlerType.PRE)
         handlerChain = preHandlerChain;
      else if (type == HandlerType.ENDPOINT)
         handlerChain = jaxrpcHandlerChain;
      else if (type == HandlerType.POST)
         handlerChain = postHandlerChain;

      if (handlerChain != null)
         status = handlerChain.handleRequest(msgContext);

      return status;
   }
View Full Code Here

   public boolean callResponseHandlerChain(ServerEndpointMetaData sepMetaData, HandlerType type)
   {
      SOAPMessageContextJAXRPC msgContext = (SOAPMessageContextJAXRPC)MessageContextAssociation.peekMessageContext();

      HandlerChain handlerChain = null;
      if (type == HandlerType.PRE)
         handlerChain = preHandlerChain;
      else if (type == HandlerType.ENDPOINT)
         handlerChain = jaxrpcHandlerChain;
      else if (type == HandlerType.POST)
         handlerChain = postHandlerChain;

      boolean status = (handlerChain != null ? handlerChain.handleResponse(msgContext) : true);

      if (type == HandlerType.ENDPOINT)
         XOPContext.visitAndRestoreXOPData();

      return status;
View Full Code Here

   public boolean callFaultHandlerChain(ServerEndpointMetaData sepMetaData, HandlerType type, Exception ex)
   {
      SOAPMessageContextJAXRPC msgContext = (SOAPMessageContextJAXRPC)MessageContextAssociation.peekMessageContext();

      HandlerChain handlerChain = null;
      if (type == HandlerType.PRE)
         handlerChain = preHandlerChain;
      else if (type == HandlerType.ENDPOINT)
         handlerChain = jaxrpcHandlerChain;
      else if (type == HandlerType.POST)
         handlerChain = postHandlerChain;

      boolean status = (handlerChain != null ? handlerChain.handleFault(msgContext) : true);

      if (type == HandlerType.ENDPOINT)
         XOPContext.visitAndRestoreXOPData();

      return status;
View Full Code Here

/*  90 */     registerClientHandlerChain(portName, chain, null);
/*     */   }
/*     */
/*     */   HandlerChain getHandlerChainInstance(QName portName)
/*     */   {
/*  97 */     HandlerChain handlerChain = (HandlerChain)this.handlerChains.get(portName);
/*  98 */     return handlerChain;
/*     */   }
View Full Code Here

/*  94 */       setInitialized(true);
/*     */     }
/*     */
/*  97 */     boolean status = true;
/*     */
/*  99 */     HandlerChain handlerChain = null;
/* 100 */     if (type == UnifiedHandlerMetaData.HandlerType.PRE)
/* 101 */       handlerChain = this.preHandlerChain;
/* 102 */     else if (type == UnifiedHandlerMetaData.HandlerType.ENDPOINT)
/* 103 */       handlerChain = this.jaxrpcHandlerChain;
/* 104 */     else if (type == UnifiedHandlerMetaData.HandlerType.POST) {
/* 105 */       handlerChain = this.postHandlerChain;
/*     */     }
/* 107 */     if (handlerChain != null) {
/* 108 */       status = handlerChain.handleRequest(msgContext);
/*     */     }
/* 110 */     return status;
/*     */   }
View Full Code Here

/*     */
/*     */   public boolean callResponseHandlerChain(ServerEndpointMetaData sepMetaData, UnifiedHandlerMetaData.HandlerType type)
/*     */   {
/* 115 */     SOAPMessageContextJAXRPC msgContext = (SOAPMessageContextJAXRPC)MessageContextAssociation.peekMessageContext();
/*     */
/* 117 */     HandlerChain handlerChain = null;
/* 118 */     if (type == UnifiedHandlerMetaData.HandlerType.PRE)
/* 119 */       handlerChain = this.preHandlerChain;
/* 120 */     else if (type == UnifiedHandlerMetaData.HandlerType.ENDPOINT)
/* 121 */       handlerChain = this.jaxrpcHandlerChain;
/* 122 */     else if (type == UnifiedHandlerMetaData.HandlerType.POST) {
/* 123 */       handlerChain = this.postHandlerChain;
/*     */     }
/* 125 */     boolean status = handlerChain != null ? handlerChain.handleResponse(msgContext) : true;
/*     */
/* 127 */     if (type == UnifiedHandlerMetaData.HandlerType.ENDPOINT) {
/* 128 */       XOPContext.visitAndRestoreXOPData();
/*     */     }
/* 130 */     return status;
View Full Code Here

/*     */
/*     */   public boolean callFaultHandlerChain(ServerEndpointMetaData sepMetaData, UnifiedHandlerMetaData.HandlerType type, Exception ex)
/*     */   {
/* 135 */     SOAPMessageContextJAXRPC msgContext = (SOAPMessageContextJAXRPC)MessageContextAssociation.peekMessageContext();
/*     */
/* 137 */     HandlerChain handlerChain = null;
/* 138 */     if (type == UnifiedHandlerMetaData.HandlerType.PRE)
/* 139 */       handlerChain = this.preHandlerChain;
/* 140 */     else if (type == UnifiedHandlerMetaData.HandlerType.ENDPOINT)
/* 141 */       handlerChain = this.jaxrpcHandlerChain;
/* 142 */     else if (type == UnifiedHandlerMetaData.HandlerType.POST) {
/* 143 */       handlerChain = this.postHandlerChain;
/*     */     }
/* 145 */     boolean status = handlerChain != null ? handlerChain.handleFault(msgContext) : true;
/*     */
/* 147 */     if (type == UnifiedHandlerMetaData.HandlerType.ENDPOINT) {
/* 148 */       XOPContext.visitAndRestoreXOPData();
/*     */     }
/* 150 */     return status;
View Full Code Here

TOP

Related Classes of javax.xml.rpc.handler.HandlerChain

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.