Package org.eclipse.wst.wsdl.validation.internal.resolver

Examples of org.eclipse.wst.wsdl.validation.internal.resolver.IURIResolutionResult


     
      // Xerces tends to try to resolve locations with no information.
      // No need to do any processing if we have no information.
      if(publicId != null || systemId != null)
      {
        IURIResolutionResult result = uriResolver.resolve("", publicId, systemId);
        String uri = result.getPhysicalLocation();
        if (uri != null && !uri.equals(""))
        {
          // If the namespace was used to resolve this reference ensure a schema
          // has been returned. Namespaces tend to point to Web resources that
          // may or may not be schemas.
          boolean createEntityResult = true;
          if(nsUsed)
          {
          XSDValidator xsdVal = new XSDValidator();
          xsdVal.validate(uri, uriResolver, null);
          if(!xsdVal.isValid())
            createEntityResult = false;
          }
         
          if(createEntityResult)
          {
          try
          {
          URL entityURL = new URL(uri);
              XMLInputSource is = new XMLInputSource(rid.getPublicId(), systemId, result.getLogicalLocation());
          is.setByteStream(entityURL.openStream());
              if (is != null)
              {
                return is;
              }
View Full Code Here


      this.location = namespace;
    }
    this.contextURI = contextURI;
   
    this.location = this.location.replace('\\','/');
    IURIResolutionResult classpathURI = valinfo.getURIResolver().resolve(this.contextURI, this.namespace, this.location);
    if(classpathURI.getLogicalLocation() != null)
    {
      this.location = classpathURI.getLogicalLocation();
    }
    if(classpathURI.getPhysicalLocation() != null)
    {
      this.classpathURI = classpathURI.getPhysicalLocation();
      this.contextURI = null;
    }
  }
View Full Code Here

TOP

Related Classes of org.eclipse.wst.wsdl.validation.internal.resolver.IURIResolutionResult

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.