private void executeInternal(InputStream in,OutputStream out, Integer sessionId,Integer userId) throws OctetServerException  {
            try {
                parse(in);
                // check for errors from the XML parser
                if (errorLevel > NONE) throw new OctetServerException(0, errorMsg);
                Object handler = null;
                String handlerName = null;
                int dot = methodName.lastIndexOf('.');
                if (dot > -1)  {
                    handlerName = methodName.substring(0, dot);
                    handler = handlers.get(handlerName);
                    if (handler != null)
                    {
                        methodName = methodName.substring(dot + 1);
                    }
                }

                if (handler == null) {
                    if (dot > -1) {
                        throw new OctetServerException(0, "OctetHandler object \""+
                                handlerName + "\" not found and no default handler registered.");
                    } else {
                        throw new OctetServerException(0, "OctetHandler object not found for \""+
                                methodName + "\": no default handler registered.");
                    }
                }
                
                               
                if (handler instanceof SessionHandler)
                {
                    if (sessionId == null || userId == null) {
                        throw new IllegalArgumentException("Session_Id or User_Id in header is null");
                    }                    
                    ((SessionHandler)handler).checkSession(sessionId, userId);                    
                
                }
                                
                ((OctetRpcHandler) handler).execute(out,methodName,inParams);
                    
                                
               
        } catch (Exception e){
            logger.error(e.getMessage());
            throw new OctetServerException(0, e.getMessage());
        }
      }