Package org.uddi.v3_service

Examples of org.uddi.v3_service.UDDISecurityPortType


         String clazz = UDDIClientContainer.getDefaultTransportClass();
           Class<?> transportClass = ClassUtil.forName(clazz, Transport.class);
           if (transportClass!=null) {
             Transport transport = (Transport) transportClass.getConstructor(String.class).newInstance("default");
            
             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();
           }
View Full Code Here


    try {
           Class<?> transportClass = ClassUtil.forName(clazz, Transport.class);
           if (transportClass!=null) {
             Transport transport = (Transport) transportClass.getConstructor(String.class).newInstance("default");
            
             UDDISecurityPortType security = transport.getUDDISecurityService();
             authInfoJoe = TckSecurity.getAuthToken(security, TckPublisher.JOE_PUBLISHER_ID,  TckPublisher.JOE_PUBLISHER_CRED);
             Assert.assertNotNull(authInfoJoe);
            
             UDDIPublicationPortType publication = transport.getUDDIPublishService();
             UDDIInquiryPortType inquiry = transport.getUDDIInquiryService();
View Full Code Here

    try {
           Class<?> transportClass = ClassUtil.forName(clazz, Transport.class);
           if (transportClass!=null) {
             Transport transport = (Transport) transportClass.getConstructor(String.class).newInstance("default");
            
             UDDISecurityPortType security = transport.getUDDISecurityService();
             authInfoJoe = TckSecurity.getAuthToken(security, TckPublisher.JOE_PUBLISHER_ID, TckPublisher.JOE_PUBLISHER_CRED);
             Assert.assertNotNull(authInfoJoe);
             authInfoSam = TckSecurity.getAuthToken(security, TckPublisher.SAM_SYNDICATOR_ID, TckPublisher.SAM_SYNDICATOR_CRED);
             Assert.assertNotNull(authInfoSam);
            
View Full Code Here

  public static void setup() throws ConfigurationException, RemoteException {
    Registry.start();
    logger.debug("Getting auth tokens..");
    try {
      api010.saveJoePublisher();
      UDDISecurityPortType security      = new UDDISecurityImpl();
      authInfoJoe = TckSecurity.getAuthToken(security, TckPublisher.JOE_PUBLISHER_ID,  TckPublisher.JOE_PUBLISHER_CRED);
    } catch (DispositionReportFaultMessage e) {
      logger.error(e.getMessage(), e);
      Assert.fail("Could not obtain authInfo token.");
    }
View Full Code Here

    try {
           Class<?> transportClass = ClassUtil.forName(clazz, Transport.class);
           if (transportClass!=null) {
             Transport transport = (Transport) transportClass.getConstructor(String.class).newInstance("default");
            
             UDDISecurityPortType security = transport.getUDDISecurityService();
             authInfoJoe = TckSecurity.getAuthToken(security, TckPublisher.JOE_PUBLISHER_ID,  TckPublisher.JOE_PUBLISHER_CRED);
          authInfoSam = TckSecurity.getAuthToken(security, TckPublisher.SAM_SYNDICATOR_ID,  TckPublisher.SAM_SYNDICATOR_CRED);
             Assert.assertNotNull(authInfoJoe);
             Assert.assertNotNull(authInfoSam);
            
View Full Code Here

    Registry.start();
    logger.debug("Getting auth tokens..");
    try {
      api010.saveJoePublisher();
      api010.saveSamSyndicator();
      UDDISecurityPortType security      = new UDDISecurityImpl();
      authInfoJoe = TckSecurity.getAuthToken(security, TckPublisher.JOE_PUBLISHER_ID,  TckPublisher.JOE_PUBLISHER_CRED);
      authInfoSam = TckSecurity.getAuthToken(security, TckPublisher.SAM_SYNDICATOR_ID,  TckPublisher.SAM_SYNDICATOR_CRED);
    } catch (DispositionReportFaultMessage e) {
      logger.error(e.getMessage(), e);
      Assert.fail("Could not obtain authInfo token.");
View Full Code Here

    try {
           Class<?> transportClass = ClassUtil.forName(clazz, Transport.class);
           if (transportClass!=null) {
             Transport transport = (Transport) transportClass.getConstructor(String.class).newInstance("default");
            
             UDDISecurityPortType security = transport.getUDDISecurityService();
             authInfoJoe = TckSecurity.getAuthToken(security, TckPublisher.JOE_PUBLISHER_ID,  TckPublisher.JOE_PUBLISHER_CRED);
          authInfoSam = TckSecurity.getAuthToken(security, TckPublisher.SAM_SYNDICATOR_ID,  TckPublisher.SAM_SYNDICATOR_CRED);
             Assert.assertNotNull(authInfoJoe);
             Assert.assertNotNull(authInfoSam);
            
View Full Code Here

  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());
    return authToken;
  }
View Full Code Here

    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) {
      log.error(e.getMessage(),e);
    }
  }
View Full Code Here

    @Override
    public UDDISecurityPortType getUDDISecurityService(final String endpointURL)
            throws TransportException
    {
        final UDDISecurityPortType currentSecurityService = securityService.get() ;
        if (currentSecurityService != null)
        {
            return currentSecurityService ;
        }
        final String securityURL = getUDDINode(managerName, nodeName).getSecurityUrl() ;
        final Service service = Service.create(WSDL_SECURITY_SERVICE, QNAME_SECURITY_SERVICE) ;
        final UDDISecurityPortType newSecurityService = (UDDISecurityPortType) service.getPort(UDDISecurityPortType.class) ;
        initialiseEndpoint(newSecurityService, securityURL) ;
        if (securityService.compareAndSet(null, newSecurityService))
        {
            return newSecurityService ;
        }
View Full Code Here

TOP

Related Classes of org.uddi.v3_service.UDDISecurityPortType

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.