/** * Create a new Anonymous Axis service for OUT-IN as default MEP * * @param synCfg the Synapse Configuration * @param axisCfg the Axis2 configuration * @param serviceKey key for the service * @return an anonymous service named with the given QoS key */ private static AxisService createAnonymousService(SynapseConfiguration synCfg, AxisConfiguration axisCfg, String serviceKey, boolean setCallback) { try { if (setCallback) { return createAxisServiceWithCallback(synCfg, axisCfg, serviceKey); } else { return createAxisServiceWithoutCallback(synCfg, axisCfg, serviceKey); } } catch (AxisFault e) { handleException("Error occurred while creating an anonymous service for QoS : " + serviceKey, e); } return null; }
/** * 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); }
/** * Create a new Anonymous Axis service for OUT-IN as default MEP * @param synCfg the Synapse Configuration * @param axisCfg the Axis2 configuration * @param serviceKey key for the service * @return an anonymous service named with the given QoS key */ private static AxisService createAnonymousService(SynapseConfiguration synCfg, AxisConfiguration axisCfg, String serviceKey, boolean setCallback) { try { if (setCallback) { return getAxisServiceWithCallback(synCfg, axisCfg, serviceKey); } else { return getAxisServiceWithoutCallback(synCfg, axisCfg, serviceKey); } } catch (AxisFault e) { handleException( "Error occured while creating an anonymous service for QoS : " + serviceKey, e); } return null; }
service = createAnonymousService(synCfg, axisCfg, servicekey, setCallback); handleException("Error retrieving anonymous service for QoS : " + servicekey, e);
public static AxisService getAnonymousService(AxisConfiguration axisCfg, String serviceKey) throws AxisFault { AxisService service = axisCfg.getService(serviceKey); if (service == null) { synchronized (AnonymousServiceFactory.class) { // double locking, issue found on performance test service = axisCfg.getService(serviceKey); if (service == null) { service = getAxisServiceWithoutCallback(null, axisCfg, serviceKey); } } } return service; } }
DynamicAxisOperation dynamicOperation = new DynamicAxisOperation(new QName(OUT_IN_OPERATION)); dynamicOperation.setMessageReceiver(getCallbackReceiver(synCfg, axisCfg)); AxisMessage inMsg = new AxisMessage(); inMsg.setName("in-message"); asyncOperation.setMessageReceiver(getCallbackReceiver(synCfg, axisCfg)); AxisMessage outOnlyMsg = new AxisMessage(); outOnlyMsg.setName("out-message");
service = createAnonymousService(synCfg, axisCfg, servicekey, setCallback); handleException("Error retrieving anonymous service for QoS : " + servicekey, e);
/** * 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); }
configurationContext = axisInMsgCtx.getConfigurationContext(); anonymousService = AnonymousServiceFactory.getAnonymousService( configurationContext.getAxisConfiguration(), LOCAL_ANON_SERVICE); } else { anonymousService = AnonymousServiceFactory.getAnonymousService( null, configurationContext.getAxisConfiguration(),
AxisService anonymousService = AnonymousServiceFactory.getAnonymousService(null, configurationContext.getAxisConfiguration(), endpointDefinition.isAddressingOn(), endpointDefinition.isSecurityOn(), false);
AnonymousServiceFactory.getAnonymousService(synapseOutMessageContext.getConfiguration(), axisCfg, wsAddressingEnabled, wsRMEnabled, wsSecurityEnabled);
AnonymousServiceFactory.getAnonymousService(synapseOutMessageContext.getConfiguration(), axisCfg, wsAddressingEnabled, wsSecurityEnabled);
configurationContext = axisInMsgCtx.getConfigurationContext(); anonymousService = AnonymousServiceFactory.getAnonymousService( configurationContext.getAxisConfiguration(), LOCAL_ANON_SERVICE); } else { anonymousService = AnonymousServiceFactory.getAnonymousService( null, configurationContext.getAxisConfiguration(),