Package org.jboss.ws.core.utils

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


    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


    }

    @Override
    public Definition readWSDL(URL wsdlURL) throws WSDLException
    {
        EntityResolver entityResolver = new JBossWSEntityResolver();
        JBossWSDLReader wsdlReader = new JBossWSDLReader();
        Definition definition = wsdlReader.readWSDL(new JBossWSDLLocatorImpl(entityResolver, wsdlURL));
        return definition;
    }
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

    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

         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

   /**
    * Creates and initializes an instance of SchemaBinding
    */
   public SchemaBinding buildSchemaBinding(XSModel model, JavaWsdlMapping wsdlMapping)
   {
      JBossEntityResolver resolver = new JBossWSEntityResolver();
      SchemaBinding schemaBinding = XsdBinder.bind(model, new DefaultSchemaResolver(resolver));

      schemaBinding.setIgnoreLowLine(false);
      schemaBinding.setIgnoreUnresolvedFieldOrClass(false);
      schemaBinding.setUnmarshalListsToArrays(true); // note: default jaxb2.0 is false!
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

    * @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

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.