本文整理汇总了Java中com.sun.xml.internal.ws.api.wsdl.parser.MetadataResolverFactory.metadataResolver方法的典型用法代码示例。如果您正苦于以下问题:Java MetadataResolverFactory.metadataResolver方法的具体用法?Java MetadataResolverFactory.metadataResolver怎么用?Java MetadataResolverFactory.metadataResolver使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sun.xml.internal.ws.api.wsdl.parser.MetadataResolverFactory
的用法示例。
在下文中一共展示了MetadataResolverFactory.metadataResolver方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getFromMetadataResolver
import com.sun.xml.internal.ws.api.wsdl.parser.MetadataResolverFactory; //导入方法依赖的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;
}