protected void setErrorOnMessage(MessageContext synCtx, Integer errorCode, String errorMsg) { Map<String, Integer> mEndpointLog = (Map<String, Integer>) synCtx.getProperty(SynapseConstants.ENDPOINT_LOG); if (mEndpointLog != null) { AbstractEndpoint lastEndpoint = (AbstractEndpoint) synCtx.getProperty(SynapseConstants.LAST_ENDPOINT); Object oErrorCode = synCtx.getProperty(SynapseConstants.ERROR_CODE); if (lastEndpoint != null && lastEndpoint.getName() != null && oErrorCode != null) { try { mEndpointLog.put(lastEndpoint.getName(), (Integer) oErrorCode); } catch (NumberFormatException nfe) { log.error("Unable to get the error code for endpoint"); } } } synCtx.setProperty(SynapseConstants.ERROR_CODE, errorCode); synCtx.setProperty(SynapseConstants.ERROR_MESSAGE, errorMsg); synCtx.setProperty(SynapseConstants.ERROR_DETAIL, errorMsg); synCtx.setProperty(SynapseConstants.ERROR_EXCEPTION, errorMsg); }
public void init(SynapseEnvironment synapseEnvironment) { ConfigurationContext cc = ((Axis2SynapseEnvironment) synapseEnvironment).getAxis2ConfigurationContext(); if (!initialized) { // The check for clustering environment ClusteringAgent clusteringAgent = cc.getAxisConfiguration().getClusteringAgent(); if (clusteringAgent != null && clusteringAgent.getStateManager() != null) { isClusteringEnabled = Boolean.TRUE; } else { isClusteringEnabled = Boolean.FALSE; } context = new EndpointContext(getName(), getDefinition(), isClusteringEnabled, cc, metricsMBean); } initialized = true; if (children != null) { for (Endpoint e : children) { e.init(synapseEnvironment); } } contentAware = definition != null && ((definition.getFormat() != null && !definition.getFormat().equals(SynapseConstants.FORMAT_REST)) || definition.isSecurityOn() || definition.isAddressingOn()); }
public void init(SynapseEnvironment synapseEnvironment) { ConfigurationContext cc = ((Axis2SynapseEnvironment) synapseEnvironment).getAxis2ConfigurationContext(); if (!initialized) { // The check for clustering environment ClusteringAgent clusteringAgent = cc.getAxisConfiguration().getClusteringAgent(); if (clusteringAgent != null && clusteringAgent.getStateManager() != null) { isClusteringEnabled = Boolean.TRUE; } else { isClusteringEnabled = Boolean.FALSE; } context = new EndpointContext(getName(), getDefinition(), isClusteringEnabled, cc, metricsMBean); } initialized = true; if (children != null) { for (Endpoint e : children) { e.init(synapseEnvironment); } } contentAware = definition != null && ((definition.getFormat() != null && !definition.getFormat().equals(SynapseConstants.FORMAT_REST)) || definition.isSecurityOn() || definition.isReliableMessagingOn() || definition.isAddressingOn() || definition.isUseMTOM()|| definition.isUseSwa()); }
getName() + " resolving to address = " + address); traceOrDebug(traceOn, "SOAPAction: " + (synCtx.getSoapAction() != null ? synCtx.getSoapAction() : "null"));
getName() + " resolving to address = " + address); traceOrDebug(traceOn, "SOAPAction: " + (synCtx.getSoapAction() != null ? synCtx.getSoapAction() : "null"));