Package org.jboss.ws.core.utils

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


/* 84 */     if (wsdlLocation == null) {
/* 85 */       throw new IllegalArgumentException("URL cannot be null");
/*    */     }
/* 87 */     log.trace("parse: " + wsdlLocation.toExternalForm());
/*    */
/* 89 */     EntityResolver entityResolver = new JBossWSEntityResolver();
/*    */
/* 94 */     Definition wsdlDefinition = this.wsdlReader.readWSDL(new WSDLLocatorImpl(entityResolver, wsdlLocation));
/*    */
/* 96 */     return wsdlDefinition;
/*    */   }
View Full Code Here


/*      */       try
/*      */       {
/*  246 */         Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
/*  247 */         unmarshaller.setValidation(true);
/*  248 */         unmarshaller.setSchemaValidation(true);
/*  249 */         unmarshaller.setEntityResolver(new JBossWSEntityResolver());
/*  250 */         ObjectModelFactory factory = new HandlerChainsObjectFactory();
/*  251 */         handlerChainsMetaData = (UnifiedHandlerChainsMetaData)unmarshaller.unmarshal(is, factory, null);
/*      */       }
/*      */       finally
/*      */       {
View Full Code Here

/* 2122 */     factory.setNamespaceAware(true);
/* 2123 */     factory.setValidating(false);
/*      */     try
/*      */     {
/* 2127 */       DocumentBuilder builder = factory.newDocumentBuilder();
/* 2128 */       builder.setEntityResolver(new JBossWSEntityResolver());
/* 2129 */       Document doc = builder.parse(inputSource);
/*      */
/* 2131 */       return doc;
/*      */     }
/*      */     catch (RuntimeException e)
View Full Code Here

/*     */   }
/*     */
/*     */   public JBossXSModel parseSchema(URL xsdURL)
/*     */   {
/* 133 */     JBossXSErrorHandler xserr = new JBossXSErrorHandler();
/* 134 */     JBossWSEntityResolver resolver = new JBossWSEntityResolver();
/* 135 */     JBossXSEntityResolver xsresolve = new JBossXSEntityResolver(resolver, new HashMap());
/* 136 */     XMLSchemaLoader loader = (XMLSchemaLoader)this.schemautils.getXSLoader(xserr, xsresolve);
/*     */
/* 138 */     XSModel xsmodel = loader.loadURI(xsdURL.toExternalForm());
/* 139 */     if (xsmodel == null) {
View Full Code Here

/*     */   {
/* 155 */     if ((locs == null) || (locs.size() == 0)) {
/* 156 */       throw new IllegalArgumentException("Illegal schema location map");
/*     */     }
/* 158 */     JBossXSErrorHandler xserr = new JBossXSErrorHandler();
/* 159 */     JBossWSEntityResolver resolver = new JBossWSEntityResolver();
/* 160 */     JBossXSEntityResolver xsresolve = new JBossXSEntityResolver(resolver, locs);
/* 161 */     XMLSchemaLoader loader = (XMLSchemaLoader)this.schemautils.getXSLoader(xserr, xsresolve);
/*     */
/* 163 */     int index = 0;
/* 164 */     SchemaGrammar[] gs = new SchemaGrammar[locs.size()];
/* 165 */     Iterator it = locs.keySet().iterator();
/* 166 */     while (it.hasNext())
/*     */     {
/*     */       try
/*     */       {
/* 170 */         String nsURI = (String)it.next();
/* 171 */         URL orgURL = (URL)locs.get(nsURI);
/* 172 */         URL resURL = resolveNamespaceURI(resolver, nsURI);
/* 173 */         URL url = resURL != null ? resURL : orgURL;
/*     */
/* 175 */         log.debug("Load schema: " + nsURI + "=" + url);
/* 176 */         XMLInputSource inputSource = new XMLInputSource(null, url.toExternalForm(), null);
/*     */
/* 178 */         InputSource tmpSrc = resolver.resolveEntity(null, url.toExternalForm());
/* 179 */         InputStream in = tmpSrc.getByteStream() != null ? tmpSrc.getByteStream() : new ResourceURL(url).openStream();
/* 180 */         inputSource.setByteStream(in);
/*     */
/* 182 */         SchemaGrammar grammar = (SchemaGrammar)loader.loadGrammar(inputSource);
/* 183 */         if (grammar == null) {
View Full Code Here

         throw new IllegalArgumentException("URL cannot be null");

      if (log.isDebugEnabled())
         log.debug("parse: " + wsdlLocation.toExternalForm());

      EntityResolver entityResolver = new JBossWSEntityResolver();
      WSDLDefinitions wsdlDefinitions = null;
      try
      {
         Document wsdlDoc = getDocument(wsdlLocation);
         String defaultNamespace = getDefaultNamespace(wsdlDoc);
View Full Code Here

         try
         {
            Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
            unmarshaller.setValidation(true);
            unmarshaller.setSchemaValidation(true);
            unmarshaller.setEntityResolver(new JBossWSEntityResolver());
            ObjectModelFactory factory = new HandlerChainsObjectFactory();
            handlerChainsMetaData = (UnifiedHandlerChainsMetaData)unmarshaller.unmarshal(is, factory, null);
         }
         finally
         {
View Full Code Here

    factory.setValidating(false);

    try
    {
      DocumentBuilder builder = factory.newDocumentBuilder();
      builder.setEntityResolver( new JBossWSEntityResolver() );
      Document doc = builder.parse(inputSource);

      return doc;
    }
    catch (RuntimeException e)
View Full Code Here

TOP

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

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.