Package org.jboss.ws.core.utils

Examples of org.jboss.ws.core.utils.ResourceURL


   public WSSecurityConfiguration parse(URL configURL) throws IOException
   {
      if (configURL == null)
         throw new IllegalArgumentException("Security config URL cannot be null");

      InputStream is = new ResourceURL(configURL).openStream();
      try
      {
         Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
         WSSecurityConfiguration configuration = (WSSecurityConfiguration)unmarshaller.unmarshal(is, this, null);
         return configuration;
View Full Code Here


                  while (resourcePath.indexOf("//") != -1)
                  {
                     resourcePath = resourcePath.replace("//", "/");
                  }
                  URL resourceURL = dep.getMetaDataFileURL(resourcePath);
                  InputStream is = new ResourceURL(resourceURL).openStream();
                  if (is == null)
                     throw new IllegalArgumentException("Cannot find schema import in deployment: " + resourcePath);

                  FileOutputStream fos = new FileOutputStream(targetFile);
                  IOUtils.copyStream(fos, is);
View Full Code Here

      {
         throw new IllegalArgumentException("JAXRPC mapping URL cannot be null");
      }

      // setup the XML binding Unmarshaller
      InputStream is = new ResourceURL(mappingURL).openStream();
      try
      {
         Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
         JavaWsdlMapping javaWsdlMapping = (JavaWsdlMapping)unmarshaller.unmarshal(is, this, null);
         return javaWsdlMapping;
View Full Code Here

   public WSSecurityConfiguration parse(URL configURL) throws IOException
   {
      if (configURL == null)
         throw new IllegalArgumentException("Security config URL cannot be null");

      InputStream is = new ResourceURL(configURL).openStream();
      try
      {
         Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
         WSSecurityConfiguration configuration = (WSSecurityConfiguration)unmarshaller.unmarshal(is, this, null);
         return configuration;
View Full Code Here

      String location = getOptionalAttribute(importEl, "schemaLocation");
      if (location == null)
         throw new IllegalArgumentException("schemaLocation is null for xsd:import");

      URL locationURL = getLocationURL(wsdlLoc, location);
      Element rootElement = DOMUtils.parse(new ResourceURL(locationURL).openStream());
      if (!published.contains(locationURL))
      {
         published.add(locationURL);
         URL newloc = processSchemaInclude(types, locationURL, rootElement,  published);
         if (newloc != null)
View Full Code Here

         String location = getOptionalAttribute(includeEl, "schemaLocation");
         if (location == null)
            throw new IllegalArgumentException("schemaLocation is null for xsd:include");

         URL locationURL = getLocationURL(wsdlLoc, location);
         Element rootElement = DOMUtils.parse(new ResourceURL(locationURL).openStream());
         if (!published.contains(locationURL))
         {
            published.add(locationURL);
            URL newloc = processSchemaInclude(types, locationURL, rootElement, published);
            if (newloc != null)
View Full Code Here

      return null;
   }

   private XMLInputSource getXMLInputSource(URL url, XMLResourceIdentifier resId) throws IOException
   {
      InputStream inputStream = new ResourceURL(url).openStream();
      InputSource inputSource = new InputSource(inputStream);
      return getXMLInputSource(inputSource, resId);
   }
View Full Code Here

      String location = getOptionalAttribute(importEl, "schemaLocation");
      if (location == null)
         throw new IllegalArgumentException("schemaLocation is null for xsd:import");

      URL locationURL = getLocationURL(wsdlLoc, location);
      Element rootElement = DOMUtils.parse(new ResourceURL(locationURL).openStream());
      URL newloc = processSchemaInclude(types, locationURL, rootElement);
      if (newloc != null)
         importEl.setAttribute("schemaLocation", newloc.toExternalForm());
   }
View Full Code Here

         String location = getOptionalAttribute(includeEl, "schemaLocation");
         if (location == null)
            throw new IllegalArgumentException("schemaLocation is null for xsd:include");

         URL locationURL = getLocationURL(wsdlLoc, location);
         Element rootElement = DOMUtils.parse(new ResourceURL(locationURL).openStream());
         URL newloc = processSchemaInclude(types, locationURL, rootElement);
         if (newloc != null)
            includeEl.setAttribute("schemaLocation", newloc.toExternalForm());
      }
View Full Code Here

           
            log.debug("Load schema: " + nsURI + "=" + url);
            XMLInputSource inputSource = new XMLInputSource(null, url.toExternalForm(), null);

            InputSource tmpSrc = resolver.resolveEntity(null, url.toExternalForm());
            InputStream in = tmpSrc.getByteStream() != null ? tmpSrc.getByteStream() : new ResourceURL(url).openStream();
            inputSource.setByteStream(in);
           
            SchemaGrammar grammar = (SchemaGrammar)loader.loadGrammar(inputSource);
            if (grammar == null)
               throw new IllegalStateException("Cannot load grammar: " + url);
View Full Code Here

TOP

Related Classes of org.jboss.ws.core.utils.ResourceURL

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.