Package org.apache.juddi.api_v3

Examples of org.apache.juddi.api_v3.PublisherDetail


      Assert.fail("No exception should be thrown");
    }
  }
 
  private boolean isExistPublisher(String publisherId) {
    GetPublisherDetail gp = new GetPublisherDetail();
    gp.getPublisherId().add(publisherId);
    try {
      publisher.getPublisherDetail(gp);
      return true;
    } catch (Exception e) {
      return false;
View Full Code Here


      Publisher pubIn = (Publisher)EntityCreator.buildFromDoc(publisherXML, "org.apache.juddi.api_v3");
      sp.getPublisher().add(pubIn);
      publisher.savePublisher(sp);
 
      // Now get the entity and check the values
      GetPublisherDetail gp = new GetPublisherDetail();
      gp.getPublisherId().add(publisherId);
      gp.setAuthInfo(authInfo);
      PublisherDetail pd = publisher.getPublisherDetail(gp);
      List<Publisher> pubOutList = pd.getPublisher();
      Publisher pubOut = pubOutList.get(0);

      assertEquals(pubIn.getAuthorizedName(), pubOut.getAuthorizedName());
View Full Code Here

      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

  public JUDDIApiResponse getPublishers(String authToken, String publisherId)
  { 
    HttpServletRequest request = this.getThreadLocalRequest();
    HttpSession session = request.getSession();
    GetPublisherDetail getPublisherDetail = new GetPublisherDetail();
    getPublisherDetail.setAuthInfo(authToken);
    getPublisherDetail.getPublisherId().add(publisherId);
    logger.debug("GetPublisherDetail " + getPublisherDetail + " sending get PublisherDetail request..");
   
    JUDDIApiResponse response = new JUDDIApiResponse();
    List<Publisher> publishers = new ArrayList<Publisher>();
    try {
View Full Code Here

      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

TOP

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

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.