325N/A public MetadataFinder(InternalizationLogic logic, WsimportOptions options, ErrorReceiver errReceiver) {
325N/A if (doc.getNamespaceURI() == null || !doc.getNamespaceURI().equals(WSDLConstants.NS_WSDL) || !doc.getLocalName().equals("definitions")) {
325N/A com.sun.xml.internal.ws.wsdl.parser.WSDLConstants.QNAME_DEFINITIONS, doc.getNodeName(), locatorTable.getStartLocation(doc).getLineNumber()), locatorTable.getStartLocation(doc));
325N/A } catch(FileNotFoundException e){
325N/A } catch (IOException e) {
325N/A } catch (SAXParseException e) {
325N/A } catch (SAXException e) {
325N/A public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException {
325N/A } catch (IOException e) {
325N/A errorReceiver.error(new SAXParseException(WscompileMessages.WSIMPORT_AUTH_INFO_NEEDED(e.getMessage(),
325N/A throw new AbortException();
325N/A //Need to redesign this a bit as we need to throw better error message for IOException in this case
325N/A errorReceiver.info(new SAXParseException(WscompileMessages.WSIMPORT_HTTP_REDIRECT(code, seeOther.get(0)), null));
325N/A errorReceiver.error(new SAXParseException(WscompileMessages.WSIMPORT_MAX_REDIRECT_ATTEMPT(), null));
325N/A throw new AbortException();
325N/A return inputSource;
325N/A * Gives the root wsdl document systemId. A root wsdl document is the one which has wsdl:service.
325N/A * Identifies WSDL documents from the {@link DOMForest}. Also identifies the root wsdl document.
325N/A if(definition == null || definition.getLocalName() == null || definition.getNamespaceURI() == null)
325N/A if(definition.getNamespaceURI().equals(WSDLConstants.NS_WSDL) && definition.getLocalName().equals("definitions")){
325N/A for (MetadataResolverFactory resolverFactory : ServiceFinder.find(MetadataResolverFactory.class)) {
325N/A } catch (URISyntaxException e) {
325N/A throw new ParseException(e);
325N/A errorReceiver.warning(new SAXParseException(WsdlMessages.TRY_WITH_MEX(ex.getMessage()), null, ex));
325N/A errorReceiver.error(null, WsdlMessages.PARSING_UNABLE_TO_GET_METADATA(ex.getMessage(), WscompileMessages.WSIMPORT_NO_WSDL(systemId)), ex);
325N/A private Element parseMetadata(@NotNull String systemId, @NotNull ServiceDescriptor serviceDescriptor) {
325N/A// Element e = (n.getNodeType() == Node.ELEMENT_NODE)?(Element)n: DOMUtil.getFirstElementChild(n);
325N/A NodeList nl = doc.getDocumentElement().getElementsByTagNameNS(WSDLConstants.NS_WSDL, "service");
325N/A NodeList nl = doc.getDocumentElement().getElementsByTagNameNS(WSDLConstants.NS_WSDL, "import");
325N/A isMexMetadata = true;
325N/A Element e = (n.getNodeType() == Node.ELEMENT_NODE) ? (Element) n : DOMUtil.getFirstElementChild(n);