private synchronized Axis2BlockingClient getSender() { if (sender != null) { return sender; } String axis2repo = (String) parameters.get(ForwardingProcessorConstants.AXIS2_REPO); String axis2Config = (String) parameters.get(ForwardingProcessorConstants.AXIS2_CONFIG); return new Axis2BlockingClient(axis2repo, axis2Config); }
public void destroy() { if (!isWrappingEndpointCreated) { endpoint.destroy(); } try { blockingMsgSender.cleanup(); } catch (AxisFault ignore) {} }
public Axis2BlockingClient(String clientRepository, String axis2xml) { try { configurationContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem( clientRepository != null ? clientRepository : DEFAULT_CLIENT_REPO, axis2xml != null ? axis2xml : DEFAULT_AXIS2_XML); configurationContextCreated = true; } catch (AxisFault e) { handleException("Error initializing Axis2 Blocking Client", e); } }
handleException("Endpoint type not supported. Only leaf endpoints are supported"); endpointReferenceValue = axisInMsgCtx.getTo().getAddress(); } else { handleException("Service url, Endpoint or 'To' header is required"); boolean isOutOnly = isOutOnly(synapseInMsgCtx, axisOutMsgCtx); try { if (isOutOnly) { log.debug("invoking service in OUT_ONLY manner"); sendRobust(axisOutMsgCtx, clientOptions, anonymousService, serviceCtx); } else { if (log.isDebugEnabled()) { log.debug("invoking service in OUT_IN manner"); org.apache.axis2.context.MessageContext result = sendReceive(axisOutMsgCtx, clientOptions, anonymousService, serviceCtx); synapseInMsgCtx.setEnvelope(result.getEnvelope()); handleException("Error sending Message to url : " + ((AbstractEndpoint) endpoint).getDefinition().getAddress());
public void init(SynapseEnvironment synEnv) { blockingMsgSender = new Axis2BlockingClient(clientRepository, axis2xml); blockingMsgSender.setInitClientOptions(initClientOptions);
if ((ep != null) && (((AbstractEndpoint) ep).isLeafEndpoint())) { try { sender.send(ep, messageContext);
MessageContext outCtx = sender.send(ep, messageContext);
try { if ("true".equals(synCtx.getProperty(SynapseConstants.OUT_ONLY))) { blockingMsgSender.send(endpoint, synapseOutMsgCtx); } else { resultMsgCtx = blockingMsgSender.send(endpoint, synapseOutMsgCtx); if ("true".equals(resultMsgCtx.getProperty(SynapseConstants.BLOCKING_CLIENT_ERROR))) { handleFault(synCtx, (Exception) synCtx.getProperty(SynapseConstants.ERROR_EXCEPTION));