Package org.apache.juddi.api_v3

Examples of org.apache.juddi.api_v3.ClientSubscriptionInfo


      Principal user = request.getUserPrincipal();
      if (user!=null) {
        username = user.getName();
      }
    }
    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);
View Full Code Here


 
  @Test
  public void addClientSubscriptionInfo() {
    ClientSubscriptionInfo clientSubscriptionInfo = new ClientSubscriptionInfo();
   
    Node node = new Node();
    node.setSecurityUrl("http://localhost:8080/services/securityUrl");
    node.setName("default");
   
    Clerk clerk = new Clerk();
    clerk.setName("default");
    clerk.setPublisher("root");
    clerk.setNode(node);
View Full Code Here

  public void setProperties(Properties properties) {
    this.properties = properties;
  }
 
  public Node getApiNode() {
    Node apiNode = new Node();
    apiNode.setCustodyTransferUrl(custodyTransferUrl);
    apiNode.setDescription(description);
    apiNode.setFactoryInitial(factoryInitial);
    apiNode.setFactoryNamingProvider(factoryNamingProvider);
    apiNode.setFactoryURLPkgs(factoryURLPkgs);
    apiNode.setInquiryUrl(inquiryUrl);
    apiNode.setJuddiApiUrl(juddiApiUrl);
    apiNode.setManagerName(managerName);
    apiNode.setName(name);
    apiNode.setProxyTransport(proxyTransport);
    apiNode.setPublishUrl(publishUrl);
    apiNode.setSecurityUrl(securityUrl);
    apiNode.setSubscriptionUrl(subscriptionUrl);
    return apiNode;
  }
View Full Code Here

 
  @Test
  public void addClientSubscriptionInfo() {
    ClientSubscriptionInfo clientSubscriptionInfo = new ClientSubscriptionInfo();
   
    Node node = new Node();
    node.setSecurityUrl("http://localhost:8080/services/securityUrl");
    node.setCustodyTransferUrl("http://localhost:8080/services/securityUrl");
    node.setDescription("description");
    node.setInquiryUrl("http://localhost:8080/services/securityUrl");
    node.setPublishUrl("http://localhost:8080/services/securityUrl");
    node.setProxyTransport("class");
    node.setSubscriptionUrl("http://localhost:8080/services/securityUrl");
    node.setName("default");
    node.setManagerName("defaultManager");
    SaveNode saveNode = new SaveNode();
    saveNode.setAuthInfo(authInfoJoe);
    saveNode.getNode().add(node);
   
    Clerk clerk = new Clerk();
    clerk.setName("clerkName");
    clerk.setPublisher("root");
    clerk.setNode(node);
    SaveClerk saveClerk = new SaveClerk();
    saveClerk.setAuthInfo(authInfoJoe);
    saveClerk.getClerk().add(clerk);
   
    clientSubscriptionInfo.setFromClerk(clerk);
   
    Node node2 = new Node();
    node2.setSecurityUrl("http://localhost:8080/services/securityUrl2");
    node2.setCustodyTransferUrl("https://localhost:8080/services/securityUrl2");
    node2.setDescription("description2");
    node2.setInquiryUrl("http://localhost:8080/services/securityUrl2");
    node2.setPublishUrl("http://localhost:8080/services/securityUrl2");
    node2.setProxyTransport("class2");
    node2.setSubscriptionUrl("http://localhost:8080/services/securityUrl2");
    node2.setName("default2");
    node2.setManagerName("default2Manager");
    saveNode.getNode().add(node2);
   
    Clerk clerk2 = new Clerk();
    clerk2.setName("clerkName2");
    clerk2.setPublisher("root");
View Full Code Here

    clientSubscriptionInfo2.setFromClerk(clerk2);
    saveClientSubscriptionInfo.getClientSubscriptionInfo().add(clientSubscriptionInfo2);
   
    try {

      NodeDetail nodeDetail = publisher.saveNode(saveNode);
      ClerkDetail clerkDetail = publisher.saveClerk(saveClerk);
      Assert.assertEquals(2,nodeDetail.getNode().size());
      Assert.assertEquals(2,clerkDetail.getClerk().size());
     
      ClientSubscriptionInfoDetail detail = publisher.saveClientSubscriptionInfo(saveClientSubscriptionInfo);
      Assert.assertEquals("mykey", detail.getClientSubscriptionInfo().get(0).getSubscriptionKey());
     
View Full Code Here

    }
    return authToken;
  }
 
  public NodeDetail saveNode(Node node)  {
    NodeDetail nodeDetail = null;
    try {
      log.info("Sending Node " + node.getName() + " info to jUDDI " + getUDDINode().getName());
      SaveNode saveNode = new SaveNode();
      saveNode.setAuthInfo(getAuthToken(node.getSecurityUrl()));
      saveNode.getNode().add(node);
View Full Code Here

 
      UddiEntityPublisher publisher = this.getEntityPublisher(em, body.getAuthInfo());
     
      new ValidateNode(publisher).validateSaveNode(em, body);
     
      NodeDetail result = new NodeDetail();
 
      List<org.apache.juddi.api_v3.Node> apiNodeList = body.getNode();;
      for (org.apache.juddi.api_v3.Node apiNode : apiNodeList) {
       
        org.apache.juddi.model.Node modelNode = new org.apache.juddi.model.Node();
       
        MappingApiToModel.mapNode(apiNode, modelNode);
       
        Object existingUddiEntity = em.find(modelNode.getClass(), modelNode.getName());
        if (existingUddiEntity != null) {
          em.merge(modelNode);
        } else {
            em.persist(modelNode);
        }
       
        result.getNode().add(apiNode);
      }
 
      tx.commit();
      return result;
    } finally {
View Full Code Here

 
      UddiEntityPublisher publisher = this.getEntityPublisher(em, body.getAuthInfo());
     
      new ValidateNode(publisher).validateSaveNode(em, body);
     
      NodeDetail result = new NodeDetail();
 
      List<org.apache.juddi.api_v3.Node> apiNodeList = body.getNode();;
      for (org.apache.juddi.api_v3.Node apiNode : apiNodeList) {
       
        org.apache.juddi.model.Node modelNode = new org.apache.juddi.model.Node();
       
        MappingApiToModel.mapNode(apiNode, modelNode);
       
        Object existingUddiEntity = em.find(modelNode.getClass(), modelNode.getName());
        if (existingUddiEntity != null) {
          em.merge(modelNode);
        } else {
            em.persist(modelNode);
        }
       
        result.getNode().add(apiNode);
      }
 
      tx.commit();
      return result;
    } finally {
View Full Code Here

 
      UddiEntityPublisher publisher = this.getEntityPublisher(em, body.getAuthInfo());
     
      new ValidateNode(publisher).validateSaveNode(em, body);
     
      NodeDetail result = new NodeDetail();
 
      List<org.apache.juddi.api_v3.Node> apiNodeList = body.getNode();;
      for (org.apache.juddi.api_v3.Node apiNode : apiNodeList) {
       
        org.apache.juddi.model.Node modelNode = new org.apache.juddi.model.Node();
       
        MappingApiToModel.mapNode(apiNode, modelNode);
       
        Object existingUddiEntity = em.find(modelNode.getClass(), modelNode.getName());
        if (existingUddiEntity != null) {
          em.merge(modelNode);
        } else {
            em.persist(modelNode);
        }
       
        result.getNode().add(apiNode);
      }
 
      tx.commit();
      return result;
    } finally {
View Full Code Here

                        UddiEntityPublisher publisher = this.getEntityPublisher(em, body.getAuthInfo());

                        new ValidateNode(publisher).validateSaveNode(em, body);

                        NodeDetail result = new NodeDetail();

                        List<org.apache.juddi.api_v3.Node> apiNodeList = body.getNode();;
                        for (org.apache.juddi.api_v3.Node apiNode : apiNodeList) {

                                org.apache.juddi.model.Node modelNode = new org.apache.juddi.model.Node();

                                MappingApiToModel.mapNode(apiNode, modelNode);

                                Object existingUddiEntity = em.find(modelNode.getClass(), modelNode.getName());
                                if (existingUddiEntity != null) {
                                        em.merge(modelNode);
                                } else {
                                        em.persist(modelNode);
                                }

                                result.getNode().add(apiNode);
                        }

                        tx.commit();
                        return result;
                } finally {
View Full Code Here

TOP

Related Classes of org.apache.juddi.api_v3.ClientSubscriptionInfo

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.