Package org.apache.woden

Examples of org.apache.woden.WSDLException


               
            } catch (MalformedURLException e) {
               
                String msg = getErrorReporter().getFormattedMessage(
                        "WSDL502", new Object[] {null, baseURI.toString()});
                throw new WSDLException(WSDLException.PARSER_ERROR, msg, e);
            }
            wsdlURL = url.toString();
        }
       
        if(source instanceof Element) {
            return readWSDL(wsdlURL, (Element)source);
        }
        else if(source instanceof Document) {
            return readWSDL(wsdlURL, (Document)source);
        }
        else if(source instanceof InputSource) {
            return readWSDL(wsdlURL, (InputSource)source);
        }
        else {
            //This exception is checked in WSDLSource.setSource but we check
            //again here in case the wrong type of WSDLSource has been used
            //with this type of WSDLReader.
            String sourceClass = source.getClass().getName();
            String readerClass = this.getClass().getName();
            String msg = getErrorReporter().getFormattedMessage(
                    "WSDL017", new Object[] {sourceClass, readerClass});
            throw new WSDLException(WSDLException.PARSER_ERROR, msg);
        }
    }
View Full Code Here


        try {
            uri = new URI(wsdlURI);
        } catch (URISyntaxException e) {
            String msg = getErrorReporter().getFormattedMessage(
                    "WSDL506", new Object[] {null, wsdlURI});
            throw new WSDLException(WSDLException.PARSER_ERROR, msg, e);
        }
       
        String fragment = uri.getFragment();
       
       
        if (fragment == null) { //No fragment identifier so just use the root element.
            return readWSDL(wsdlURI, domDoc.getDocumentElement());//Use document root if no WSDL20 root found.
        } else {
            XPointer xpointer;
            try {
                xpointer = new XPointer(fragment);
            } catch(InvalidXPointerException e) {
                String msg = getErrorReporter().getFormattedMessage(
                        "WSDL530", new Object[] {fragment, wsdlURI});
                throw new WSDLException(WSDLException.PARSER_ERROR, msg, e);
            }
            Element root = domDoc.getDocumentElement();
           
            DOMXMLElementEvaluator evaluator = new DOMXMLElementEvaluator(xpointer, root, getErrorReporter());
            Element result = evaluator.evaluateElement();
           
            if (result != null) { //Element from XPointer evaluation.
                return readWSDL(wsdlURI, result);
            } else {
                String msg = getErrorReporter().getFormattedMessage(
                        "WSDL531", new Object[] {fragment, wsdlURI});
                throw new WSDLException(WSDLException.PARSER_ERROR, msg);
            }
        }
    }
View Full Code Here

            return readWSDL(wsdlURI, wsdlDocument);
           
        } catch (IOException e) {
            String msg = getErrorReporter().getFormattedMessage(
                    "WSDL503", new Object[] {wsdlURI});
            throw new WSDLException(WSDLException.PARSER_ERROR, msg, e);
        }
    }
View Full Code Here

      {
        userCatalog = loadCatalog(new URL(userCatalogFile));
      }
      catch (MalformedURLException e)
      {
        throw new WSDLException(WSDLException.CONFIGURATION_ERROR,
                      "Problem locating the URI resolver user catalog: " + userCatalogFile,
                      e);
      }
    }
         
      // build a URL[] from a (possibly empty) list of search URL directories/jars
      URL[] rootURLs = urlPathList(rootURLsList);
    URLClassLoader userLoader = new URLClassLoader(rootURLs, systemLoader);
   
      // convert provided keys and values to URIs
      try
      {       
        // process the schema catalog contents
        Hashtable interrimUriTable = toURI(schemaCatalog, systemLoader);
        // append the processed user catalog to the schema catalog
        uriTable = toURI(userCatalog, userLoader, interrimUriTable);
      }
      catch (URISyntaxException e)
      {
      throw new WSDLException(WSDLException.CONFIGURATION_ERROR,
                    "Problem instantiating the URI resolution table.",
                    e);
    }
  }
View Full Code Here

        URL url = new URL(urlStrings[i]);
        urls.add(url);
      } catch (MalformedURLException e) {
        // Bad URLs are discarded noisily
        // TODO should log a woden warning, ignore entry, and continue thru list instead of following?
        throw new WSDLException(WSDLException.CONFIGURATION_ERROR,
            "Invalid URL '" + urlStrings[i] + "' in base URL list '" + rootURLs + "'",
                      e);
        // TODO or logging like :
        //System.out.println("Invalid URL "+urlStrings[i]+": "+e.getMessage());
      }
View Full Code Here

        setBaseUri(fullPath);
        Description description;
        try {
            description = readInTheWSDLFile(fullPath);
        } catch (AxisFault axisFault) {
            throw new WSDLException("ERROR", "Exception occured while reading WSDL 2.0 doc", axisFault);
        }

        DescriptionElement descriptionElement = description.toElement();
        savedTargetNamespace = descriptionElement.getTargetNamespace()
                .toString();
View Full Code Here

        setBaseUri(fullPath);
        Description description;
        try {
            description = readInTheWSDLFile(fullPath);
        } catch (AxisFault axisFault) {
            throw new WSDLException("ERROR", "Exception occured while reading WSDL 2.0 doc", axisFault);
        }

        DescriptionElement descriptionElement = description.toElement();
        savedTargetNamespace = descriptionElement.getTargetNamespace()
                .toString();
View Full Code Here

        setBaseUri(fullPath);
        Description description;
        try {
            description = readInTheWSDLFile(fullPath);
        } catch (AxisFault axisFault) {
            throw new WSDLException("ERROR", "Exception occured while reading WSDL 2.0 doc", axisFault);
        }

        DescriptionElement descriptionElement = description.toElement();
        savedTargetNamespace = descriptionElement.getTargetNamespace()
                .toString();
View Full Code Here

        setBaseUri(fullPath);
        Description description;
        try {
            description = readInTheWSDLFile(fullPath);
        } catch (AxisFault axisFault) {
            throw new WSDLException("ERROR", "Exception occured while reading WSDL 2.0 doc", axisFault);
        }

        DescriptionElement descriptionElement = description.toElement();
        savedTargetNamespace = descriptionElement.getTargetNamespace()
                .toString();
View Full Code Here

      {
        userCatalog = loadCatalog(new URL(userCatalogFile));
      }
      catch (MalformedURLException e)
      {
        throw new WSDLException(WSDLException.CONFIGURATION_ERROR,
                      "Problem locating the URI resolver user catalog: " + userCatalogFile,
                      e);
      }
    }
         
      // build a URL[] from a (possibly empty) list of search URL directories/jars
      URL[] rootURLs = urlPathList(rootURLsList);
    URLClassLoader userLoader = new URLClassLoader(rootURLs, systemLoader);
   
      // convert provided keys and values to URIs
      try
      {       
        // process the schema catalog contents
        Hashtable interrimUriTable = toURI(schemaCatalog, systemLoader);
        // append the processed user catalog to the schema catalog
        uriTable = toURI(userCatalog, userLoader, interrimUriTable);
      }
      catch (URISyntaxException e)
      {
      throw new WSDLException(WSDLException.CONFIGURATION_ERROR,
                    "Problem instantiating the URI resolution table.",
                    e);
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.woden.WSDLException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.