Package org.jboss.ws.core.utils

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


         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


            factory.setNamespaceAware(true);
            factory.setValidating(false);

            factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
            DocumentBuilder builder = factory.newDocumentBuilder();
            builder.setEntityResolver( new JBossWSEntityResolver() );
            return builder.parse(inputStream);
         }
         finally
         {
            inputStream.close();
View Full Code Here

    try
    {
        factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
      DocumentBuilder builder = factory.newDocumentBuilder();
      builder.setEntityResolver( new JBossWSEntityResolver() );
      Document doc = builder.parse(inputSource);

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

    * @return Xerces XSModel which represents the schema
    */
   public JBossXSModel parseSchema(URL xsdURL)
   {
      JBossXSErrorHandler xserr = new JBossXSErrorHandler();
      JBossWSEntityResolver resolver = new JBossWSEntityResolver();
      JBossXSEntityResolver xsresolve = new JBossXSEntityResolver(resolver, new HashMap<String, URL>());
      XMLSchemaLoader loader = (XMLSchemaLoader)schemautils.getXSLoader(xserr, xsresolve);

      XSModel xsmodel = loader.loadURI(xsdURL.toExternalForm());
      if (xsmodel == null)
View Full Code Here

   {
      if (locs == null || locs.size() == 0)
         throw new IllegalArgumentException("Illegal schema location map");

      JBossXSErrorHandler xserr = new JBossXSErrorHandler();
      JBossWSEntityResolver resolver = new JBossWSEntityResolver();
      JBossXSEntityResolver xsresolve = new JBossXSEntityResolver(resolver, locs);
      XMLSchemaLoader loader = (XMLSchemaLoader)schemautils.getXSLoader(xserr, xsresolve);

      int index = 0;
      SchemaGrammar[] gs = new SchemaGrammar[locs.size()];
      Iterator<String> it = locs.keySet().iterator();
      while (it.hasNext())
      {
         InputStream in = null;
         try
         {
            String nsURI = it.next();
            URL orgURL = locs.get(nsURI);
            URL resURL = resolveNamespaceURI(resolver, nsURI);
            URL url = resURL != null ? resURL : orgURL;
           
            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)
View Full Code Here

      if (wsdlLocation == null)
         throw new IllegalArgumentException("URL cannot be null");

      log.trace("parse: " + wsdlLocation.toExternalForm());
     
      EntityResolver entityResolver = new JBossWSEntityResolver();
     
      // Set EntityResolver in patched version of wsdl4j-1.5.2jboss
      // [TODO] show the usecase that needs this
      // ((WSDLReaderImpl)wsdlReader).setEntityResolver(entityResolver);
      Definition wsdlDefinition = wsdlReader.readWSDL(new WSDLLocatorImpl(entityResolver, wsdlLocation));
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

         lsInput = new LSInputImpl();
         lsInput.setByteStream(new ByteArrayInputStream(value));
      }
      try
      {
         JBossWSEntityResolver entityResolver = new JBossWSEntityResolver();
         InputSource ins = entityResolver.resolveEntity(publicId, systemId);
         if (ins != null)
         {
            lsInput = new LSInputImpl();
            lsInput.setByteStream(ins.getByteStream());
         }
View Full Code Here

/*     */ {
/*  81 */   private static final Logger log = Logger.getLogger(SchemaBindingBuilder.class);
/*     */
/*     */   public SchemaBinding buildSchemaBinding(XSModel model, JavaWsdlMapping wsdlMapping)
/*     */   {
/*  88 */     JBossEntityResolver resolver = new JBossWSEntityResolver();
/*  89 */     SchemaBinding schemaBinding = XsdBinder.bind(model, new DefaultSchemaResolver(resolver));
/*     */
/*  91 */     schemaBinding.setIgnoreLowLine(false);
/*  92 */     schemaBinding.setIgnoreUnresolvedFieldOrClass(false);
/*  93 */     schemaBinding.setUnmarshalListsToArrays(true);
View Full Code Here

/*  99 */       throw new IllegalArgumentException("URL cannot be null");
/*     */     }
/* 101 */     if (log.isDebugEnabled()) {
/* 102 */       log.debug("parse: " + wsdlLocation.toExternalForm());
/*     */     }
/* 104 */     EntityResolver entityResolver = new JBossWSEntityResolver();
/* 105 */     WSDLDefinitions wsdlDefinitions = null;
/*     */     try
/*     */     {
/* 108 */       Document wsdlDoc = getDocument(wsdlLocation);
/* 109 */       String defaultNamespace = getDefaultNamespace(wsdlDoc);
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.