Package org.uddi.api_v3

Examples of org.uddi.api_v3.DiscardAuthToken


  }

  public void deletePublisherAssertion(String authInfo, String pubassertXML) {
    try {
      // Delete the entity and make sure it is removed
      DeletePublisherAssertions dp = new DeletePublisherAssertions();
      dp.setAuthInfo(authInfo);
     
      PublisherAssertion paIn = (PublisherAssertion)EntityCreator.buildFromDoc(pubassertXML, "org.uddi.api_v3");
      dp.getPublisherAssertion().add(paIn);
     
      publication.deletePublisherAssertions(dp);
    }
    catch(Exception e) {
      logger.error(e.getMessage(), e);
View Full Code Here


  }
 
  public void deleteService(String authInfo, String serviceKey) {
    try {
      // Delete the entity and make sure it is removed
      DeleteService ds = new DeleteService();
      ds.setAuthInfo(authInfo);
     
      ds.getServiceKey().add(serviceKey);
      publication.deleteService(ds);
    }
    catch(Exception e) {
      logger.error(e.getMessage(), e);
      Assert.fail("No exception should be thrown.");
View Full Code Here

 
  public void deleteServices(String authInfo, String serviceKey, int numberOfCopies) {
    try {
      for (int i=0; i<numberOfCopies; i++) {
        // Delete the entity and make sure it is removed
        DeleteService ds = new DeleteService();
        ds.setAuthInfo(authInfo);
       
        ds.getServiceKey().add(serviceKey + "-" + i);
        publication.deleteService(ds);
        logger.debug("Deleted Service with key " + serviceKey + "-" + i);
      }
    }
    catch(Exception e) {
View Full Code Here

  public void deleteTModel(String authInfo, String tModelXml, String tModelKey) {
   
    try {
      //Now deleting the TModel
      // Delete the entity and make sure it is removed
      DeleteTModel dt = new DeleteTModel();
      dt.setAuthInfo(authInfo);
     
      dt.getTModelKey().add(tModelKey);
      publication.deleteTModel(dt);
     
    } catch(Exception e) {
      logger.error(e.getMessage(),e);
      Assert.fail("No exception should be thrown");
View Full Code Here

      HttpServletRequest request = getThreadLocalRequest();
      HttpSession session = request.getSession();
      String token = (String) session.getAttribute("AuthToken");
      Transport transport = WebHelper.getTransport(session.getServletContext());
      UDDISecurityPortType securityService = transport.getUDDISecurityService();
      DiscardAuthToken discardAuthToken = new DiscardAuthToken();
      discardAuthToken.setAuthInfo(token);
      securityService.discardAuthToken(discardAuthToken);
      log.info("User " + username + " invalided token");
    } catch (Exception e) {
      log.error(e.getMessage(),e);
    }
View Full Code Here

  }
 
  private String getAuthToken(String endpointURL) throws TransportException, DispositionReportFaultMessage, RemoteException {
    //if the token is older then 10 minutes discard it, and create a new one.
    if ((authToken!=null && !"".equals(authToken)) && (tokenBirthDate !=null && System.currentTimeMillis() > tokenBirthDate.getTime() + 600000 )) {
      DiscardAuthToken discardAuthToken = new DiscardAuthToken();
      discardAuthToken.setAuthInfo(authToken);
      getUDDINode().getTransport().getUDDISecurityService(endpointURL).discardAuthToken(discardAuthToken);
      authToken=null;
    }
    if (authToken==null || "".equals(authToken)) {
      tokenBirthDate = new Date();
View Full Code Here

         * @param token
         */
        public void discardAuthToken(String token) {
                if (token != null) {
                        try {
                                DiscardAuthToken discardAuthToken = new DiscardAuthToken();
                                discardAuthToken.setAuthInfo(token);
                                getUDDINode().getTransport().getUDDISecurityService(getUDDINode().getSecurityUrl()).discardAuthToken(discardAuthToken);
                                token = null;
                        } catch (Exception ex) {
                                log.warn("Error discarding auth token: " + ex.getMessage());
                                log.debug("Error discarding auth token: " + ex.getMessage(), ex);
View Full Code Here

         * @param endpoint
         */
        public void discardAuthToken(String token, String endpoint) {
                if (token != null) {
                        try {
                                DiscardAuthToken discardAuthToken = new DiscardAuthToken();
                                discardAuthToken.setAuthInfo(token);
                                getUDDINode().getTransport().getUDDISecurityService(endpoint).discardAuthToken(discardAuthToken);
                                token = null;
                        } catch (Exception ex) {
                                log.warn("Error discarding auth token: " + ex.getMessage());
                                log.debug("Error discarding auth token: " + ex.getMessage(), ex);
View Full Code Here

         * @throws RemoteException
         */
        public String getAuthToken(String endpointURL) throws TransportException, DispositionReportFaultMessage, RemoteException {
                //if the token is older then 10 minutes discard it, and create a new one.
                if ((authToken != null && !"".equals(authToken)) && (tokenBirthDate != null && System.currentTimeMillis() > tokenBirthDate.getTime() + 600000)) {
                        DiscardAuthToken discardAuthToken = new DiscardAuthToken();
                        discardAuthToken.setAuthInfo(authToken);
                        getUDDINode().getTransport().getUDDISecurityService(endpointURL).discardAuthToken(discardAuthToken);
                        authToken = null;
                }
                if (authToken == null || "".equals(authToken)) {
                        if (getPublisher()==null || getPassword()==null){
View Full Code Here

         BusinessList findBusiness = GetBusinessList(token);
         PrintBusinessInfo(findBusiness.getBusinessInfos());
         PrintBusinessDetails(findBusiness.getBusinessInfos(), token);
         PrintServiceDetailsByBusiness(findBusiness.getBusinessInfos(), token);

         security.discardAuthToken(new DiscardAuthToken(token));

      } catch (Exception e) {
         e.printStackTrace();
      }
   }
View Full Code Here

TOP

Related Classes of org.uddi.api_v3.DiscardAuthToken

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.