Package org.uddi.api_v2

Examples of org.uddi.api_v2.GetAuthToken


    try {
           Class<?> transportClass = ClassUtil.forName(clazz, Transport.class);
           if (transportClass!=null) {
             Transport transport = (Transport) transportClass.getConstructor(String.class).newInstance("default");
             security = transport.getUDDISecurityService();
             GetAuthToken getAuthToken = new GetAuthToken();
             getAuthToken.setUserID("root");
             getAuthToken.setCred("");
             authInfo = security.getAuthToken(getAuthToken).getAuthInfo();
             publisher = transport.getJUDDIApiService();
           } else {
             Assert.fail();
           }
View Full Code Here


    try {
           Class<?> transportClass = ClassUtil.forName(clazz, Transport.class);
           if (transportClass!=null) {
             Transport transport = (Transport) transportClass.getConstructor(String.class).newInstance("default");
             security = transport.getUDDISecurityService();
             GetAuthToken getAuthToken = new GetAuthToken();
             getAuthToken.setUserID("root");
             getAuthToken.setCred("");
             authInfo = security.getAuthToken(getAuthToken).getAuthInfo();
             publisher = transport.getJUDDIApiService();
           } else {
             Assert.fail();
           }
View Full Code Here

           Class<?> transportClass = ClassUtil.forName(clazz, Transport.class);
           if (transportClass!=null) {
             Transport transport = (Transport) transportClass.getConstructor(String.class).newInstance("default");
            
             UDDISecurityPortType securityService = transport.getUDDISecurityService();
             GetAuthToken getAuthToken = new GetAuthToken();
             getAuthToken.setUserID("root");
             getAuthToken.setCred("");
             AuthToken authToken = securityService.getAuthToken(getAuthToken);
             System.out.println(authToken.getAuthInfo());
             Assert.assertNotNull(authToken);
           } else {
             Assert.fail();
View Full Code Here

    }
  }
 
  private String getAuthToken(String endpointURL) throws TransportException, DispositionReportFaultMessage, RemoteException {
    if (authToken==null) {
      GetAuthToken getAuthToken = new GetAuthToken();
      getAuthToken.setUserID(getPublisher());
      getAuthToken.setCred(getPassword());
      authToken = getUDDINode().getTransport().getUDDISecurityService(endpointURL).getAuthToken(getAuthToken).getAuthInfo();
    }
    return authToken;
  }
View Full Code Here

    InstantiationException, IllegalAccessException, TransportException, DispositionReportFaultMessage, RemoteException,
    IllegalArgumentException, SecurityException, InvocationTargetException, NoSuchMethodException {
   
        Transport transport = WebHelper.getTransport(servletContext);
    UDDISecurityPortType securityService = transport.getUDDISecurityService();
    GetAuthToken getAuthToken = new GetAuthToken();
    getAuthToken.setUserID(username);
    getAuthToken.setCred(password);
    AuthToken authToken = securityService.getAuthToken(getAuthToken);
    log.info("User " + username + " obtained token from node=" + WebHelper.getUDDIHomeNode(servletContext).getName());
    return authToken;
  }
View Full Code Here

  @Override
  protected void execute() throws Exception {

    if (authenticationToken == null)
    {
      GetAuthToken getAuthToken = new GetAuthToken();
      getAuthToken.setUserID("root");
      getAuthToken.setCred("root");
 
      authenticationToken = securityService.getAuthToken(getAuthToken);
    }
   
  }
View Full Code Here

   * are requesting an AuthToken for user "root".
   */
  @Override
  protected void execute() throws Exception {

    GetAuthToken getAuthToken = new GetAuthToken();
    getAuthToken.setUserID("root");
    getAuthToken.setCred("root");

    authenticationToken = securityService.getAuthToken(getAuthToken);
   
  }
View Full Code Here

                        pass = clerk.getPassword();
                }
                if (username == null || pass==null) {
                   System.out.println("No credentials are available. This will probably fail spectacularly");
                } else {
                        GetAuthToken getAuthTokenRoot = new GetAuthToken();
                        getAuthTokenRoot.setUserID(username);
                        getAuthTokenRoot.setCred(pass);
                        token = security.getAuthToken(getAuthTokenRoot).getAuthInfo();
                }


                ExportTmodels();
View Full Code Here

        return null;
    }

    public static String GetAuthToken(String username, String password, UDDISecurityPortType sec) {
        try {
            GetAuthToken getAuthTokenRoot = new GetAuthToken();
            getAuthTokenRoot.setUserID(username);
            getAuthTokenRoot.setCred(password);
            return sec.getAuthToken(getAuthTokenRoot).getAuthInfo();
        } catch (Exception ex) {
            ex.printStackTrace();
        }
        return null;
View Full Code Here

   *
   * @exception RegistryV3Exception;
   */
  public AuthToken getAuthToken(String userID, String cred)
      throws RegistryV3Exception {
    GetAuthToken request = this.objectFactory.createGetAuthToken();

    if (userID != null) {
      request.setUserID(userID);
    }

    if (cred != null) {
      request.setCred(cred);
    }

    URI getAuthTokenURI = null;
    if ("3.0".equals(uddiVersion)) {
      getAuthTokenURI = this.getSecurityURI();
View Full Code Here

TOP

Related Classes of org.uddi.api_v2.GetAuthToken

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.