Examples of AuthToken


Examples of org.uddi.api_v3.AuthToken

            
             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();
           }
       } catch (Exception e) {
View Full Code Here

Examples of org.uddi.api_v3.AuthToken

        log("Could not obtain username, this session is invalid.");
        response.setSuccess(false);
        return response;
      } else {
        try {
          AuthToken authToken = login(username, password, session.getServletContext());
          response.setSuccess(true);
          response.setResponse(authToken.getAuthInfo());
          session.setAttribute("AuthToken", authToken.getAuthInfo());
          session.setAttribute("UserName", username);
         
            setClerkAuthenticationTokensInSession(username);
        } catch (Exception e) {
          log.error("Could not obtain token. " + e.getMessage(), e);
View Full Code Here

Examples of org.uddi.api_v3.AuthToken

        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

Examples of org.uddi.api_v3.AuthToken

    for (UDDIClerk clerk : clerks.values()) {
      //only setting token for the clerks of the current user/publisher
      if (username.equals(clerk.getPublisher())) {
        try {
          if (session.getAttribute("token-" + clerk.getName())==null) {
            AuthToken clerkToken = login(clerk.getPublisher(), clerk.getPassword(), session.getServletContext());
            //set the clerkToken into the session
            session.setAttribute("token-" + clerk.getName(), clerkToken.getAuthInfo());
          }
        } catch (Exception e) {
          log.warn("Could not obtain authToken for clerk=" + clerk.getName());
        }
      }
View Full Code Here

Examples of org.uddi.api_v3.AuthToken

                        for (String entityKey : entityKeyList) {
                          Publisher obj = em.find(org.apache.juddi.model.Publisher.class, entityKey);
                       
                          //get an authtoken for this publisher so that we can get its registeredInfo
                          UDDISecurityImpl security = new UDDISecurityImpl();
                          AuthToken authToken = security.getAuthToken(entityKey);
                         
                          GetRegisteredInfo r = new GetRegisteredInfo();
                          r.setAuthInfo(authToken.getAuthInfo());
                          r.setInfoSelection(InfoSelection.ALL);
                        
                          log.info("removing all businesses owned by publisher " + entityKey + ".");
                          UDDIPublicationImpl publish = new UDDIPublicationImpl();
                          RegisteredInfo registeredInfo = publish.getRegisteredInfo(r);
View Full Code Here

Examples of org.uddi.api_v3.AuthToken

  @Test
  public void subscribe() throws Throwable
  {
    GetAuthenticationToken getAuthenticationToken = new GetAuthenticationToken();
    getAuthenticationToken.run();
    AuthToken authToken = getAuthenticationToken.getAuthenticationToken();
   
    RegisterBusiness registerBusiness = new RegisterBusiness(authToken, "Abonement");
    registerBusiness.run();
   
    //FindBusinessByName findBusinessByName = new FindBusinessByName(authToken,
View Full Code Here

Examples of org.uddi.api_v3.AuthToken

  public void deleteService() throws Throwable
  {
    GetAuthenticationToken getAuthenticationToken = new GetAuthenticationToken();
    getAuthenticationToken.run();
 
    AuthToken authToken= getAuthenticationToken.getAuthenticationToken();
   
    FindServices findServices = new FindServices(authToken);
    findServices.run();
   
    System.out.println(name);
View Full Code Here

Examples of org.uddi.api_v3.AuthToken

  {
    GetAuthenticationToken getAuthenticationToken = new GetAuthenticationToken();
    getAuthenticationToken.run();
   
    //Get the AuthToken
    AuthToken authToken= getAuthenticationToken.getAuthenticationToken();
   
    BusinessEntity businessEntity;
   
    // If there are no businesses in the data pool submit one with a rate of 100
    // to ensure that it will be entered
View Full Code Here

Examples of org.uddi4j.response.AuthToken

    if (! PublisherManager.createPublisher("saveBindingPublisher","saveBindingPublisher", config)) {
      fail("Unable to create publisher");
      return;
    }

    AuthToken _bindingToken = null;
    try {
      _bindingToken = proxy.get_authToken("saveBindingPublisher", "password");
    }
    catch (TransportException ex1) {
      fail(ex1.toString());
    }
    catch (UDDIException ex1) {
      fail(ex1.toString());
    }

    BusinessEntity bEntity = new BusinessEntity();

    bEntity.setDefaultName(new Name("saveBindingBusiness"));
    Vector busVector = new Vector();
    busVector.add(bEntity);

    Vector victor = null;
    try {
      BusinessDetail busDetail = proxy.save_business(token.getAuthInfoString(),
          busVector);
      victor = busDetail.getBusinessEntityVector();
      assertEquals(victor.size(), 1);
    }
    catch (TransportException ex) {
      fail(ex.toString());
      return;
    }
    catch (UDDIException ex) {
      fail(ex.toString());
      return;
    }

    BusinessEntity returnedBusinessEntity = (BusinessEntity)victor.elementAt(0);

    BusinessService service = new BusinessService();
    service.setBusinessKey(returnedBusinessEntity.getBusinessKey());
    Name name = new Name("saveBindingService");
    service.setDefaultName(name);

    java.util.Vector servicesVector = new Vector();
    servicesVector.add(service);
    try {
      proxy.save_service(_bindingToken.getAuthInfoString(), servicesVector);
      ServiceDetail detail = proxy.save_service(token.getAuthInfoString(), servicesVector);
      servicesVector = detail.getBusinessServiceVector();
      assertEquals(servicesVector.size(), 1);
      _businessService = (BusinessService)servicesVector.elementAt(0);
      assertNotNull(_businessService);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.