public AxisService getAxisService() { return serviceContext.getAxisService(); }
public void addServiceContext(ServiceContext serviceContext) { serviceContextMap.put(serviceContext.getAxisService().getName(), serviceContext); }
public void addServiceContext(ServiceContext serviceContext) { serviceContextMap.put(serviceContext.getAxisService().getName(), serviceContext); }
/** * Adds the specified service context object to the * lists of service contexts for this service group * context. * * @param srvctx The ServiceContext object to add */ public void addServiceContext(ServiceContext srvctx) { if (srvctx == null) { return; } AxisService axisService = srvctx.getAxisService(); if (axisService == null) { return; } if (serviceContextMap == null) { serviceContextMap = new HashMap<String, ServiceContext>(); } serviceContextMap.put(axisService.getName(), srvctx); }
/** * Adds the specified service context object to the * lists of service contexts for this service group * context. * * @param srvctx The ServiceContext object to add */ public void addServiceContext(ServiceContext srvctx) { if (srvctx == null) { return; } AxisService axisService = srvctx.getAxisService(); if (axisService == null) { return; } if (serviceContextMap == null) { serviceContextMap = new HashMap<String, ServiceContext>(); } serviceContextMap.put(axisService.getName(), srvctx); }
public static Stub authenticateStub(Stub stub, String sessionCookie, String backendURL) { long soTimeout = 5 * 60 * 1000; // Three minutes ServiceClient client = stub._getServiceClient(); Options option = client.getOptions(); option.setManageSession(true); option.setTimeOutInMilliSeconds(soTimeout); System.out.println("XXXXXXXXXXXXXXXXXXX" + backendURL + client.getServiceContext().getAxisService().getName().replaceAll("[^a-zA-Z]", "")); option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, sessionCookie); option.setTo(new EndpointReference(backendURL + client.getServiceContext().getAxisService().getName().replaceAll("[^a-zA-Z]", ""))); if (log.isDebugEnabled()) { log.debug("AuthenticateStub : Stub created with session " + sessionCookie); } return stub; }
public static Stub authenticateStub(Stub stub, String sessionCookie, String backendURL) { long soTimeout = 5 * 60 * 1000; // Three minutes ServiceClient client = stub._getServiceClient(); Options option = client.getOptions(); option.setManageSession(true); option.setTimeOutInMilliSeconds(soTimeout); System.out.println("XXXXXXXXXXXXXXXXXXX" + backendURL + client.getServiceContext().getAxisService().getName().replaceAll("[^a-zA-Z]", "")); option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, sessionCookie); option.setTo(new EndpointReference(backendURL + client.getServiceContext().getAxisService().getName().replaceAll("[^a-zA-Z]", ""))); if (log.isDebugEnabled()) { log.debug("AuthenticateStub : Stub created with session " + sessionCookie); } return stub; }
public static Stub authenticateStub(Stub stub, String sessionCookie, String backendURL) { long soTimeout = 5 * 60 * 1000; // Five minutes ServiceClient client = stub._getServiceClient(); Options option = client.getOptions(); option.setManageSession(true); option.setTimeOutInMilliSeconds(soTimeout); option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, sessionCookie); option.setTo(new EndpointReference(backendURL + client.getServiceContext().getAxisService().getName().replaceAll("[^a-zA-Z]", ""))); if (log.isDebugEnabled()) { log.debug("AuthenticateStub : Stub created with session " + sessionCookie); } return stub; }
public static Stub authenticateStub(Stub stub, String sessionCookie, String backendURL) { long soTimeout = 5 * 60 * 1000; // Three minutes ServiceClient client = stub._getServiceClient(); Options option = client.getOptions(); option.setManageSession(true); option.setTimeOutInMilliSeconds(soTimeout); System.out.println("XXXXXXXXXXXXXXXXXXX" + backendURL + client.getServiceContext().getAxisService().getName().replaceAll("[^a-zA-Z]", "")); option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, sessionCookie); option.setTo(new EndpointReference(backendURL + client.getServiceContext().getAxisService().getName().replaceAll("[^a-zA-Z]", ""))); if (log.isDebugEnabled()) { log.debug("AuthenticateStub : Stub created with session " + sessionCookie); } return stub; }
public static Stub authenticateStub(Stub stub, String sessionCookie, String backendURL) { // Three minutes long soTimeout = 5 * 60 * 1000; ServiceClient client = stub._getServiceClient(); Options option = client.getOptions(); option.setManageSession(true); option.setTimeOutInMilliSeconds(soTimeout); option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, sessionCookie); option.setTo(new EndpointReference( backendURL + client.getServiceContext().getAxisService().getName().replaceAll("[^a-zA-Z]", ""))); return stub; }
private boolean isAuthenticated(String remoteIP) { OperationContext opCtx = msgContext.getOperationContext(); ServiceContext serviceCtx = opCtx.getServiceContext(); String opName = opCtx.getAxisOperation().getName().getLocalPart(); String serviceName = serviceCtx.getAxisService().getName(); if ((serviceName.equals(ServerConstants.GLOBAL_ADMIN_SERVICE) || serviceName.equals(ClusteringConstants.NODE_MANAGER_SERVICE)) && (opName.equals("login") || opName.equals("logout"))) { return true; } String loginStatus = (String) serviceCtx.getServiceGroupContext(). getPropertyNonReplicable(ServerConstants.ADMIN_LOGGED_IN); boolean authenticated = "true".equals(loginStatus); if(!authenticated){ SimpleDateFormat date = new SimpleDateFormat("'['yyyy-MM-dd HH:mm:ss,SSSS']'"); log.warn("Illegal access attempt at " + date.format(new Date()) + " from IP address " + remoteIP); } return authenticated; }
public AxisService findService(MessageContext messageContext) throws AxisFault { RelatesTo relatesTo = messageContext.getRelatesTo(); if (LoggingControl.debugLoggingAllowed && log.isDebugEnabled()) { log.debug(messageContext.getLogIDString() + " Checking for OperationContext using RelatesTo : " + relatesTo); } if ((relatesTo != null) && (relatesTo.getValue() != null)) { ConfigurationContext configurationContext = messageContext.getConfigurationContext(); OperationContext operationContext = configurationContext.getOperationContext(relatesTo.getValue()); if (operationContext != null) { if (LoggingControl.debugLoggingAllowed && log.isDebugEnabled()) { log.debug(messageContext.getLogIDString() + " Found OperationContext: " + operationContext); } return operationContext.getServiceContext().getAxisService(); } } return null; }
public AxisService findService(MessageContext messageContext) throws AxisFault { RelatesTo relatesTo = messageContext.getRelatesTo(); if (LoggingControl.debugLoggingAllowed && log.isDebugEnabled()) { log.debug(messageContext.getLogIDString() + " Checking for OperationContext using RelatesTo : " + relatesTo); } if ((relatesTo != null) && (relatesTo.getValue() != null)) { ConfigurationContext configurationContext = messageContext.getConfigurationContext(); OperationContext operationContext = configurationContext.getOperationContext(relatesTo.getValue()); if (operationContext != null) { if (LoggingControl.debugLoggingAllowed && log.isDebugEnabled()) { log.debug(messageContext.getLogIDString() + " Found OperationContext: " + operationContext); } return operationContext.getServiceContext().getAxisService(); } } return null; }
AxisService axisService = (AxisService) serviceItr.next(); ServiceContext serviceContext = serviceGroupContext.getServiceContext(axisService); AxisService service = serviceContext.getAxisService(); ClassLoader classLoader = service.getClassLoader(); Parameter implInfoParam = service.getParameter(Constants.SERVICE_CLASS);
AxisService axisService = (AxisService) serviceItr.next(); ServiceContext serviceContext = serviceGroupContext.getServiceContext(axisService); AxisService service = serviceContext.getAxisService(); ClassLoader classLoader = service.getClassLoader(); Parameter implInfoParam = service.getParameter(Constants.SERVICE_CLASS);
/** * @param context */ public void setServiceContext(ServiceContext context) { // allow the service context to be set to null // this allows the message context object to be extraced from // the object graph serviceContext = context; if (serviceContext != null) { if ((operationContext != null) && (operationContext.getParent() != context)) { throw new AxisError("ServiceContext and OperationContext.parent do not match!"); } // setting configcontext using configuration context in service context if (configurationContext == null) { // setting configcontext configurationContext = context.getConfigurationContext(); } if (serviceGroupContext == null) { // setting service group context serviceGroupContext = context.getServiceGroupContext(); } AxisService axisService = context.getAxisService(); this.setAxisService(axisService); // Inform the listeners of an attach event if (axisService != null) { axisService.attachServiceContextEvent(serviceContext, this); } } }
/** * @param context */ public void setServiceContext(ServiceContext context) { // allow the service context to be set to null // this allows the message context object to be extraced from // the object graph serviceContext = context; if (serviceContext != null) { if ((operationContext != null) && (operationContext.getParent() != context)) { throw new AxisError("ServiceContext and OperationContext.parent do not match!"); } // setting configcontext using configuration context in service context if (configurationContext == null) { // setting configcontext configurationContext = context.getConfigurationContext(); } if (serviceGroupContext == null) { // setting service group context serviceGroupContext = context.getServiceGroupContext(); } AxisService axisService = context.getAxisService(); this.setAxisService(axisService); // Inform the listeners of an attach event if (axisService != null) { axisService.attachServiceContextEvent(serviceContext, this); } } }
private static UpdateStateCommand toUpdateContextCommand(AbstractContext context) { UpdateStateCommand cmd = null; if (context instanceof ConfigurationContext) { cmd = new UpdateConfigurationStateCommand(); } else if (context instanceof ServiceGroupContext) { ServiceGroupContext sgCtx = (ServiceGroupContext) context; cmd = new UpdateServiceGroupStateCommand(); UpdateServiceGroupStateCommand updateSgCmd = (UpdateServiceGroupStateCommand) cmd; updateSgCmd.setServiceGroupName(sgCtx.getDescription().getServiceGroupName()); updateSgCmd.setServiceGroupContextId(sgCtx.getId()); } else if (context instanceof ServiceContext) { ServiceContext serviceCtx = (ServiceContext) context; cmd = new UpdateServiceStateCommand(); UpdateServiceStateCommand updateServiceCmd = (UpdateServiceStateCommand) cmd; String sgName = serviceCtx.getServiceGroupContext().getDescription().getServiceGroupName(); updateServiceCmd.setServiceGroupName(sgName); updateServiceCmd.setServiceGroupContextId(serviceCtx.getServiceGroupContext().getId()); updateServiceCmd.setServiceName(serviceCtx.getAxisService().getName()); } return cmd; }
private static UpdateStateCommand toUpdateContextCommand(AbstractContext context) { UpdateStateCommand cmd = null; if (context instanceof ConfigurationContext) { cmd = new UpdateConfigurationStateCommand(); } else if (context instanceof ServiceGroupContext) { ServiceGroupContext sgCtx = (ServiceGroupContext) context; cmd = new UpdateServiceGroupStateCommand(); UpdateServiceGroupStateCommand updateSgCmd = (UpdateServiceGroupStateCommand) cmd; updateSgCmd.setServiceGroupName(sgCtx.getDescription().getServiceGroupName()); updateSgCmd.setServiceGroupContextId(sgCtx.getId()); } else if (context instanceof ServiceContext) { ServiceContext serviceCtx = (ServiceContext) context; cmd = new UpdateServiceStateCommand(); UpdateServiceStateCommand updateServiceCmd = (UpdateServiceStateCommand) cmd; String sgName = serviceCtx.getServiceGroupContext().getDescription().getServiceGroupName(); updateServiceCmd.setServiceGroupName(sgName); updateServiceCmd.setServiceGroupContextId(serviceCtx.getServiceGroupContext().getId()); updateServiceCmd.setServiceName(serviceCtx.getAxisService().getName()); } return cmd; }
.getListenerManager().getEPRforService(sc.getAxisService().getName(), axisOp.getName().getLocalPart(), outMsgCtx.getTransportOut().getName());