本文整理汇总了Java中com.sun.xml.internal.ws.api.wsdl.parser.ServiceDescriptor类的典型用法代码示例。如果您正苦于以下问题:Java ServiceDescriptor类的具体用法?Java ServiceDescriptor怎么用?Java ServiceDescriptor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ServiceDescriptor类属于com.sun.xml.internal.ws.api.wsdl.parser包,在下文中一共展示了ServiceDescriptor类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getFromMetadataResolver
import com.sun.xml.internal.ws.api.wsdl.parser.ServiceDescriptor; //导入依赖的package包/类
private @Nullable Element getFromMetadataResolver(String systemId, Exception ex) {
//try MEX
MetaDataResolver resolver;
ServiceDescriptor serviceDescriptor = null;
for (MetadataResolverFactory resolverFactory : ServiceFinder.find(MetadataResolverFactory.class)) {
resolver = resolverFactory.metadataResolver(options.entityResolver);
try {
serviceDescriptor = resolver.resolve(new URI(systemId));
//we got the ServiceDescriptor, now break
if (serviceDescriptor != null)
break;
} catch (URISyntaxException e) {
throw new ParseException(e);
}
}
if (serviceDescriptor != null) {
errorReceiver.warning(new SAXParseException(WsdlMessages.TRY_WITH_MEX(ex.getMessage()), null, ex));
return parseMetadata(systemId, serviceDescriptor);
} else {
errorReceiver.error(null, WsdlMessages.PARSING_UNABLE_TO_GET_METADATA(ex.getMessage(), WscompileMessages.WSIMPORT_NO_WSDL(systemId)), ex);
}
return null;
}