当前位置: 首页>>代码示例>>Java>>正文


Java AxisConfiguration.getTransportOut方法代码示例

本文整理汇总了Java中org.apache.axis2.engine.AxisConfiguration.getTransportOut方法的典型用法代码示例。如果您正苦于以下问题:Java AxisConfiguration.getTransportOut方法的具体用法?Java AxisConfiguration.getTransportOut怎么用?Java AxisConfiguration.getTransportOut使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.axis2.engine.AxisConfiguration的用法示例。


在下文中一共展示了AxisConfiguration.getTransportOut方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: loadTransportProperties

import org.apache.axis2.engine.AxisConfiguration; //导入方法依赖的package包/类
private static Properties loadTransportProperties() throws Exception {
	
	transportProperties = new Properties();

	try {
		ConfigurationContext configContext = CarbonConfigurationContextFactory.getConfigurationContext();
		AxisConfiguration axisConfig = configContext.getAxisConfiguration();
		TransportOutDescription mailto = axisConfig.getTransportOut("mailto"); 
		ArrayList<Parameter> parameters = mailto.getParameters();
		
           for (Parameter parameter : parameters) {
			String prop = parameter.getName();
			String value = (String)parameter.getValue();
			transportProperties.setProperty(prop, value);
		}
	}
	catch (Exception e) {
		throw e;
	}
	
	return transportProperties;
}
 
开发者ID:vasttrafik,项目名称:wso2-community-api,代码行数:23,代码来源:MailUtil.java

示例2: testTransports

import org.apache.axis2.engine.AxisConfiguration; //导入方法依赖的package包/类
public void testTransports() throws AxisFault,
        PhaseException,
        DeploymentException,
        XMLStreamException {
    String repositoryName = AbstractTestCase.basedir + "/target/test-resources/deployment";
    File repo = new File(repositoryName);
    String xmlFile = repositoryName + "/server-transport.xml";
    File xml = new File(xmlFile);
    FileSystemConfigurator fsc =
            new FileSystemConfigurator(repo.getAbsolutePath(), xml.getAbsolutePath());
    AxisConfiguration er = fsc.getAxisConfiguration();
    TransportOutDescription transport1 = er.getTransportOut("custom");
    assertNotNull(transport1);
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:15,代码来源:TransportDeploymentTest.java

示例3: setSenderTransport

import org.apache.axis2.engine.AxisConfiguration; //导入方法依赖的package包/类
/**
 * Set transport used for outgoing message.
 *
 * @param senderTransport   transport name in Axis2 configuration
 *                          ("http", "tcp", etc.)
 * @param axisConfiguration
 * @throws AxisFault if the transport is not found
 */
public void setSenderTransport(String senderTransport,
                               AxisConfiguration axisConfiguration) throws AxisFault {
    this.transportOut = axisConfiguration.getTransportOut(senderTransport);

    if (senderTransport == null) {
        throw new AxisFault(Messages.getMessage("unknownTransport",
                                                senderTransport));
    }
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:18,代码来源:Options.java


注:本文中的org.apache.axis2.engine.AxisConfiguration.getTransportOut方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。