本文整理汇总了Java中com.sun.xml.internal.ws.wsdl.writer.document.Import类的典型用法代码示例。如果您正苦于以下问题:Java Import类的具体用法?Java Import怎么用?Java Import使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Import类属于com.sun.xml.internal.ws.wsdl.writer.document包,在下文中一共展示了Import类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createOutputFile
import com.sun.xml.internal.ws.wsdl.writer.document.Import; //导入依赖的package包/类
/**
* Creates the {@link Result} object used by JAXB to generate a schema for the
* namesapceUri namespace.
* @param namespaceUri The namespace for the schema being generated
* @param suggestedFileName the JAXB suggested file name for the schema file
* @return the {@link Result} for JAXB to generate the schema into
* @throws java.io.IOException thrown if on IO error occurs
*/
public Result createOutputFile(String namespaceUri, String suggestedFileName) throws IOException {
Result result;
if (namespaceUri == null) {
return null;
}
Holder<String> fileNameHolder = new Holder<String>();
fileNameHolder.value = schemaPrefix + suggestedFileName;
result = wsdlResolver.getSchemaOutput(namespaceUri, fileNameHolder);
// System.out.println("schema file: "+fileNameHolder.value);
// System.out.println("result: "+result);
String schemaLoc;
if (result == null)
schemaLoc = fileNameHolder.value;
else
schemaLoc = relativize(result.getSystemId(), wsdlLocation);
boolean isEmptyNs = namespaceUri.trim().equals("");
if (!isEmptyNs) {
com.sun.xml.internal.ws.wsdl.writer.document.xsd.Import _import = types.schema()._import();
_import.namespace(namespaceUri);
_import.schemaLocation(schemaLoc);
}
return result;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:33,代码来源:WSDLGenerator.java
示例2: createOutputFile
import com.sun.xml.internal.ws.wsdl.writer.document.Import; //导入依赖的package包/类
/**
* Creates the {@link Result} object used by JAXB to generate a schema for the
* namesapceUri namespace.
* @param namespaceUri The namespace for the schema being generated
* @param suggestedFileName the JAXB suggested file name for the schema file
* @return the {@link Result} for JAXB to generate the schema into
* @throws java.io.IOException thrown if on IO error occurs
*/
public Result createOutputFile(String namespaceUri, String suggestedFileName) throws IOException {
Result result;
if (namespaceUri.equals("")) {
return null;
}
com.sun.xml.internal.ws.wsdl.writer.document.xsd.Import _import = types.schema()._import().namespace(namespaceUri);
Holder<String> fileNameHolder = new Holder<String>();
fileNameHolder.value = schemaPrefix+suggestedFileName;
result = wsdlResolver.getSchemaOutput(namespaceUri, fileNameHolder);
// System.out.println("schema file: "+fileNameHolder.value);
// System.out.println("result: "+result);
String schemaLoc;
if (result == null)
schemaLoc = fileNameHolder.value;
else
schemaLoc = relativize(result.getSystemId(), wsdlLocation);
// System.out.println("schemaLoca: "+schemaLoc);
_import.schemaLocation(schemaLoc);
return result;
}
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:30,代码来源:WSDLGenerator.java
注:本文中的com.sun.xml.internal.ws.wsdl.writer.document.Import类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论