Package org.apache.juddi.api_v3

Examples of org.apache.juddi.api_v3.SavePublisher


      logger.info("Updating homeNode server using jUDDI specific API..");
      Transport defaultTransport = WebHelper.getTransport(session.getServletContext());
      JUDDIApiPortType juddiApiService = defaultTransport.getJUDDIApiService();
     
      //making sure our node info is there and up to date.
      SaveNode saveNode = new SaveNode();
      saveNode.setAuthInfo(userAuthToken);
      saveNode.getNode().add(clerk.getApiClerk().getNode());
      juddiApiService.saveNode(saveNode);
      //making sure our clerk info is there and up to date
      SaveClerk saveClerk = new SaveClerk();
      saveClerk.setAuthInfo(userAuthToken);
      saveClerk.getClerk().add(clerk.getApiClerk());
      juddiApiService.saveClerk(saveClerk);
      //making sure our node info is there and up to date.
      SaveNode saveToNode = new SaveNode();
      saveToNode.setAuthInfo(userAuthToken);
      saveToNode.getNode().add(toClerk.getApiClerk().getNode());
      juddiApiService.saveNode(saveToNode);
      //making sure our clerk info is there and up to date
      SaveClerk saveToClerk = new SaveClerk();
      saveToClerk.setAuthInfo(userAuthToken);
      saveToClerk.getClerk().add(toClerk.getApiClerk());
View Full Code Here


    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");
    clerk2.setNode(node2);
View Full Code Here

 
  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);
      nodeDetail =getUDDINode().getTransport().getJUDDIApiService(node.getJuddiApiUrl()).saveNode(saveNode);
    } catch (Exception e) {
      log.error("Unable to save node " + node.getName()
          + " ." + e.getMessage(),e);
    } catch (Throwable t) {
View Full Code Here

  private void savePublisher(String publisherId, String publisherXML) {
    try {
      String rootPublisherStr = AppConfig.getConfiguration().getString(Property.JUDDI_ROOT_PUBLISHER);
      authInfo = TckSecurity.getAuthToken(security, rootPublisherStr, "");
      logger.debug("Saving new publisher: " + publisherXML);
      SavePublisher sp = new SavePublisher();
      sp.setAuthInfo(authInfo);
      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);
View Full Code Here

   private void savePublisher(String publisherId, String publisherXML) {
    try {
      String rootPublisherStr = AppConfig.getConfiguration().getString(Property.JUDDI_ROOT_PUBLISHER);
      authInfo = TckSecurity.getAuthToken(security, rootPublisherStr, "");
      logger.debug("Saving new publisher: " + publisherXML);
      SavePublisher sp = new SavePublisher();
      sp.setAuthInfo(authInfo);
      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);
View Full Code Here

    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);
            PublisherDetail publisherDetail = apiService.savePublisher(savePublisher);
            List<Publisher> publishers = new ArrayList<Publisher>();
           for (org.apache.juddi.api_v3.Publisher apiPublisherOut : publisherDetail.getPublisher()) {
        Publisher publisherOut = new Publisher();
        BeanUtils.copyProperties(publisherOut, apiPublisherOut);
View Full Code Here

            //Creating a new publisher that can be used to publish business entities
            Publisher publisher = new Publisher();
            publisher.setAuthorizedName(PUBLISHER_USER_ID);
            publisher.setPublisherName(PUBLISHER_NAME);

            SavePublisher savePublisher = new SavePublisher();
            savePublisher.getPublisher().add(publisher);

            savePublisher.setAuthInfo(rootAuthToken.getAuthInfo());

            JUDDIApiImpl juddiApi = new JUDDIApiImpl();
            juddiApi.savePublisher(savePublisher);

        } catch (Exception e) {
View Full Code Here

                if (stripSig) {
                        for (int i = 0; i < allPublisherDetail.getPublisher().size(); i++) {
                                allPublisherDetail.getPublisher().get(i).getSignature().clear();
                        }
                }
                SavePublisher saver = new SavePublisher();
                saver.getPublisher().addAll(allPublisherDetail.getPublisher());
                System.out.println("Storing to disk ");
                JAXB.marshal(saver, fos);
                fos.close();
                System.out.println("Done with Publishers");
        }
View Full Code Here

                return false;
        }

        private void ImportPublishers() throws Exception {

                SavePublisher stm = JAXB.unmarshal(new File(publishersfile), SavePublisher.class);
                if (safemode) {
                        for (int i = 0; i < stm.getPublisher().size(); i++) {
                                if (!PublisherExists(stm.getPublisher().get(i).getAuthorizedName(), token)) {
                                        SavePublisher stm2 = new SavePublisher();
                                        stm2.setAuthInfo(token);
                                        stm2.getPublisher().add(stm.getPublisher().get(i));
                                        try {
                                                juddi.savePublisher(stm2);
                                                System.out.println(stm.getPublisher().get(i).getAuthorizedName() + " saved");
                                        } catch (Exception ex) {
                                                System.out.println("Error saving " + stm.getPublisher().get(i).getAuthorizedName() + " " + ex.getMessage());
View Full Code Here

    JUDDIApiPortType juddiApi = uddiClient.getTransport("default").getJUDDIApiService();
    Publisher p = new Publisher();
    p.setAuthorizedName("joepublisher");
    p.setPublisherName("Joe Publisher");
    // Adding the publisher to the "save" structure, using the 'root' user authentication info and saving away.
    SavePublisher sp = new SavePublisher();
    sp.getPublisher().add(p);
    sp.setAuthInfo(rootAuthToken.getAuthInfo());
    juddiApi.savePublisher(sp);
   
    //Joe should have a keyGenerator
    TModel keyGenerator = new TModel();
    keyGenerator.setTModelKey("uddi:uddi.joepublisher.com:keygenerator");
View Full Code Here

TOP

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

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.