use of org.apache.axis2.context.ConfigurationContext in project tdi-studio-se by Talend.
the class MSCRMClient method getConfigurationContext.
private static ConfigurationContext getConfigurationContext() throws AxisFault {
String workingDirectory = System.getProperty("user.dir");
String fileSeperator = System.getProperty("file.separator");
String pathToAxis2File = workingDirectory + fileSeperator + "src" + fileSeperator + "axis2.xml";
logger.debug("Working directory: " + workingDirectory);
logger.debug("Path to Axis2.xml file: " + pathToAxis2File);
ConfigurationContext ctx;
try {
// ctx = ConfigurationContextFactory.createConfigurationContextFromFileSystem(workingDirectory,
// pathToAxis2File);
ctx = ConfigurationContextFactory.createConfigurationContextFromURIs(MSCRMClient.class.getClassLoader().getResource("org/talend/ms/crm/sdk/axis2_mscrm.xml"), null);
} catch (AxisFault e) {
logger.error(e.getMessage());
throw e;
}
return ctx;
}
use of org.apache.axis2.context.ConfigurationContext in project MassBank-web by MassBank.
the class AdminActions method viewServiceGroupContext.
@Action(name = "viewServiceGroupContext")
public View viewServiceGroupContext(HttpServletRequest req) {
String type = req.getParameter("TYPE");
String sgID = req.getParameter("ID");
ServiceGroupContext sgContext = configContext.getServiceGroupContext(sgID);
req.getSession().setAttribute("ServiceGroupContext", sgContext);
req.getSession().setAttribute("TYPE", type);
req.getSession().setAttribute("ConfigurationContext", configContext);
return new View("viewServiceGroupContext.jsp");
}
use of org.apache.axis2.context.ConfigurationContext in project wso2-axis2-transports by wso2.
the class UDPTest method getClientCfgCtx.
public ConfigurationContext getClientCfgCtx() throws Exception {
ConfigurationContext cfgCtx = ConfigurationContextFactory.createConfigurationContext(new CustomAxisConfigurator());
AxisConfiguration axisCfg = cfgCtx.getAxisConfiguration();
axisCfg.engageModule("addressing");
TransportInDescription trpInDesc = new TransportInDescription("udp");
trpInDesc.setReceiver(new UDPListener());
axisCfg.addTransportIn(trpInDesc);
TransportOutDescription trpOutDesc = new TransportOutDescription("udp");
trpOutDesc.setSender(new UDPSender());
axisCfg.addTransportOut(trpOutDesc);
return cfgCtx;
}
use of org.apache.axis2.context.ConfigurationContext in project wso2-axis2-transports by wso2.
the class XMPPSender method init.
/**
* Initialize the transport sender by reading pre-defined connection factories for
* outgoing messages. These will create sessions (one per each destination dealt with)
* to be used when messages are being sent.
* @param confContext the configuration context
* @param transportOut the transport sender definition from axis2.xml
* @throws AxisFault on error
*/
public void init(ConfigurationContext confContext, TransportOutDescription transportOut) throws AxisFault {
// if connection details are available from axis configuration
// use those & connect to jabber server(s)
serverCredentials = new XMPPServerCredentials();
getConnectionDetailsFromAxisConfiguration(transportOut);
defaultConnectionFactory = new XMPPConnectionFactory();
}
use of org.apache.axis2.context.ConfigurationContext in project wso2-axis2-transports by wso2.
the class AbstractTransportTest method getClientCfgCtx.
/**
* Get the default axis2 configuration context for a client
* @return
* @throws Exception
*/
protected ConfigurationContext getClientCfgCtx() throws Exception {
AxisConfiguration axisCfg = new AxisConfiguration();
ConfigurationContext cfgCtx = new ConfigurationContext(axisCfg);
return cfgCtx;
}
Aggregations