Package org.apache.juddi.v3.error

Examples of org.apache.juddi.v3.error.AssertionNotFoundException


 
  private AuthToken login(String username, String password, ServletContext servletContext) throws ConfigurationException, ClassNotFoundException,
    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());
View Full Code Here


  public void logout(String username) throws ConfigurationException {
    try {
      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) {
View Full Code Here

   
    PublicationResponse response = new PublicationResponse();
    logger.debug("GetRegistrationInfo " + getRegistrationInfo + " sending get Busineses request..");
    List<Business> businesses = new ArrayList<Business>();
    try {
       Transport transport = WebHelper.getTransport(session.getServletContext());
           UDDIPublicationPortType publicationService = transport.getUDDIPublishService();
           RegisteredInfo info = publicationService.getRegisteredInfo(getRegistrationInfo);
           for (BusinessInfo businessInfo : info.getBusinessInfos().getBusinessInfo()) {
        Business business = new Business(
            businessInfo.getBusinessKey(),
            EntityForLang.getName(businessInfo.getName(),lang).getValue(),
View Full Code Here

      try {
        String clazz = getProxyTransport();
        Class<?> transportClass = Loader.loadClass(clazz);
        transport = (Transport) transportClass.getConstructor(String.class,String.class).newInstance(managerName,name);
      } catch (Exception e) {
        throw new TransportException(e.getMessage(),e);
      }
    }
    return transport;
  }
View Full Code Here

      throw new FatalErrorException(new ErrorMessage("errors.NullInput"));
   
    // No null or empty list
    List<org.uddi.api_v3.PublisherAssertion> entityList = body.getPublisherAssertion();
    if (entityList == null || entityList.size() == 0)
      throw new AssertionNotFoundException(new ErrorMessage("errors.pubassertion.NoPubAssertions"));

    for (org.uddi.api_v3.PublisherAssertion entity : entityList) {
     
      validatePublisherAssertion(em, entity);
     
      org.apache.juddi.model.PublisherAssertionId pubAssertionId = new org.apache.juddi.model.PublisherAssertionId(entity.getFromKey(), entity.getToKey());
      Object obj = em.find(org.apache.juddi.model.PublisherAssertion.class, pubAssertionId);
      if (obj == null)
        throw new AssertionNotFoundException(new ErrorMessage("errors.pubassertion.AssertionNotFound", entity.getFromKey() + ", " + entity.getToKey()));
      else {
        org.apache.juddi.model.PublisherAssertion pubAssertion = (org.apache.juddi.model.PublisherAssertion)obj;
        org.uddi.api_v3.KeyedReference keyedRef = entity.getKeyedReference();
        if (keyedRef == null)
          throw new AssertionNotFoundException(new ErrorMessage("errors.pubassertion.AssertionNotFound", entity.getFromKey() + ", " + entity.getToKey()));

        if (!pubAssertion.getTmodelKey().equalsIgnoreCase(keyedRef.getTModelKey()) ||
          !pubAssertion.getKeyName().equalsIgnoreCase(keyedRef.getKeyName()) ||
          !pubAssertion.getKeyValue().equalsIgnoreCase(keyedRef.getKeyValue()))
          throw new AssertionNotFoundException(new ErrorMessage("errors.pubassertion.AssertionNotFound", entity.getFromKey() + ", " + entity.getToKey()));

      }
     
    }
  }
View Full Code Here

      throw new FatalErrorException(new ErrorMessage("errors.NullInput"));
   
    // No null or empty list
    List<org.uddi.api_v3.PublisherAssertion> entityList = body.getPublisherAssertion();
    if (entityList == null || entityList.size() == 0)
      throw new AssertionNotFoundException(new ErrorMessage("errors.pubassertion.NoPubAssertions"));

    for (org.uddi.api_v3.PublisherAssertion entity : entityList) {
     
      validatePublisherAssertion(em, entity);
     
      org.apache.juddi.model.PublisherAssertionId pubAssertionId = new org.apache.juddi.model.PublisherAssertionId(entity.getFromKey(), entity.getToKey());
      Object obj = em.find(org.apache.juddi.model.PublisherAssertion.class, pubAssertionId);
      if (obj == null)
        throw new AssertionNotFoundException(new ErrorMessage("errors.pubassertion.AssertionNotFound", entity.getFromKey() + ", " + entity.getToKey()));
      else {
        org.apache.juddi.model.PublisherAssertion pubAssertion = (org.apache.juddi.model.PublisherAssertion)obj;
        org.uddi.api_v3.KeyedReference keyedRef = entity.getKeyedReference();
        if (keyedRef == null)
          throw new AssertionNotFoundException(new ErrorMessage("errors.pubassertion.AssertionNotFound", entity.getFromKey() + ", " + entity.getToKey()));

        if (!pubAssertion.getTmodelKey().equalsIgnoreCase(keyedRef.getTModelKey()) ||
          !pubAssertion.getKeyName().equalsIgnoreCase(keyedRef.getKeyName()) ||
          !pubAssertion.getKeyValue().equalsIgnoreCase(keyedRef.getKeyValue()))
          throw new AssertionNotFoundException(new ErrorMessage("errors.pubassertion.AssertionNotFound", entity.getFromKey() + ", " + entity.getToKey()));

      }
     
    }
  }
View Full Code Here

      throw new FatalErrorException(new ErrorMessage("errors.NullInput"));
   
    // No null or empty list
    List<org.uddi.api_v3.PublisherAssertion> entityList = body.getPublisherAssertion();
    if (entityList == null || entityList.size() == 0)
      throw new AssertionNotFoundException(new ErrorMessage("errors.pubassertion.NoPubAssertions"));

    for (org.uddi.api_v3.PublisherAssertion entity : entityList) {
     
      validatePublisherAssertion(em, entity);
     
      org.apache.juddi.model.PublisherAssertionId pubAssertionId = new org.apache.juddi.model.PublisherAssertionId(entity.getFromKey(), entity.getToKey());
      Object obj = em.find(org.apache.juddi.model.PublisherAssertion.class, pubAssertionId);
      if (obj == null)
        throw new AssertionNotFoundException(new ErrorMessage("errors.pubassertion.AssertionNotFound", entity.getFromKey() + ", " + entity.getToKey()));
      else {
        org.apache.juddi.model.PublisherAssertion pubAssertion = (org.apache.juddi.model.PublisherAssertion)obj;
        org.uddi.api_v3.KeyedReference keyedRef = entity.getKeyedReference();
        if (keyedRef == null)
          throw new AssertionNotFoundException(new ErrorMessage("errors.pubassertion.AssertionNotFound", entity.getFromKey() + ", " + entity.getToKey()));

        if (!pubAssertion.getTmodelKey().equalsIgnoreCase(keyedRef.getTModelKey()) ||
          !pubAssertion.getKeyName().equalsIgnoreCase(keyedRef.getKeyName()) ||
          !pubAssertion.getKeyValue().equalsIgnoreCase(keyedRef.getKeyValue()))
          throw new AssertionNotFoundException(new ErrorMessage("errors.pubassertion.AssertionNotFound", entity.getFromKey() + ", " + entity.getToKey()));

      }
     
    }
  }
