Package org.apache.juddi.v3.client.mapping.wsdl

Examples of org.apache.juddi.v3.client.mapping.wsdl.WSDL2UDDI


    }
    logger.debug("Getting auth tokens..");
    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);
            
             UDDIPublicationPortType publication = transport.getUDDIPublishService();
             UDDIInquiryPortType inquiry = transport.getUDDIInquiryService();
             tckTModel  = new TckTModel(publication, inquiry);
           } else {
             Assert.fail();
           }
       } catch (Exception e) {
View Full Code Here


        try {
            String clazz = UDDIClientContainer.getUDDIClerkManager(null).
              getClientConfig().getUDDINode("default").getProxyTransport();
            Class<?> transportClass = ClassUtil.forName(clazz, Transport.class);
      if (transportClass!=null) {
        Transport transport = (Transport) transportClass.
          getConstructor(String.class).newInstance("default");
        security = transport.getUDDISecurityService();
     
    } catch (Exception e) {
      e.printStackTrace();
   
  }
View Full Code Here

 
  public static Transport getTransport(ServletContext servletContext)
       throws ConfigurationException, ClassNotFoundException, IllegalArgumentException,
        SecurityException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException
  {
    Transport transport = (Transport) servletContext.getAttribute(JUDDI_CLIENT_TRANSPORT_INSTANCE);
    if (transport==null) {
      UDDIClerkManager manager = getUDDIClerkManager(servletContext);
      UDDINode node = getUDDIHomeNode(servletContext);
      Class<?> transportClass = ClassUtil.forName(node.getProxyTransport(), Transport.class);
      transport = (Transport) transportClass.getConstructor(String.class,String.class).newInstance(manager.getName(),node.getName());
View Full Code Here

 
  public static Transport getTransport(ServletContext servletContext, UDDINode remoteNode)
     throws ConfigurationException, ClassNotFoundException, IllegalArgumentException,
      SecurityException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException
  {
    Transport transport = (Transport) servletContext.getAttribute(JUDDI_CLIENT_TRANSPORT_INSTANCE + "-" + remoteNode.getName());
    if (transport==null) {
      UDDIClerkManager manager = getUDDIClerkManager(servletContext);
      Class<?> transportClass = ClassUtil.forName(remoteNode.getProxyTransport(), Transport.class);
      transport = (Transport) transportClass.getConstructor(String.class,String.class).newInstance(manager.getName(),remoteNode.getName());
      servletContext.setAttribute(JUDDI_CLIENT_TRANSPORT_INSTANCE + "-" + remoteNode.getName(), transport);
View Full Code Here

    logger.debug("GetPublisherDetail " + getPublisherDetail + " sending get PublisherDetail request..");
   
    JUDDIApiResponse response = new JUDDIApiResponse();
    List<Publisher> publishers = new ArrayList<Publisher>();
    try {
       Transport transport = WebHelper.getTransport(session.getServletContext());
           JUDDIApiPortType apiService = transport.getJUDDIApiService();
           PublisherDetail publisherDetail = apiService.getPublisherDetail(getPublisherDetail);
           //if the publisher is an admin, then return ALL publishers
           if ("true".equalsIgnoreCase(publisherDetail.getPublisher().get(0).getIsAdmin())) {
            
             GetAllPublisherDetail getAllPublisherDetail = new GetAllPublisherDetail();
View Full Code Here

  public JUDDIApiResponse savePublisher(String token, Publisher publisher) {
    JUDDIApiResponse response = new JUDDIApiResponse();
    HttpServletRequest request = this.getThreadLocalRequest();
    HttpSession session = request.getSession();
    try {
       Transport transport = WebHelper.getTransport(session.getServletContext());
            JUDDIApiPortType apiService = transport.getJUDDIApiService();
            SavePublisher savePublisher = new SavePublisher();
            savePublisher.setAuthInfo(token);
            org.apache.juddi.api_v3.Publisher apiPublisher = new org.apache.juddi.api_v3.Publisher();
            BeanUtils.copyProperties(apiPublisher, publisher);
            savePublisher.getPublisher().add(apiPublisher);
View Full Code Here

  public JUDDIApiResponse deletePublisher(String token, String publisherId) {
    HttpServletRequest request = this.getThreadLocalRequest();
    HttpSession session = request.getSession();
    JUDDIApiResponse response = new JUDDIApiResponse();
    try {
       Transport transport = WebHelper.getTransport(session.getServletContext());
            JUDDIApiPortType apiService = transport.getJUDDIApiService();
            DeletePublisher deletePublisher = new DeletePublisher();
           deletePublisher.setAuthInfo(token);
            deletePublisher.getPublisherId().add(publisherId);
            apiService.deletePublisher(deletePublisher);
           response.setSuccess(true);
View Full Code Here

    GetPublisherDetail getPublisherDetail = new GetPublisherDetail();
    getPublisherDetail.setAuthInfo(authToken);
    getPublisherDetail.getPublisherId().add(username);
   
    try {
       Transport transport = WebHelper.getTransport(session.getServletContext());
           JUDDIApiPortType apiService = transport.getJUDDIApiService();
           PublisherDetail publisherDetail = apiService.getPublisherDetail(getPublisherDetail);
              org.apache.juddi.api_v3.Publisher publisher = publisherDetail.getPublisher().get(0);
              if ("true".equalsIgnoreCase(publisher.getIsAdmin())) {
               UDDIClerkManager manager =  WebHelper.getUDDIClerkManager(session.getServletContext());
               logger.info("managerName=" + manager.getName());
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());
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

TOP

Related Classes of org.apache.juddi.v3.client.mapping.wsdl.WSDL2UDDI

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.