Package org.apache.juddi.api_v3

Examples of org.apache.juddi.api_v3.GetPublisherDetail


                        publisher.deletePublisher(dp);

                        logger.info("Querying for publisher: " + publisherId + " after deletion.");
                        //Querying for this publisher to make sure it's really gone
                        //We're expecting a invalid Key exception at this point.
                        GetPublisherDetail gp = new GetPublisherDetail();
                        gp.getPublisherId().add(publisherId);
                        gp.setAuthInfo(authInfo);
                        PublisherDetail pdAfterDelete = null;
                        try {
                                pdAfterDelete = publisher.getPublisherDetail(gp);
                                Assert.fail("We did not expect to find this publisher anymore.");
                                //don't think we really want a SOAPFaulException be thrown here.
View Full Code Here


                        Assert.fail("No exception should be thrown");
                }
        }

        private boolean isExistPublisher(String publisherId) {
                GetPublisherDetail gp = new GetPublisherDetail();
                gp.setAuthInfo(authInfo);
                gp.getPublisherId().add(publisherId);
                try {
                        publisher.getPublisherDetail(gp);
                        return true;
                } catch (Exception e) {
                        return false;
View Full Code Here

                return ret.toString();
        }

        private String get_publisherDetail(HttpServletRequest parameters) {
                StringBuilder ret = new StringBuilder();
                GetPublisherDetail sb = new GetPublisherDetail();
                sb.getPublisherId().add(parameters.getParameter("get_publisherDetailKEY"));
                sb.setAuthInfo(GetToken());
                PublisherDetail d = null;
                try {
                        d = juddi.getPublisherDetail(sb);
                } catch (Exception ex) {
                        if (isExceptionExpiration(ex)) {
                                token = null;
                                sb.setAuthInfo(GetToken());
                                try {
                                        d = juddi.getPublisherDetail(sb);
                                } catch (Exception ex1) {
                                        return HandleException(ex);
                                }
View Full Code Here

                        fb.setMaxRows(1);
                        fb.setFindQualifiers(new FindQualifiers());
                        fb.getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
                        fb.getName().add(new Name(UDDIConstants.WILDCARD, null));
                        try {
                                GetPublisherDetail publisherDetail = new GetPublisherDetail();
                                publisherDetail.getPublisherId().add((String) session.getAttribute("username"));
                                juddi.getPublisherDetail(publisherDetail);

                        } catch (Exception ex) {
                                return HandleException(ex);
                        }
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

TOP

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

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.