public ConfigurationContext getConfigurationContext() { if (msgContext == null) return null; return msgContext.getConfigurationContext(); }
private void setDoingMTOM(boolean value) { if (value) { m_msgCtx.getConfigurationContext().setProperty( org.apache.axis2.Constants.Configuration.ENABLE_MTOM, org.apache.axis2.Constants.VALUE_TRUE); } else { m_msgCtx.getConfigurationContext().setProperty( org.apache.axis2.Constants.Configuration.ENABLE_MTOM, org.apache.axis2.Constants.VALUE_FALSE); } }
private String getFilePathFromArchiveId(String archiveId) { ConfigurationContext configCtx = MessageContext.getCurrentMessageContext().getConfigurationContext(); Map fileResMap = (Map) configCtx.getProperty(org.wso2.wsas.ServerConstants.FILE_RESOURCE_MAP); return (String) fileResMap.get(archiveId); }
private String getFilePathFromFileId(String fileId) { ConfigurationContext configCtx = MessageContext.getCurrentMessageContext().getConfigurationContext(); Map fileResMap = (Map) configCtx.getProperty(ServerConstants.FILE_RESOURCE_MAP); return (String) fileResMap.get(fileId); } }
/** * Get the real endpoint * * @param synCtx Message Context * @return real endpoint which is referred by the indirect endpoint */ public Endpoint getRealEndpoint(MessageContext synCtx) { reLoadAndInitEndpoint(((Axis2MessageContext) synCtx). getAxis2MessageContext().getConfigurationContext()); return realEndpoint; }
public static boolean isInOrder(MessageContext context) throws SandeshaException { if (LoggingControl.isAnyTracingEnabled() && log.isDebugEnabled()) log.debug("Enter: SandeshaUtil::isInOrder"); SandeshaPolicyBean policy = getPropertyBean(context.getConfigurationContext().getAxisConfiguration()); boolean result = policy.isInOrder(); if (LoggingControl.isAnyTracingEnabled() && log.isDebugEnabled()) log.debug("Enter: SandeshaUtil::isInOrder, " + result); return result; }
private static SynapseConfiguration getSynapseConfiguration( org.apache.axis2.context.MessageContext axisMsgCtx) { AxisConfiguration axisCfg = axisMsgCtx.getConfigurationContext().getAxisConfiguration(); Parameter param = axisCfg.getParameter(SynapseConstants.SYNAPSE_CONFIG); if (param != null) { return (SynapseConfiguration) param.getValue(); } return null; }
private static SynapseEnvironment getSynapseEnvironment( org.apache.axis2.context.MessageContext axisMsgCtx) { AxisConfiguration axisCfg = axisMsgCtx.getConfigurationContext().getAxisConfiguration(); Parameter param = axisCfg.getParameter(SynapseConstants.SYNAPSE_ENV); if (param != null) { return (SynapseEnvironment) param.getValue(); } return null; } }
private Phase getAddressingPhase(MessageContext context) { if (addressingPhase == null) { List<Phase> inFlowPhases = context.getConfigurationContext().getAxisConfiguration().getPhasesInfo() .getINPhases(); for (Phase p : inFlowPhases) { if (p.getName().equalsIgnoreCase("Addressing")) { addressingPhase = p; } } } return addressingPhase; }
public void serverRegistered() { ConfigurationContext configCtx = MessageContext.getCurrentMessageContext().getConfigurationContext(); configCtx.setProperty(ServerConstants.SERVER_REGISTERED, "true"); pm.updateConfigurationProperty(ServerConstants.SERVER_REGISTERED, "true"); }
private Phase getAddressingPhase(MessageContext context) { if (addressingPhase == null) { List<Phase> inFlowPhases = context.getConfigurationContext().getAxisConfiguration().getPhasesInfo() .getINPhases(); for (Phase p : inFlowPhases) { if (p.getName().equalsIgnoreCase("Addressing")) { addressingPhase = p; } } } return addressingPhase; }
@Override protected MessageContext process(MessageContext inMsgContext, String operationName) throws AxisFault { ProcessingContext processingContext = builder.build(inMsgContext, WsEventingOperations.PUBLISH); try { WsmgConfigurationContext brokerConfigContext = (WsmgConfigurationContext) inMsgContext .getConfigurationContext().getProperty(WsmgCommonConstants.BROKER_WSMGCONFIG); brokerConfigContext.getNotificationProcessor().processMsg(processingContext, NameSpaceConstants.WSE_NS); } catch (Exception e) { throw new AxisFault("unable to process message", e); } return createOutputMessageContext(inMsgContext, processingContext); }
@Override protected MessageContext process(MessageContext inMsgContext, String operationName) throws AxisFault { ProcessingContext processingContext = builder.build(inMsgContext, WsEventingOperations.PUBLISH); try { WsmgConfigurationContext brokerConfigContext = (WsmgConfigurationContext) inMsgContext .getConfigurationContext().getProperty(WsmgCommonConstants.BROKER_WSMGCONFIG); brokerConfigContext.getNotificationProcessor().processMsg(processingContext, NameSpaceConstants.WSE_NS); } catch (Exception e) { throw new AxisFault("unable to process message", e); } return createOutputMessageContext(inMsgContext, processingContext); }
@Override public AxisService findService(final MessageContext msgCtx) throws AxisFault { AxisService axisService = msgCtx.getAxisService(); if (axisService != null) return axisService; else if (msgCtx.getTo().getAddress().endsWith("msh")) return msgCtx.getConfigurationContext().getAxisConfiguration().getService("as4"); else return null; }
private ClusteringAgent getClusteringAgent() throws AxisFault { AxisConfiguration axisConfig = MessageContext.getCurrentMessageContext(). getConfigurationContext().getAxisConfiguration(); ClusteringAgent clusterManager = axisConfig.getClusteringAgent(); if (clusterManager == null) { handleException("ClusteringAgent not enabled in axis2.xml file"); } return clusterManager; }
public void processMessage(MessageContext inMessageContext, InputStream in, OutputStream response) throws AxisFault { if (this.confContext == null) { this.confContext = inMessageContext.getConfigurationContext(); } this.inMessageContext = inMessageContext; EndpointReference to = inMessageContext.getTo(); String action = inMessageContext.getOptions().getAction(); processMessage(in, to, action, response); }
private String getOriginalServiceName(MessageContext messageContext) { String toAddress = messageContext.getTo().getAddress(); String[] values = Utils.parseRequestURLForServiceAndOperation(toAddress, messageContext .getConfigurationContext().getServiceContextPath()); return values[0]; }
public void processMessage(MessageContext inMessageContext, InputStream in, OutputStream response) throws AxisFault { if (this.confContext == null) { this.confContext = inMessageContext.getConfigurationContext(); } this.inMessageContext = inMessageContext; EndpointReference to = inMessageContext.getTo(); String action = inMessageContext.getOptions().getAction(); processMessage(in, to, action, response); }
private InvocationResponse invokeMessageReceiver(MessageContext messageContext, AxisOperation operation) throws AxisFault { messageContext.getConfigurationContext(). fillServiceContextAndServiceGroupContext(messageContext); OperationContext opContext = operation.findOperationContext(messageContext, messageContext.getServiceContext()); messageContext.setOperationContext(opContext); operation.getMessageReceiver().receive(messageContext); return InvocationResponse.ABORT; }
public void registerOperationContext(MessageContext msgContext, OperationContext operationContext) throws AxisFault { msgContext.setAxisOperation(this); msgContext.getConfigurationContext().registerOperationContext(msgContext.getMessageID(), operationContext); operationContext.addMessageContext(msgContext); msgContext.setOperationContext(operationContext); if (operationContext.isComplete()) { operationContext.cleanup(); } }