Package org.ogce.xregistry.client

Examples of org.ogce.xregistry.client.XRegistryClient


        }
    }

    private void connect() throws ComponentRegistryException {
        try {
      this.xregistryClient = new XRegistryClient(this.proxy, XBayaSecurity.getTrustedCertificates(),
          this.url.toString());
    } catch (XRegistryClientException e) {
      throw new XBayaRuntimeException(e);
    }
    }
View Full Code Here


    if (this.xregistryURL == null) {
      throw new XBayaRuntimeException("XRegistry URL cannot be null");
    }

    try {
      this.xregistryClient = new XRegistryClient(this.gssCredential, XBayaSecurity.getTrustedCertificates(), this.xregistryURL.toString());
    } catch (XRegistryClientException e) {
      throw new XBayaRuntimeException(e);
    }
  }
View Full Code Here

     * @throws XregistryException
     * @throws ComponentRegistryException
     */
    public void testClient() throws XRegistryClientException,
            ComponentRegistryException {
        XRegistryClient client = new XRegistryClient(
                XBayaConstants.DEFAULT_XREGISTRY_URL.toString());
        ServiceDescData[] abstractServices = client.findServiceDesc("");
        logger.info("abstractServices: " + abstractServices);
        for (ServiceDescData abstractService : abstractServices) {
            logger.info("abstractService: " + abstractService);
        }

        WsdlData[] concreteServices = client.findServiceInstance("");
        logger.info("concreteServices: " + concreteServices);
        for (WsdlData concreteService : concreteServices) {
            logger.info("concreteService: " + concreteService);
        }
    }
View Full Code Here

      URI xregistryURL = this.xbayaEngine.getConfiguration()
          .getXRegistryURL();
      if (xregistryURL == null) {
        xregistryURL = XBayaConstants.DEFAULT_XREGISTRY_URL;
      }
      XRegistryClient xregistryClient = new XRegistryClient(gssCredential, XBayaSecurity.getTrustedCertificates(),
          xregistryURL.toString());
      ResourceData[] datas = xregistryClient.findResource("");

      int index = 0;
      while (maxNum > 0 && datas.length > index) {
        ResourceData data = datas[index];
        QName qName = data.getName();
View Full Code Here

  public XregistryServiceWrapper(String xregistryUrl, String trustedCertFile, GSSCredential sessionCredentail) throws GfacException {
    try {
      if (sessionCredentail != null && trustedCertFile != null) {
        if (new File(trustedCertFile).isFile()) {
          this.xregistryClient = new XRegistryClient(sessionCredentail, trustedCertFile, xregistryUrl);
        } else {
          TrustedCertificates certificates = TrustedCertificates.load(trustedCertFile);
          TrustedCertificates.setDefaultTrustedCertificates(certificates);
          X509Certificate[] trustedCertificates = certificates.getCertificates();
          System.out.println("xregistryUrl=" + xregistryUrl);
          System.out.println("trustedCertificates=" + trustedCertificates);
          this.xregistryClient = new XRegistryClient(sessionCredentail, trustedCertificates, xregistryUrl);
        }
      } else {
        throw new GfacException("Neither host certificate of gss credential is set", FaultCode.ErrorAtDependentService);
      }
    } catch (XRegistryClientException e) {
View Full Code Here

 
  public XregistryServiceWrapper(String xregistryUrl, String trustedCertFile, String hostcertsKeyFile) throws GfacException {
    try {
      if (hostcertsKeyFile != null && trustedCertFile != null) {
        if (new File(trustedCertFile).isFile()) {
          this.xregistryClient = new XRegistryClient(hostcertsKeyFile, trustedCertFile, xregistryUrl);
        } else {
          TrustedCertificates certificates = TrustedCertificates.load(trustedCertFile);
          TrustedCertificates.setDefaultTrustedCertificates(certificates);
          X509Certificate[] trustedCertificates = certificates.getCertificates();
          System.out.println("xregistryUrl=" + xregistryUrl);
          System.out.println("hostcertsKeyFile=" + hostcertsKeyFile);
          System.out.println("trustedCertificates=" + trustedCertificates);
          this.xregistryClient = new XRegistryClient(hostcertsKeyFile, trustedCertificates, xregistryUrl);
        }
      } else {
        throw new GfacException("Neither host certificate of gss credential is set", FaultCode.ErrorAtDependentService);
      }
    } catch (XRegistryClientException e) {
View Full Code Here

    }
  }

  public XregistryServiceWrapper(String xregistryUrl) throws GfacException {
    try {
      registryClient = new XRegistryClient(xregistryUrl);
    } catch (XRegistryClientException e) {
      throw new GfacException(e, FaultCode.ErrorAtDependentService);
    }
  }
View Full Code Here

        } catch (RepositoryException e) {
            throw new XRegistryMigrationException("Issue creating the JCR Registry instance " +
                    e.getMessage(), e);
        }

        XRegistryClient client;
        try {
            client = XRegistryClientUtil.CreateGSISecureRegistryInstance(migrationPropertiesFile);
        } catch (XRegistryClientException e) {
            throw new XRegistryMigrationException("Issue instantiating the XRegistry instance. " +
                    "Check property file " + e.getMessage(), e);
View Full Code Here

TOP

Related Classes of org.ogce.xregistry.client.XRegistryClient

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.