View Full Code Here

                }

                // No null or empty list
                List<org.uddi.api_v3.PublisherAssertion> entityList = body.getPublisherAssertion();
                if (entityList == null || entityList.size() == 0) {
                        throw new AssertionNotFoundException(new ErrorMessage("errors.pubassertion.NoPubAssertions"));
                }

                for (org.uddi.api_v3.PublisherAssertion entity : entityList) {
                        validateKeyLength(entity.getFromKey());
                        validateKeyLength(entity.getToKey());
                        validatePublisherAssertion(em, entity);

                        org.apache.juddi.model.PublisherAssertionId pubAssertionId = new org.apache.juddi.model.PublisherAssertionId(entity.getFromKey(), entity.getToKey());
                        Object obj = em.find(org.apache.juddi.model.PublisherAssertion.class, pubAssertionId);
                        if (obj == null) {
                                throw new AssertionNotFoundException(new ErrorMessage("errors.pubassertion.AssertionNotFound", entity.getFromKey() + ", " + entity.getToKey()));
                        } else {
                                org.apache.juddi.model.PublisherAssertion pubAssertion = (org.apache.juddi.model.PublisherAssertion) obj;
                                org.uddi.api_v3.KeyedReference keyedRef = entity.getKeyedReference();
                                if (keyedRef == null) {
                                        throw new AssertionNotFoundException(new ErrorMessage("errors.pubassertion.AssertionNotFound", entity.getFromKey() + ", " + entity.getToKey()));
                                }

                                if (!pubAssertion.getTmodelKey().equalsIgnoreCase(keyedRef.getTModelKey())
                                        || !pubAssertion.getKeyName().equalsIgnoreCase(keyedRef.getKeyName())
                                        || !pubAssertion.getKeyValue().equalsIgnoreCase(keyedRef.getKeyValue())) {
                                        throw new AssertionNotFoundException(new ErrorMessage("errors.pubassertion.AssertionNotFound", entity.getFromKey() + ", " + entity.getToKey()));
                                }

                        }

                }
