Package org.apache.juddi.proxy

Examples of org.apache.juddi.proxy.RegistryProxy


  public static boolean createPublisher(String name, String identifier, Properties testprops) {
    Properties props = new Properties();
    props.setProperty(RegistryProxy.ADMIN_ENDPOINT_PROPERTY_NAME, testprops.getProperty("adminURL"));
    props.setProperty(RegistryProxy.INQUIRY_ENDPOINT_PROPERTY_NAME, testprops.getProperty("inquiryURL"));
    props.setProperty(RegistryProxy.PUBLISH_ENDPOINT_PROPERTY_NAME, testprops.getProperty("publishURL"));
    IRegistry proxy = new RegistryProxy(props);

    boolean ret = false;

    try
    {
      // execute a GetAuthToken request
      AuthToken token = proxy.getAuthToken("juddi", "password");
      AuthInfo authInfo = token.getAuthInfo();

      // create a publisher
      Publisher publisher = new Publisher(name, identifier);

      // put the Publisher object into a Vector
      Vector vector = new Vector(1);
      vector.add(publisher);

      // make the request
      PublisherDetail detail = proxy.savePublisher(authInfo, vector);

      Vector pubVector = detail.getPublisherVector();
      if (pubVector.size() == 1) {
        ret = true;
      }
View Full Code Here


    }
    return ret;
  }

  public static String getExpiredAuthToken(String publisher, String password) {
    RegistryProxy proxy = new RegistryProxy();
    AuthToken token = null;
    AuthInfo authInfo = null;
    String ret = null;
    try {
      token = proxy.getAuthToken(publisher, password);
      authInfo = token.getAuthInfo();
      ret = authInfo.getValue();
      proxy.discardAuthToken(authInfo);
    }
    catch (Exception ex) {
      ex.printStackTrace();
    }
    return ret;
View Full Code Here

        if (transport != null) prop.setProperty("juddi.proxy.transportClass", transport);
        /**
         * Even if the properties passed contains no values,
         * juddi takes default values
         */
        registry = new RegistryProxy(prop);       
        registry.setInquiryURL(queryManagerURL);
        registry.setPublishURL(lifeCycleManagerURL);
        this.postalScheme = postalScheme;
        this.maxRows = maxRows;

View Full Code Here

    //IRegistry registry = new RegistryProxy();

    // Option #2 (import proxy property values from a specified properties file)
    Properties props = new Properties();
    props.load(new FileInputStream(args[0]));
    IRegistry registry = new RegistryProxy(props);


    // Option #3 (explicitly set the proxy property values)
    //Properties props = new Properties();
    //props.setProperty(RegistryProxy.ADMIN_ENDPOINT_PROPERTY_NAME,"http://localhost:8080/juddi/admin");
    //props.setProperty(RegistryProxy.INQUIRY_ENDPOINT_PROPERTY_NAME,"http://localhost:8080/juddi/inquiry");
    //props.setProperty(RegistryProxy.PUBLISH_ENDPOINT_PROPERTY_NAME,"http://localhost:8080/juddi/publish");
    //props.setProperty(RegistryProxy.TRANSPORT_CLASS_PROPERTY_NAME,"org.apache.juddi.proxy.AxisTransport");
    //props.setProperty(RegistryProxy.SECURITY_PROVIDER_PROPERTY_NAME,"com.sun.net.ssl.internal.ssl.Provider");
    //props.setProperty(RegistryProxy.PROTOCOL_HANDLER_PROPERTY_NAME,"com.sun.net.ssl.internal.www.protocol");
    //IRegistry registry = new RegistryProxy(props);

    // Option #4 (Microsoft Test Site)
    //Properties props = new Properties();
    //props.setProperty(RegistryProxy.INQUIRY_ENDPOINT_PROPERTY_NAME,"http://test.uddi.microsoft.com/inquire");
    //props.setProperty(RegistryProxy.PUBLISH_ENDPOINT_PROPERTY_NAME,"https://test.uddi.microsoft.com/publish");
    //props.setProperty(RegistryProxy.TRANSPORT_CLASS_PROPERTY_NAME,"org.apache.juddi.proxy.AxisTransport");
    //props.setProperty(RegistryProxy.SECURITY_PROVIDER_PROPERTY_NAME,"com.sun.net.ssl.internal.ssl.Provider");
    //props.setProperty(RegistryProxy.PROTOCOL_HANDLER_PROPERTY_NAME,"com.sun.net.ssl.internal.www.protocol");
    //props.setProperty(RegistryProxy.HTTP_PROXY_HOST_PROPERTY_NAME,"na6v13a01.fmr.com");
    //props.setProperty(RegistryProxy.HTTP_PROXY_PORT_PROPERTY_NAME,"8000");
    //IRegistry registry = new RegistryProxy(props);

    String userID = "sviens";
    String password = "password";

    try
    {
      AuthToken authToken = registry.getAuthToken(userID,password);
      AuthInfo authInfo = authToken.getAuthInfo();
      System.out.println("AuthToken: "+authInfo.getValue());
    }
    catch (RegistryException regex)
    {
View Full Code Here

    //IRegistry registry = new RegistryProxy();

    // Option #2 (import proxy property values from a specified properties file)
    Properties props = new Properties();
    props.load(new FileInputStream(args[0]));
    IRegistry registry = new RegistryProxy(props);


    // Option #3 (explicitly set the proxy property values)
    //Properties props = new Properties();
    //props.setProperty(RegistryProxy.ADMIN_ENDPOINT_PROPERTY_NAME,"http://localhost:8080/juddi/admin");
    //props.setProperty(RegistryProxy.INQUIRY_ENDPOINT_PROPERTY_NAME,"http://localhost:8080/juddi/inquiry");
    //props.setProperty(RegistryProxy.PUBLISH_ENDPOINT_PROPERTY_NAME,"http://localhost:8080/juddi/publish");
    //props.setProperty(RegistryProxy.TRANSPORT_CLASS_PROPERTY_NAME,"org.apache.juddi.proxy.AxisTransport");
    //props.setProperty(RegistryProxy.SECURITY_PROVIDER_PROPERTY_NAME,"com.sun.net.ssl.internal.ssl.Provider");
    //props.setProperty(RegistryProxy.PROTOCOL_HANDLER_PROPERTY_NAME,"com.sun.net.ssl.internal.www.protocol");
    //IRegistry registry = new RegistryProxy(props);

    // Option #4 (Microsoft Test Site)
    //Properties props = new Properties();
    //props.setProperty(RegistryProxy.INQUIRY_ENDPOINT_PROPERTY_NAME,"http://test.uddi.microsoft.com/inquire");
    //props.setProperty(RegistryProxy.PUBLISH_ENDPOINT_PROPERTY_NAME,"https://test.uddi.microsoft.com/publish");
    //props.setProperty(RegistryProxy.TRANSPORT_CLASS_PROPERTY_NAME,"org.apache.juddi.proxy.AxisTransport");
    //props.setProperty(RegistryProxy.SECURITY_PROVIDER_PROPERTY_NAME,"com.sun.net.ssl.internal.ssl.Provider");
    //props.setProperty(RegistryProxy.PROTOCOL_HANDLER_PROPERTY_NAME,"com.sun.net.ssl.internal.www.protocol");
    //props.setProperty(RegistryProxy.HTTP_PROXY_HOST_PROPERTY_NAME,"na6v13a01.fmr.com");
    //props.setProperty(RegistryProxy.HTTP_PROXY_PORT_PROPERTY_NAME,"8000");
    //IRegistry registry = new RegistryProxy(props);

    String userID = "sviens";
    String password = "password";

    try
    {
      // execute a GetAuthToken request
      AuthToken authToken = registry.getAuthToken(userID,password);
      AuthInfo authInfo = authToken.getAuthInfo();
      System.out.println("AuthToken: "+authInfo.getValue());
    }
    catch (RegistryException regex)
    {
View Full Code Here

    //IRegistry registry = new RegistryProxy();

    // Option #2 (import proxy property values from a specified properties file)
    Properties props = new Properties();
    props.load(new FileInputStream(args[0]));
    IRegistry registry = new RegistryProxy(props);


    // Option #3 (explicitly set the proxy property values)
    //Properties props = new Properties();
    //props.setProperty(RegistryProxy.ADMIN_ENDPOINT_PROPERTY_NAME,"http://localhost:8080/juddi/admin");
    //props.setProperty(RegistryProxy.INQUIRY_ENDPOINT_PROPERTY_NAME,"http://localhost:8080/juddi/inquiry");
    //props.setProperty(RegistryProxy.PUBLISH_ENDPOINT_PROPERTY_NAME,"http://localhost:8080/juddi/publish");
    //props.setProperty(RegistryProxy.TRANSPORT_CLASS_PROPERTY_NAME,"org.apache.juddi.proxy.AxisTransport");
    //props.setProperty(RegistryProxy.SECURITY_PROVIDER_PROPERTY_NAME,"com.sun.net.ssl.internal.ssl.Provider");
    //props.setProperty(RegistryProxy.PROTOCOL_HANDLER_PROPERTY_NAME,"com.sun.net.ssl.internal.www.protocol");
    //IRegistry registry = new RegistryProxy(props);

    // Option #4 (Microsoft Test Site)
    //Properties props = new Properties();
    //props.setProperty(RegistryProxy.INQUIRY_ENDPOINT_PROPERTY_NAME,"http://test.uddi.microsoft.com/inquire");
    //props.setProperty(RegistryProxy.PUBLISH_ENDPOINT_PROPERTY_NAME,"https://test.uddi.microsoft.com/publish");
    //props.setProperty(RegistryProxy.TRANSPORT_CLASS_PROPERTY_NAME,"org.apache.juddi.proxy.AxisTransport");
    //props.setProperty(RegistryProxy.SECURITY_PROVIDER_PROPERTY_NAME,"com.sun.net.ssl.internal.ssl.Provider");
    //props.setProperty(RegistryProxy.PROTOCOL_HANDLER_PROPERTY_NAME,"com.sun.net.ssl.internal.www.protocol");
    //props.setProperty(RegistryProxy.HTTP_PROXY_HOST_PROPERTY_NAME,"na6v13a01.fmr.com");
    //props.setProperty(RegistryProxy.HTTP_PROXY_PORT_PROPERTY_NAME,"8000");
    //IRegistry registry = new RegistryProxy(props);

    try
    {
      RegistryInfo regInfo = registry.getRegistryInfo();
      Properties regProps = regInfo.getProperties();
      Enumeration keys = regProps.keys();

      while(keys.hasMoreElements())
      {
View Full Code Here

    //IRegistry registry = new RegistryProxy();

    // Option #2 (import proxy property values from a specified properties file)
    Properties props = new Properties();
    props.load(new FileInputStream(args[0]));
    IRegistry registry = new RegistryProxy(props);


    // Option #3 (explicitly set the proxy property values)
    //Properties props = new Properties();
    //props.setProperty(RegistryProxy.ADMIN_ENDPOINT_PROPERTY_NAME,"http://localhost:8080/juddi/admin");
View Full Code Here

    //IRegistry registry = new RegistryProxy();

    // Option #2 (import proxy property values from a specified properties file)
    Properties props = new Properties();
    props.load(new FileInputStream(args[0]));
    IRegistry registry = new RegistryProxy(props);


    // Option #3 (explicitly set the proxy property values)
    //Properties props = new Properties();
    //props.setProperty(RegistryProxy.ADMIN_ENDPOINT_PROPERTY_NAME,"http://localhost:8080/juddi/admin");
View Full Code Here

    //IRegistry registry = new RegistryProxy();

    // Option #2 (import proxy property values from a specified properties file)
    Properties props = new Properties();
    props.load(new FileInputStream(args[0]));
    IRegistry registry = new RegistryProxy(props);


    // Option #3 (explicitly set the proxy property values)
    //Properties props = new Properties();
    //props.setProperty(RegistryProxy.ADMIN_ENDPOINT_PROPERTY_NAME,"http://localhost:8080/juddi/admin");
View Full Code Here

    //IRegistry registry = new RegistryProxy();

    // Option #2 (import proxy property values from a specified properties file)
    Properties props = new Properties();
    props.load(new FileInputStream(args[0]));
    IRegistry registry = new RegistryProxy(props);

    // Option #3 (explicitly set the proxy property values)
    //Properties props = new Properties();
    //props.setProperty(RegistryProxy.ADMIN_ENDPOINT_PROPERTY_NAME,"http://localhost:8080/juddi/admin");
    //props.setProperty(RegistryProxy.INQUIRY_ENDPOINT_PROPERTY_NAME,"http://localhost:8080/juddi/inquiry");
View Full Code Here

TOP

Related Classes of org.apache.juddi.proxy.RegistryProxy

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.