本文整理汇总了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;
}
示例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);
}
示例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));
}
}