View Full Code Here

        }

        // No null or empty list
        List<org.uddi.api_v3.PublisherAssertion> entityList = body.getPublisherAssertion();
        if (entityList == null || entityList.size() == 0) {
            throw new AssertionNotFoundException(new ErrorMessage("errors.pubassertion.NoPubAssertions"));
        }

        for (org.uddi.api_v3.PublisherAssertion entity : entityList) {
            validateKeyLength(entity.getFromKey());
            validateKeyLength(entity.getToKey());
            validatePublisherAssertion(em, entity);

            org.apache.juddi.model.PublisherAssertionId pubAssertionId = new org.apache.juddi.model.PublisherAssertionId(entity.getFromKey(), entity.getToKey());
            Object obj = em.find(org.apache.juddi.model.PublisherAssertion.class, pubAssertionId);
            if (obj == null) {
                throw new AssertionNotFoundException(new ErrorMessage("errors.pubassertion.AssertionNotFound", entity.getFromKey() + ", " + entity.getToKey()));
            } else {
                org.apache.juddi.model.PublisherAssertion pubAssertion = (org.apache.juddi.model.PublisherAssertion) obj;
                org.uddi.api_v3.KeyedReference keyedRef = entity.getKeyedReference();
                if (keyedRef == null) {
                    throw new AssertionNotFoundException(new ErrorMessage("errors.pubassertion.AssertionNotFound", entity.getFromKey() + ", " + entity.getToKey()));
                }

                if (!pubAssertion.getTmodelKey().equalsIgnoreCase(keyedRef.getTModelKey())
                        || !pubAssertion.getKeyName().equalsIgnoreCase(keyedRef.getKeyName())
                        || !pubAssertion.getKeyValue().equalsIgnoreCase(keyedRef.getKeyValue())) {
                    throw new AssertionNotFoundException(new ErrorMessage("errors.pubassertion.AssertionNotFound", entity.getFromKey() + ", " + entity.getToKey()));
                }

            }

        }
View Full Code Here

      throw new FatalErrorException(new ErrorMessage("errors.NullInput"));
   
    // No null or empty list
    List<org.uddi.api_v3.PublisherAssertion> entityList = body.getPublisherAssertion();
    if (entityList == null || entityList.size() == 0)
      throw new AssertionNotFoundException(new ErrorMessage("errors.pubassertion.NoPubAssertions"));

    for (org.uddi.api_v3.PublisherAssertion entity : entityList) {
     
      validatePublisherAssertion(em, entity);
     
      org.apache.juddi.model.PublisherAssertionId pubAssertionId = new org.apache.juddi.model.PublisherAssertionId(entity.getFromKey(), entity.getToKey());
      Object obj = em.find(org.apache.juddi.model.PublisherAssertion.class, pubAssertionId);
      if (obj == null)
        throw new AssertionNotFoundException(new ErrorMessage("errors.pubassertion.AssertionNotFound", entity.getFromKey() + ", " + entity.getToKey()));
      else {
        org.apache.juddi.model.PublisherAssertion pubAssertion = (org.apache.juddi.model.PublisherAssertion)obj;
        org.uddi.api_v3.KeyedReference keyedRef = entity.getKeyedReference();
        if (keyedRef == null)
          throw new AssertionNotFoundException(new ErrorMessage("errors.pubassertion.AssertionNotFound", entity.getFromKey() + ", " + entity.getToKey()));

        if (!pubAssertion.getTmodelKey().equalsIgnoreCase(keyedRef.getTModelKey()) ||
          !pubAssertion.getKeyName().equalsIgnoreCase(keyedRef.getKeyName()) ||
          !pubAssertion.getKeyValue().equalsIgnoreCase(keyedRef.getKeyValue()))
          throw new AssertionNotFoundException(new ErrorMessage("errors.pubassertion.AssertionNotFound", entity.getFromKey() + ", " + entity.getToKey()));

      }
     
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.juddi.v3.error.AssertionNotFoundException

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.