Package org.uddi.api_v2

Examples of org.uddi.api_v2.DiscardAuthToken


                return r;
               
        }
       
        public static TModelList MapTModelListElement(org.uddi.api_v3.TModelList findTModel, String operator) {
                TModelList r = new TModelList();
                r.setGeneric(VERSION);
                r.setOperator(operator);
                r.setTModelInfos(new TModelInfos());
                if (findTModel == null) {
                        r.setTruncated(Truncated.FALSE);
                        return r;
                }
               
                if (findTModel.isTruncated() != null && findTModel.isTruncated()) {
                        r.setTruncated(Truncated.TRUE);
                } else {
                        r.setTruncated(Truncated.FALSE);
                }
                if (findTModel.getTModelInfos() != null) {
                       
                        r.getTModelInfos().getTModelInfo().addAll(MapTModelInfo(findTModel.getTModelInfos().getTModelInfo()));
                }
               
                return r;
        }
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

         * This kills any authentication tokens, logs the user out and nulls out
         * all services
         */
        public void die() {
                if (token != null && security != null) {
                        DiscardAuthToken da = new DiscardAuthToken();
                        da.setAuthInfo(token);
                        try {
                                security.discardAuthToken(da);
                        } catch (Exception ex) {
                                HandleException(ex);
                        }
View Full Code Here

                        UDDISecurityPortType security = null;
                        UDDIClient clerkManager = new UDDIClient("META-INF/simple-publish-uddi.xml");
                        Transport transport = clerkManager.getTransport();
                        security = transport.getUDDISecurityService();

                        DiscardAuthToken getAuthTokenRoot = new DiscardAuthToken();
                        getAuthTokenRoot.setAuthInfo(authtoken);
                        security.discardAuthToken(getAuthTokenRoot);
                        System.out.println("Success!");
                }

                if (input.equals("22")) {
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_v2.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.