Package org.jboss.ws.core.utils

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


         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


   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("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

/*  480 */     String location = getOptionalAttribute(importEl, "schemaLocation");
/*  481 */     if (location == null) {
/*  482 */       throw new IllegalArgumentException("schemaLocation is null for xsd:import");
/*      */     }
/*  484 */     URL locationURL = getLocationURL(wsdlLoc, location);
/*  485 */     Element rootElement = DOMUtils.parse(new ResourceURL(locationURL).openStream());
/*  486 */     URL newloc = processSchemaInclude(types, locationURL, rootElement);
/*  487 */     if (newloc != null)
/*  488 */       importEl.setAttribute("schemaLocation", newloc.toExternalForm());
/*      */   }
View Full Code Here

/*  514 */       String location = getOptionalAttribute(includeEl, "schemaLocation");
/*  515 */       if (location == null) {
/*  516 */         throw new IllegalArgumentException("schemaLocation is null for xsd:include");
/*      */       }
/*  518 */       URL locationURL = getLocationURL(wsdlLoc, location);
/*  519 */       Element rootElement = DOMUtils.parse(new ResourceURL(locationURL).openStream());
/*  520 */       URL newloc = processSchemaInclude(types, locationURL, rootElement);
/*  521 */       if (newloc != null) {
/*  522 */         includeEl.setAttribute("schemaLocation", newloc.toExternalForm());
/*      */       }
/*      */     }
View Full Code Here

/*     */   private Document getDocument(URL wsdlLocation)
/*     */     throws WSDLException
/*     */   {
/*     */     try
/*     */     {
/* 166 */       InputStream inputStream = new ResourceURL(wsdlLocation).openStream();
/*     */       try
/*     */       {
/* 169 */         DocumentBuilder builder = DOMUtils.getDocumentBuilder();
/* 170 */         Document localDocument = builder.parse(inputStream);
/*     */         return localDocument; } finally { inputStream.close();
View Full Code Here

/*     */   public InputSource getBaseInputSource()
/*     */   {
/*  61 */     log.trace("getBaseInputSource [wsdlUrl=" + this.wsdlLocation + "]");
/*     */     try
/*     */     {
/*  64 */       InputStream inputStream = new ResourceURL(this.wsdlLocation).openStream();
/*  65 */       if (inputStream == null) {
/*  66 */         throw new IllegalArgumentException("Cannot obtain wsdl from [" + this.wsdlLocation + "]");
/*     */       }
/*  68 */       return new InputSource(inputStream);
/*     */     }
View Full Code Here

/* 155 */     }return null;
/*     */   }
/*     */
/*     */   private XMLInputSource getXMLInputSource(URL url, XMLResourceIdentifier resId) throws IOException
/*     */   {
/* 160 */     InputStream inputStream = new ResourceURL(url).openStream();
/* 161 */     InputSource inputSource = new InputSource(inputStream);
/* 162 */     return getXMLInputSource(inputSource, resId);
/*     */   }
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.