/** * Returns the Axis2 message context from the Synapse message context. * @param messageContext * @return Axis2 message context. */ @SuppressWarnings("unused") private org.apache.axis2.context.MessageContext getAxis2MessageContext(MessageContext messageContext){ return ((Axis2MessageContext) messageContext).getAxis2MessageContext(); }
/** * Constructor for the Axis2MessageContext inside Synapse * * @param axisMsgCtx MessageContext representing the relevant Axis MC * @param synCfg SynapseConfiguraion describing Synapse * @param synEnv SynapseEnvironment describing the environment of Synapse */ public Axis2MessageContext(org.apache.axis2.context.MessageContext axisMsgCtx, SynapseConfiguration synCfg, SynapseEnvironment synEnv) { setAxis2MessageContext(axisMsgCtx); this.synCfg = synCfg; this.synEnv = synEnv; }
public Axis2SynapseEnvironment(ConfigurationContext cfgCtx, SynapseConfiguration synapseConfig, ServerContextInformation contextInformation) { this(cfgCtx, synapseConfig); this.contextInformation = contextInformation; setSeverDebugMode(contextInformation); }
private void buildMessage(MessageContext synCtx) { try { RelayUtils.buildMessage(((Axis2MessageContext) synCtx).getAxis2MessageContext(), false); } catch (Exception e) { handleException("Error while building message", e); } }
public void testSOAP11To12Conversion() throws Exception { MessageContext msgCtx = TestUtils.getAxis2MessageContext("<test/>", null). getAxis2MessageContext(); msgCtx.setEnvelope(getSOAP11Envelope()); SOAPUtils.convertSOAP11toSOAP12(msgCtx); assertXMLEqual(getSOAP12Envelope().toString(), msgCtx.getEnvelope().toString()); }
public void testSOAP12To11Conversion() throws Exception { MessageContext msgCtx = TestUtils.getAxis2MessageContext("<test/>", null). getAxis2MessageContext(); msgCtx.setEnvelope(getSOAP12Envelope()); SOAPUtils.convertSOAP12toSOAP11(msgCtx); assertXMLEqual(getSOAP11Envelope().toString(), msgCtx.getEnvelope().toString()); }
@Override /** * Figure out the real endpoint we proxy for, and make sure its initialized */ public void init(SynapseEnvironment synapseEnvironment) { ConfigurationContext cc = ((Axis2SynapseEnvironment) synapseEnvironment).getAxis2ConfigurationContext(); reLoadAndInitEndpoint(cc); }
/** * Returns the number of current callbacks. * * @return the number of current callbacks. */ public int getCallbackCount() { if (synapseCallbackReceiver != null) { return synapseCallbackReceiver.getCallbackCount(); } return 0; }
public OperationClient createClient(ServiceContext sc, Options options) { return new DynamicOperationClient(this, sc, options); }
/** * Creates an AxisService for the requested QoS for sending out messages * Callers must guarantee that if wsRMon or wsSecOn is required, that wsAddrOn is also set * * @param synCfg Synapse configuration * @param axisCfg Axis2 configuration * @param wsAddrOn whether addressing is on or not * @param wsSecOn whether security is on or not * @return An Axis service for the requested QoS */ public static AxisService getAnonymousService(SynapseConfiguration synCfg, AxisConfiguration axisCfg, boolean wsAddrOn, boolean wsSecOn) { return getAnonymousService(synCfg, axisCfg, wsAddrOn, wsSecOn, true); }
public String[] getPendingCallbacks() { return receiver.getPendingCallbacks(); } }
/** * Checks if the timeout has expired for each callback in the callback store. If expired, removes * the callback. If specified sends a fault message to the client about the timeout. */ public void run() { if (alreadyExecuting) return; synchronized(lock) { alreadyExecuting = true; try { processCallbacks(); } catch (Exception ignore) {} alreadyExecuting = false; } }
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); }
/** * Write to the general log, as well as any service specific logs the audit message at INFO * @param message the INFO level audit message */ private void auditInfo(String message) { log.info(message); serviceLog.info(message); if (trace()) { trace.info(message); } }
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); } }
private void buildMessage(MessageContext synCtx) { try { RelayUtils.buildMessage(((Axis2MessageContext) synCtx).getAxis2MessageContext(), false); } catch (Exception e) { handleException("Error while building message", e); } }
protected org.apache.axis2.context.MessageContext getAxis2MessageContext(Axis2MessageContext messageContext) { return messageContext. getAxis2MessageContext(); }
public int getCallbackCount() { return receiver.getCallbackCount(); }
public OperationClient createClient(ServiceContext sc, Options options) { return new DynamicOperationClient(this, sc, options); }
/** * Creates an AxisService for the requested QoS for sending out messages * Callers must guarantee that if wsRMon or wsSecOn is required, that wsAddrOn is also set * @param synCfg Synapse configuration * @param axisCfg Axis2 configuration * @param wsAddrOn whether addressing is on or not * @param wsRMOn whether RM is on ot not * @param wsSecOn whether security is on or not * @return An Axis service for the requested QoS */ public static AxisService getAnonymousService(SynapseConfiguration synCfg, AxisConfiguration axisCfg, boolean wsAddrOn, boolean wsRMOn, boolean wsSecOn) { return getAnonymousService(synCfg, axisCfg, wsAddrOn, wsRMOn, wsSecOn, true); }