本文整理汇总了Java中org.apache.axis.wsdl.toJava.Emitter类的典型用法代码示例。如果您正苦于以下问题:Java Emitter类的具体用法?Java Emitter怎么用?Java Emitter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Emitter类属于org.apache.axis.wsdl.toJava包,在下文中一共展示了Emitter类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: MyListPortsWriter
import org.apache.axis.wsdl.toJava.Emitter; //导入依赖的package包/类
/**
* Constructor.
*/
public MyListPortsWriter(
Emitter emitter,
ServiceEntry sEntry,
SymbolTable symbolTable) {
super(emitter, "service list");
this.service = sEntry.getService();
// Create the fully-qualified file name
String javaName = sEntry.getName();
fileName = emitter.getNamespaces().toDir(
Utils.getJavaPackageName(javaName))
+ Utils.getJavaLocalName(javaName) + ".lst";
}
示例2: MyDeployWriter
import org.apache.axis.wsdl.toJava.Emitter; //导入依赖的package包/类
public MyDeployWriter(Emitter emitter, Definition definition,
SymbolTable symbolTable) {
super(emitter, "deploy");
// Create the fully-qualified file name
String dir = emitter.getNamespaces().getAsDir(
definition.getTargetNamespace());
filename = dir + "deploy.useless";
}
示例3: generateSymbolTable
import org.apache.axis.wsdl.toJava.Emitter; //导入依赖的package包/类
public void generateSymbolTable() throws Exception {
if ((this.info.getServices() != null) && (this.info.getServices().getService() != null)) {
for (int serviceI = 0; serviceI < this.info.getServices().getService().length; serviceI++) {
ServiceType service = this.info.getServices().getService(serviceI);
Emitter parser = new Emitter();
SymbolTable table = null;
parser.setQuiet(true);
// parser.setAllWanted(true);
parser.setImports(true);
List excludeList = new ArrayList();
// one hammer(List), one solution
excludeList.addAll(this.excludedSet);
parser.setNamespaceExcludes(excludeList);
parser.setOutputDir(SyncTools.this.baseDirectory.getAbsolutePath() + File.separator + "tmp");
parser.setNStoPkg(SyncTools.this.baseDirectory.getAbsolutePath() + File.separator + "build"
+ File.separator + IntroduceConstants.NAMESPACE2PACKAGE_MAPPINGS_FILE);
// allow configuration of the WSDL2Java parsing timeout. values < 0 == never timeout
String timeoutString = IntroducePropertiesManager.getIntroducePropertyValue(
IntroduceConstants.INTRODUCE_WSDL_2_JAVA_TIMEOUT_PRPOERTY);
if (timeoutString != null) {
try {
long timeout = Long.parseLong(timeoutString);
parser.setTimeout(timeout);
logger.debug("Set WSDL 2 Java parser timeout to " + timeout + " ms");
} catch (Exception ex) {
logger.warn("Error reading introduce property "
+ IntroduceConstants.INTRODUCE_WSDL_2_JAVA_TIMEOUT_PRPOERTY
+ " with value " + timeoutString);
}
}
try {
parser.run(new File(SyncTools.this.baseDirectory.getAbsolutePath()
+ File.separator
+ "build"
+ File.separator
+ "schema"
+ File.separator
+ this.info.getIntroduceServiceProperties().get(
IntroduceConstants.INTRODUCE_SKELETON_SERVICE_NAME) + File.separator
+ service.getName() + ".wsdl").getAbsolutePath());
} catch (Exception e) {
logger.error(e.getMessage(), e);
}
table = parser.getSymbolTable();
this.symbolTables.add(table);
parser = null;
System.gc();
}
}
Utils.deleteDir(new File(SyncTools.this.baseDirectory.getAbsolutePath() + File.separator + "tmp"));
}