Package org.jboss.ws.core.utils

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


   public InputSource getBaseInputSource()
   {
      log.trace("getBaseInputSource [wsdlUrl=" + wsdlLocation + "]");
      try
      {
         InputStream inputStream = new ResourceURL(wsdlLocation).openStream();
         if (inputStream == null)
            throw new IllegalArgumentException("Cannot obtain wsdl from [" + wsdlLocation + "]");

         return new InputSource(inputStream);
      }
View Full Code Here


         throw new IllegalArgumentException("schemaLocation is null for xsd:import");

      URL locationURL = getLocationURL(wsdlLoc, location);
      if (!publishedLocations.containsKey(locationURL))
      {
         Element rootElement = DOMUtils.parse(new ResourceURL(locationURL).openStream());
         processSchemaInclude(types, locationURL, rootElement, publishedLocations);
      }
      URL newLoc = publishedLocations.get(locationURL);
      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());
         if (!publishedLocations.containsKey(locationURL))
         {
            processSchemaInclude(types, locationURL, rootElement, publishedLocations);
         }
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

      return null;
   }

   private XMLInputSource getXMLInputSource(URL url, XMLResourceIdentifier resId) throws IOException
   {
      InputStream urlStream = new ResourceURL(url).openStream();
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      IOUtils.copyStream(baos, urlStream); // [JBWS-2325]
      InputSource inputSource = new InputSource(new ByteArrayInputStream(baos.toByteArray()));
      return getXMLInputSource(inputSource, resId);
   }
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());
            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

                  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 = null;
                  try
View Full Code Here

                  if (resourcePath.length() > 0)
                     resourcePath = resourcePath + "/";

                  resourcePath = expLocation + resourcePath + schemaLocation;
                  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

      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

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.