Package org.apache.juddi.v3.client.transport

Examples of org.apache.juddi.v3.client.transport.TransportException


 
  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

      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

            final UDDIClerkManager manager = UDDIClientContainer.getUDDIClerkManager(managerName) ;
            return manager.getClientConfig().getUDDINode(nodeName) ;
        }
        catch (final ConfigurationException ce)
        {
            throw new TransportException("Failed to retrieve UDDI node: " + nodeName, ce) ;
        }
    }
View Full Code Here

    private static void initialiseEndpoint(final Object endpoint, final String endpointURL)
        throws TransportException
    {
        if (!(endpoint instanceof BindingProvider))
        {
            throw new TransportException("Endpoint does not implement BindingProvider interface") ;
        }
        final BindingProvider provider = (BindingProvider)endpoint ;
        final Map<String, Object> requestContext = provider.getRequestContext() ;
        requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpointURL) ;
    }
View Full Code Here

        {
            uri = new URI(url) ;
        }
        catch (final URISyntaxException urise)
        {
            throw new TransportException("Failed to parse service URL", urise) ;
        }
        final String serviceLocation = uri.getPath() ;
        if (logger.isDebugEnabled())
        {
            logger.debug("Looking up service=" + serviceLocation) ;
        }
        final Object service ;
        try
        {
            final InitialContext context = new InitialContext(env) ;
            service = context.lookup(serviceLocation) ;
        }
        catch (final NamingException ne)
        {
            throw new TransportException("Failure during JNDI lookup of service: " + serviceLocation, ne) ;
        }
        return (T)service ;
    }
View Full Code Here

            final UDDIClerkManager manager = UDDIClientContainer.getUDDIClerkManager(managerName) ;
            return manager.getClientConfig().getUDDINode(nodeName) ;
        }
        catch (final ConfigurationException ce)
        {
            throw new TransportException("Failed to retrieve UDDI node: " + nodeName, ce) ;
        }
    }
View Full Code Here

    public void start(final int numThreads)
        throws TransportException
    {
        if (!executorServiceReference.compareAndSet(null, Executors.newFixedThreadPool(numThreads, new ScopedThreadFactory())))
        {
            throw new TransportException("Executor service already initialised") ;
        }
        JuddiInVMTransport.setImplementation(this) ;
    }
View Full Code Here

    public static synchronized ESBInVMTransport getImplementation()
        throws TransportException
    {
        if (implementation == null)
        {
            throw new TransportException("Transport implementation not yet initialised") ;
        }
        return implementation ;
    }
View Full Code Here

                final UDDIClerkManager manager = UDDIClientContainer.getUDDIClerkManager(managerName) ;
                juddiApiUrl = manager.getClientConfig().getUDDINode(nodeName).getJuddiApiUrl() ;
            }
            catch (final ConfigurationException ce)
            {
                throw new TransportException("Could not discover juddiApiUrl for node " + nodeName, ce) ;
            }
        }
        else
        {
            juddiApiUrl = endpointURL ;
View Full Code Here

TOP

Related Classes of org.apache.juddi.v3.client.transport.TransportException

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.