juddi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexo...@apache.org
Subject svn commit: r1462384 [1/4] - in /juddi/branches/juddi-3.2.x/juddi-gui: src/java/org/apache/juddi/webconsole/ src/java/org/apache/juddi/webconsole/hub/ src/java/org/apache/juddi/webconsole/hub/builders/ web/ web/META-INF/ web/ajax/ web/js/
Date Fri, 29 Mar 2013 02:43:38 GMT
Author: alexoree
Date: Fri Mar 29 02:43:36 2013
New Revision: 1462384

URL: http://svn.apache.org/r1462384
Log:
Juddi GUI, minor refactoring, new features such as Operational Info, Service editor is near complete. tModel editor is complete. Search is about 50%

Added:
    juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/hub/
    juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/hub/PagableContainer.java
      - copied, changed from r1460942, juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/PagableContainer.java
    juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/hub/UddiHub.java
      - copied, changed from r1460942, juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/UddiHub.java
    juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/hub/builders/
    juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/hub/builders/Builders.java
    juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/hub/builders/Printers.java
    juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/getCert.jsp
    juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/opInfo.jsp
    juddi/branches/juddi-3.2.x/juddi-gui/web/nodeinfo.jsp
      - copied, changed from r1460942, juddi/branches/juddi-3.2.x/juddi-gui/web/tmodelEditor.jsp
    juddi/branches/juddi-3.2.x/juddi-gui/web/viewSubscriptions.jsp
      - copied, changed from r1460942, juddi/branches/juddi-3.2.x/juddi-gui/web/tmodelEditor.jsp
Removed:
    juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/PagableContainer.java
    juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/UddiHub.java
Modified:
    juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/PostBackConstants.java
    juddi/branches/juddi-3.2.x/juddi-gui/web/META-INF/config.properties
    juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/businessdetails.jsp
    juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/businesssearch.jsp
    juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/deleteservice.jsp
    juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/loginpost.jsp
    juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/saveFromXML.jsp
    juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/savebusiness.jsp
    juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/saveservicedetails.jsp
    juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/savetmodel.jsp
    juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/search.jsp
    juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/servicedetails.jsp
    juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/servicelist.jsp
    juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/servicesearch.jsp
    juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/tmodel.jsp
    juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/tmodelsearch.jsp
    juddi/branches/juddi-3.2.x/juddi-gui/web/ajax/toXML.jsp
    juddi/branches/juddi-3.2.x/juddi-gui/web/businessBrowse.jsp
    juddi/branches/juddi-3.2.x/juddi-gui/web/businessEditor2.jsp
    juddi/branches/juddi-3.2.x/juddi-gui/web/csrf.jsp
    juddi/branches/juddi-3.2.x/juddi-gui/web/header-bottom.jsp
    juddi/branches/juddi-3.2.x/juddi-gui/web/header-top.jsp
    juddi/branches/juddi-3.2.x/juddi-gui/web/js/serviceEditor.js
    juddi/branches/juddi-3.2.x/juddi-gui/web/logout.jsp
    juddi/branches/juddi-3.2.x/juddi-gui/web/publisherBrowse.jsp
    juddi/branches/juddi-3.2.x/juddi-gui/web/search.jsp
    juddi/branches/juddi-3.2.x/juddi-gui/web/serviceBrowse.jsp
    juddi/branches/juddi-3.2.x/juddi-gui/web/serviceEditor.jsp
    juddi/branches/juddi-3.2.x/juddi-gui/web/tmodelBrowse.jsp
    juddi/branches/juddi-3.2.x/juddi-gui/web/tmodelEditor.jsp
    juddi/branches/juddi-3.2.x/juddi-gui/web/tmodelPartitions.jsp

Modified: juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/PostBackConstants.java
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/PostBackConstants.java?rev=1462384&r1=1462383&r2=1462384&view=diff
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/PostBackConstants.java (original)
+++ juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/PostBackConstants.java Fri Mar 29 02:43:36 2013
@@ -13,7 +13,12 @@ package org.apache.juddi.webconsole;
  * @author Alex O'Ree
  */
 public class PostBackConstants {
-
+    public static final String INSTANCE="instance";
+    public static final String ACCESSPOINT_TYPE="accessPointType";
+    public static final String ACCESSPOINT_VALUE="accessPointValue";
+    
+    @Deprecated
+public static final String HOSTINGREDIRECTOR="hostingRedirector";
     public static final String OVERVIEW = "overviewDoc";
     public static final String TMODELINSTANCE = "tmodelInstance";
     public static final String BINDINGTEMPLATE = "bindingTemplate";

Copied: juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/hub/PagableContainer.java (from r1460942, juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/PagableContainer.java)
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/hub/PagableContainer.java?p2=juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/hub/PagableContainer.java&p1=juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/PagableContainer.java&r1=1460942&r2=1462384&rev=1462384&view=diff
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/PagableContainer.java (original)
+++ juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/hub/PagableContainer.java Fri Mar 29 02:43:36 2013
@@ -2,7 +2,7 @@
  * To change this template, choose Tools | Templates
  * and open the template in the editor.
  */
-package org.apache.juddi.webconsole;
+package org.apache.juddi.webconsole.hub;
 
 /**
  * This simple class enables use to pass rendered html data and paging

Copied: juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/hub/UddiHub.java (from r1460942, juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/UddiHub.java)
URL: http://svn.apache.org/viewvc/juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/hub/UddiHub.java?p2=juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/hub/UddiHub.java&p1=juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/UddiHub.java&r1=1460942&r2=1462384&rev=1462384&view=diff
==============================================================================
--- juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/UddiHub.java (original)
+++ juddi/branches/juddi-3.2.x/juddi-gui/src/java/org/apache/juddi/webconsole/hub/UddiHub.java Fri Mar 29 02:43:36 2013
@@ -2,7 +2,7 @@
  * To change this template, choose Tools | Templates
  * and open the template in the editor.
  */
-package org.apache.juddi.webconsole;
+package org.apache.juddi.webconsole.hub;
 
 import java.io.ByteArrayInputStream;
 import java.io.InputStream;
@@ -11,18 +11,16 @@ import java.rmi.RemoteException;
 import java.security.cert.CertificateFactory;
 import java.security.cert.X509Certificate;
 import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Properties;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
+import java.util.logging.Logger;
 import javax.servlet.ServletContext;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpSession;
 import javax.xml.bind.JAXBElement;
 import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Holder;
 import org.apache.commons.lang.StringEscapeUtils;
 import org.apache.juddi.ClassUtil;
 import org.apache.juddi.api_v3.GetAllPublisherDetail;
@@ -33,80 +31,33 @@ import org.apache.juddi.query.util.FindQ
 import org.apache.juddi.v3.client.config.UDDIClientContainer;
 import org.apache.juddi.v3.client.transport.Transport;
 import org.apache.juddi.v3_service.JUDDIApiPortType;
+import org.apache.juddi.webconsole.AES;
+import org.apache.juddi.webconsole.PostBackConstants;
+import org.apache.juddi.webconsole.hub.builders.Builders;
+import org.apache.juddi.webconsole.hub.builders.Printers;
 import org.apache.log4j.Level;
-import org.uddi.api_v3.Address;
-import org.uddi.api_v3.AddressLine;
-import org.uddi.api_v3.AuthToken;
-import org.uddi.api_v3.BindingDetail;
-import org.uddi.api_v3.BindingTemplate;
-import org.uddi.api_v3.BindingTemplates;
-import org.uddi.api_v3.BusinessDetail;
-import org.uddi.api_v3.BusinessEntity;
-import org.uddi.api_v3.BusinessInfo;
-import org.uddi.api_v3.BusinessInfos;
-import org.uddi.api_v3.BusinessList;
-import org.uddi.api_v3.BusinessService;
-import org.uddi.api_v3.CategoryBag;
-import org.uddi.api_v3.Contact;
-import org.uddi.api_v3.Contacts;
-import org.uddi.api_v3.DeleteBusiness;
-import org.uddi.api_v3.DeleteTModel;
-import org.uddi.api_v3.Description;
-import org.uddi.api_v3.DiscardAuthToken;
-import org.uddi.api_v3.DiscoveryURL;
-import org.uddi.api_v3.DiscoveryURLs;
-import org.uddi.api_v3.Email;
-import org.uddi.api_v3.FindBinding;
-import org.uddi.api_v3.FindBusiness;
-import org.uddi.api_v3.FindService;
-import org.uddi.api_v3.FindTModel;
-import org.uddi.api_v3.GetAuthToken;
-import org.uddi.api_v3.GetBindingDetail;
-import org.uddi.api_v3.GetBusinessDetail;
-import org.uddi.api_v3.GetServiceDetail;
-import org.uddi.api_v3.GetTModelDetail;
-import org.uddi.api_v3.IdentifierBag;
-import org.uddi.api_v3.KeyedReference;
-import org.uddi.api_v3.KeyedReferenceGroup;
-import org.uddi.api_v3.Name;
-import org.uddi.api_v3.OverviewDoc;
-import org.uddi.api_v3.OverviewURL;
-import org.uddi.api_v3.PersonName;
-import org.uddi.api_v3.Phone;
-import org.uddi.api_v3.SaveBinding;
-import org.uddi.api_v3.SaveBusiness;
-import org.uddi.api_v3.SaveService;
-import org.uddi.api_v3.SaveTModel;
-import org.uddi.api_v3.ServiceDetail;
-import org.uddi.api_v3.ServiceInfo;
-import org.uddi.api_v3.ServiceInfos;
-import org.uddi.api_v3.ServiceList;
-import org.uddi.api_v3.TModel;
-import org.uddi.api_v3.TModelBag;
-import org.uddi.api_v3.TModelDetail;
-import org.uddi.api_v3.TModelInfo;
-import org.uddi.api_v3.TModelInstanceDetails;
-import org.uddi.api_v3.TModelList;
+import org.uddi.api_v3.*;
+import org.uddi.custody_v3.TransferEntities;
+import org.uddi.sub_v3.Subscription;
 import org.uddi.v3_service.DispositionReportFaultMessage;
 import org.uddi.v3_service.UDDICustodyTransferPortType;
 import org.uddi.v3_service.UDDIInquiryPortType;
 import org.uddi.v3_service.UDDIPublicationPortType;
 import org.uddi.v3_service.UDDISecurityPortType;
+import org.uddi.v3_service.UDDISubscriptionPortType;
 import org.w3._2000._09.xmldsig_.SignatureType;
 import org.w3._2000._09.xmldsig_.X509DataType;
+import sun.misc.BASE64Encoder;
 
 /**
  * UddiHub - The hub acts as a single point for managing browser to uddi
- * services. At most 1 instance is allowed per http session
+ * services. At most 1 instance is allowed per http session. In general, all
+ * methods in the class trigger web service call outs
  *
  * @author Alex O'Ree
  */
 public class UddiHub {
 
-    public static final String JAVAXNETSSLKEY_STORE = "javax.net.ssl.keyStore";
-    public static final String JAVAXNETSSLKEY_STORE_PASSWORD = "javax.net.ssl.keyStorePassword";
-    public static final String JAVAXNETSSLTRUST_STORE = "javax.net.ssl.trustStore";
-    public static final String JAVAXNETSSLTRUST_STORE_PASSWORD = "javax.net.ssl.trustStorePassword";
     public static final String LOGGER_NAME = "org.apache.juddi";
     URL propertiesurl = null;
     Properties properties = null;
@@ -145,6 +96,7 @@ public class UddiHub {
         custody = null;
         security = null;
         juddi = null;
+        subscription = null;
     }
 
     public static UddiHub getInstance(ServletContext application, HttpSession _session) throws Exception {
@@ -181,6 +133,7 @@ public class UddiHub {
 
                 security = transport.getUDDISecurityService();
                 inquiry = transport.getUDDIInquiryService();
+                subscription = transport.getUDDISubscriptionService();
                 publish = transport.getUDDIPublishService();
                 custody = transport.getUDDICustodyTransferService();
                 juddi = transport.getJUDDIApiService();
@@ -197,6 +150,16 @@ public class UddiHub {
                 context = bp.getRequestContext();
                 context.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, properties.getProperty("custodyurl"));
 
+
+                bp = (BindingProvider) security;
+                context = bp.getRequestContext();
+                context.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, properties.getProperty("securityurl"));
+
+                bp = (BindingProvider) subscription;
+                context = bp.getRequestContext();
+                context.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, properties.getProperty("subscriptionurl"));
+
+
                 bp = (BindingProvider) juddi;
                 context = bp.getRequestContext();
                 context.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, properties.getProperty("juddipapi"));
@@ -269,6 +232,7 @@ public class UddiHub {
     public boolean getUddiIsAuthenticated() {
         return (token != null && !token.isEmpty());
     }
+    private UDDISubscriptionPortType subscription = null;
     private UDDISecurityPortType security = null;
     private UDDIInquiryPortType inquiry = null;
     private UDDIPublicationPortType publish = null;
@@ -306,7 +270,7 @@ public class UddiHub {
                 sb.append("<table class=\"table\"<tr><th>Name</th><th>Details</th><th>Services</th></tr>");
                 for (int i = 0; i < findBusiness.getBusinessInfos().getBusinessInfo().size(); i++) {
                     sb.append("<tr><td><span title=\"").append(StringEscapeUtils.escapeHtml(findBusiness.getBusinessInfos().getBusinessInfo().get(i).getBusinessKey())).
-                            append("\">").append(StringEscapeUtils.escapeHtml(ListToString(findBusiness.getBusinessInfos().getBusinessInfo().get(i).getName()))).
+                            append("\">").append(StringEscapeUtils.escapeHtml(Printers.ListNamesToString(findBusiness.getBusinessInfos().getBusinessInfo().get(i).getName()))).
                             append("</span></td><td><a class=\"btn btn-primary\" href=\"businessEditor2.jsp?id=").
                             append(StringEscapeUtils.escapeHtml(findBusiness.getBusinessInfos().getBusinessInfo().get(i).getBusinessKey())).append("\">Details</a>").
                             //  sb.append(StringEscapeUtils.escapeHtml(ListToDescString(findBusiness.getBusinessInfos().getBusinessInfo().get(i).getDescription()))).
@@ -347,17 +311,17 @@ public class UddiHub {
             ServiceDetail get = inquiry.getServiceDetail(gbd);
             for (int i = 0; i < get.getBusinessService().size(); i++) {
                 session.setAttribute(get.getBusinessService().get(i).getServiceKey(), get.getBusinessService().get(i));
-                sb.append("<b>Name:</b><div class=\"editable\" id=\"ServiceName\">").append(StringEscapeUtils.escapeHtml(ListToString(get.getBusinessService().get(i).getName()))).append("</div><Br>");
-                sb.append("<b>Desc:</b><div class=\"editable\" id=\"ServiceDescription\">").append(StringEscapeUtils.escapeHtml((ListToDescString(get.getBusinessService().get(i).getDescription())))).append("</div><Br>");
+                sb.append("<b>Name:</b><div class=\"editable\" id=\"ServiceName\">").append(StringEscapeUtils.escapeHtml(Printers.ListNamesToString(get.getBusinessService().get(i).getName()))).append("</div><Br>");
+                sb.append("<b>Desc:</b><div class=\"editable\" id=\"ServiceDescription\">").append(StringEscapeUtils.escapeHtml((Printers.ListToDescString(get.getBusinessService().get(i).getDescription())))).append("</div><Br>");
                 sb.append("<b>Key:</b><div class=\"editable\" id=\"ServiceKey\">").append(StringEscapeUtils.escapeHtml((get.getBusinessService().get(i).getServiceKey()))).append("</div><Br>");
-                sb.append("<b>Category Bag:</b> ").append(CatBagToString(get.getBusinessService().get(i).getCategoryBag())).append("<Br>");
+                sb.append("<b>Category Bag:</b> ").append(Printers.CatBagToString(get.getBusinessService().get(i).getCategoryBag())).append("<Br>");
                 if (!get.getBusinessService().get(i).getSignature().isEmpty()) {
                     sb.append("Item is digitally signed").append("<Br>");
                 } else {
                     sb.append("Item is not digitally signed").append("<Br>");
                 }
 
-                sb.append(PrintBindingTemplates(get.getBusinessService().get(i).getBindingTemplates())).append("<Br>");
+                sb.append(Printers.PrintBindingTemplates(get.getBusinessService().get(i).getBindingTemplates())).append("<Br>");
             }
         } catch (Exception ex) {
             sb.append("error ").append(StringEscapeUtils.escapeHtml((ex.getMessage())));
@@ -365,6 +329,38 @@ public class UddiHub {
         return sb.toString();
     }
 
+    /**
+     * returns an html formatted list of services for a specific business used
+     * on browse.jsp
+     *
+     * @param bizid
+     * @return retu
+     */
+    public String GetServiceList(String bizid) {
+        if (bizid == null || bizid.isEmpty()) {
+            return "No business id specified";
+        }
+        StringBuilder sb = new StringBuilder();
+        try {
+            GetBusinessDetail gbd = new GetBusinessDetail();
+            gbd.setAuthInfo(GetToken());
+            gbd.getBusinessKey().add(bizid);
+            BusinessDetail businessDetail = inquiry.getBusinessDetail(gbd);
+            for (int i = 0; i < businessDetail.getBusinessEntity().size(); i++) {
+                if (businessDetail.getBusinessEntity().get(i).getBusinessServices() == null) {
+                    sb.append("No services are defined.");
+                } else {
+                    for (int k = 0; k < businessDetail.getBusinessEntity().get(i).getBusinessServices().getBusinessService().size(); k++) {
+                        sb.append("<div><a href=\"serviceEditor.jsp?id=").append(StringEscapeUtils.escapeHtml(businessDetail.getBusinessEntity().get(i).getBusinessServices().getBusinessService().get(k).getServiceKey())).append("\">").append(StringEscapeUtils.escapeHtml(Printers.ListNamesToString(businessDetail.getBusinessEntity().get(i).getBusinessServices().getBusinessService().get(k).getName()))).append("</a></div>");
+                    }
+                }
+            }
+        } catch (Exception ex) {
+            sb.append("error ").append(ex.getMessage());
+        }
+        return sb.toString();
+    }
+
     public BusinessService GetServiceDetail(String serviceid) {
         if (serviceid == null || serviceid.length() == 0) {
             return null;
@@ -386,25 +382,6 @@ public class UddiHub {
         return null;
     }
 
-    /**
-     * Returns a new map, filtering the original map by key string starts with
-     *
-     * @param map
-     * @param pattern
-     * @return
-     */
-    private Map MapFilter(Map map, String pattern) {
-        Map ret = new HashMap();
-        Iterator it = map.keySet().iterator();
-        while (it.hasNext()) {
-            String key = (String) it.next();
-            if (key.startsWith(pattern)) {
-                ret.put(key, map.get(key));
-            }
-        }
-        return ret;
-    }
-
     public String SaveService(BusinessService be) {
         try {
             SaveService sb = new SaveService();
@@ -443,20 +420,56 @@ public class UddiHub {
         }
     }
 
-    private void SaveServiceDetails(HttpServletRequest request) {
+    public String SaveServiceDetails(HttpServletRequest request) {
 
-        String servicekey = (String) request.getParameter("ServiceKey");
+        BusinessService be = new BusinessService();
+        be.setBusinessKey(request.getParameter(PostBackConstants.BUSINESSKEY).trim());
+        be.setServiceKey(request.getParameter(PostBackConstants.SERVICEKEY).trim());
 
-        BusinessService svc = new BusinessService();
-        //TODO
+        if (be.getServiceKey().equalsIgnoreCase(PostBackConstants.CLICK_TO_EDIT)) {
+            be.setServiceKey(null);
+        }
+        if (be.getBusinessKey() == null || be.getBusinessKey().length() == 0) {
+            return "No input was provided for the business key";
+        }
 
-        //   svc.set
-        //      svc.getDescription().clear();
-        Description d = new Description();
-        d.setValue(request.getParameter("ServiceDescription"));
-        //svc.getDescription().add();
+        be.getName().addAll(Builders.BuildNames(Builders.MapFilter(request.getParameterMap(), PostBackConstants.NAME), PostBackConstants.NAME));
+        BindingTemplates bt = new BindingTemplates();
+        bt.getBindingTemplate().addAll(Builders.BuildBindingTemplates(Builders.MapFilter(request.getParameterMap(), PostBackConstants.BINDINGTEMPLATE), PostBackConstants.BINDINGTEMPLATE));
+        if (!bt.getBindingTemplate().isEmpty()) {
+            be.setBindingTemplates(bt);
+        }
+
+        be.getDescription().addAll(Builders.BuildDescription(Builders.MapFilter(request.getParameterMap(), PostBackConstants.DESCRIPTION), PostBackConstants.DESCRIPTION));
+
+        CategoryBag cb = new CategoryBag();
+        cb.getKeyedReference().addAll(Builders.BuildKeyedReference(Builders.MapFilter(request.getParameterMap(), PostBackConstants.CATBAG_KEY_REF), PostBackConstants.CATBAG_KEY_REF));
+        cb.getKeyedReferenceGroup().addAll(Builders.BuildKeyedReferenceGroup(Builders.MapFilter(request.getParameterMap(), PostBackConstants.CATBAG_KEY_REF_GRP), PostBackConstants.CATBAG_KEY_REF_GRP));
 
-//        publish.saveBusiness(sb);
+        if (!cb.getKeyedReference().isEmpty() || !cb.getKeyedReferenceGroup().isEmpty()) {
+            be.setCategoryBag(cb);
+        }
+
+        return SaveServiceDetails(be);
+    }
+
+    public String SaveServiceDetails(BusinessService be) {
+        try {
+            SaveService sb = new SaveService();
+            sb.setAuthInfo(GetToken());
+            sb.getBusinessService().add(be);
+            publish.saveService(sb);
+            return "Saved!";
+        } catch (DispositionReportFaultMessage ex) {
+            log.log(Level.ERROR, null, ex);
+            return "UDDI Disposition Fault Error caught! " + ex.getMessage() + " " + ex.detail.getMessage();
+        } catch (RemoteException ex) {
+            log.log(Level.ERROR, null, ex);
+            return "Remote Exception Error caught! " + ex.getMessage() + " " + ex.detail.getMessage();
+        } catch (Exception ex) {
+            log.log(Level.ERROR, null, ex);
+            return "Unexpected Error caught! " + ex.getMessage();
+        }
     }
 
     public String SaveBusinessDetails(BusinessEntity be) {
@@ -497,119 +510,28 @@ public class UddiHub {
         if (be.getBusinessKey().equalsIgnoreCase(PostBackConstants.CLICK_TO_EDIT)) {
             be.setBusinessKey(null);
         }
-        be.getName().addAll(BuildNames(MapFilter(request.getParameterMap(), PostBackConstants.NAME), PostBackConstants.NAME));
+        be.getName().addAll(Builders.BuildNames(Builders.MapFilter(request.getParameterMap(), PostBackConstants.NAME), PostBackConstants.NAME));
         if (GetBusinessDetails == null) //this is a new business
         {
         } else {
             be.setBusinessServices(GetBusinessDetails.getBusinessServices());
         }
         //TODO signature
-        be.setContacts(BuildContacts(request.getParameterMap()));
+        be.setContacts(Builders.BuildContacts(request.getParameterMap()));
 
-        be.getDescription().addAll(BuildDescription(MapFilter(request.getParameterMap(), PostBackConstants.DESCRIPTION), PostBackConstants.DESCRIPTION));
-        be.setDiscoveryURLs(BuildDisco(MapFilter(request.getParameterMap(), PostBackConstants.DISCOVERYURL), PostBackConstants.DISCOVERYURL));
+        be.getDescription().addAll(Builders.BuildDescription(Builders.MapFilter(request.getParameterMap(), PostBackConstants.DESCRIPTION), PostBackConstants.DESCRIPTION));
+        be.setDiscoveryURLs(Builders.BuildDisco(Builders.MapFilter(request.getParameterMap(), PostBackConstants.DISCOVERYURL), PostBackConstants.DISCOVERYURL));
         CategoryBag cb = new CategoryBag();
-        cb.getKeyedReference().addAll(BuildKeyedReference(MapFilter(request.getParameterMap(), PostBackConstants.CATBAG_KEY_REF), PostBackConstants.CATBAG_KEY_REF));
-        cb.getKeyedReferenceGroup().addAll(BuildKeyedReferenceGroup(MapFilter(request.getParameterMap(), PostBackConstants.CATBAG_KEY_REF_GRP), PostBackConstants.CATBAG_KEY_REF_GRP));
+        cb.getKeyedReference().addAll(Builders.BuildKeyedReference(Builders.MapFilter(request.getParameterMap(), PostBackConstants.CATBAG_KEY_REF), PostBackConstants.CATBAG_KEY_REF));
+        cb.getKeyedReferenceGroup().addAll(Builders.BuildKeyedReferenceGroup(Builders.MapFilter(request.getParameterMap(), PostBackConstants.CATBAG_KEY_REF_GRP), PostBackConstants.CATBAG_KEY_REF_GRP));
 
         if (!cb.getKeyedReference().isEmpty() || !cb.getKeyedReferenceGroup().isEmpty()) {
             be.setCategoryBag(cb);
         }
-        be.setIdentifierBag(BuildIdentBag(MapFilter(request.getParameterMap(), PostBackConstants.IDENT_KEY_REF), PostBackConstants.IDENT_KEY_REF));
+        be.setIdentifierBag(Builders.BuildIdentBag(Builders.MapFilter(request.getParameterMap(), PostBackConstants.IDENT_KEY_REF), PostBackConstants.IDENT_KEY_REF));
         return SaveBusinessDetails(be);
     }
 
-    /**
-     * returns an html formatted list of services for a specific business used
-     * on browse.jsp
-     *
-     * @param bizid
-     * @return retu
-     */
-    public String GetServiceList(String bizid) {
-        if (bizid == null || bizid.isEmpty()) {
-            return "No business id specified";
-        }
-        StringBuilder sb = new StringBuilder();
-        try {
-            GetBusinessDetail gbd = new GetBusinessDetail();
-            gbd.setAuthInfo(GetToken());
-
-            gbd.getBusinessKey().add(bizid);
-
-            BusinessDetail businessDetail = inquiry.getBusinessDetail(gbd);
-            for (int i = 0; i < businessDetail.getBusinessEntity().size(); i++) {
-                if (businessDetail.getBusinessEntity().get(i).getBusinessServices() == null) {
-                    sb.append("No services are defined.");
-                } else {
-
-                    for (int k = 0; k < businessDetail.getBusinessEntity().get(i).getBusinessServices().getBusinessService().size(); k++) {
-                        sb.append("<div><a href=\"serviceEditor.jsp?id=")
-                                .append(StringEscapeUtils.escapeHtml(businessDetail.getBusinessEntity().get(i).getBusinessServices().getBusinessService().get(k).getServiceKey()))
-                                .append("\">")
-                                .append(StringEscapeUtils.escapeHtml(ListToString(businessDetail.getBusinessEntity().get(i).getBusinessServices().getBusinessService().get(k).getName())))
-                                .append("</a></div>");
-                    }
-
-                }
-            }
-        } catch (Exception ex) {
-            sb.append("error ").append(ex.getMessage());
-        }
-        return sb.toString();
-    }
-
-    /**
-     * This function is useful for translating UDDI's somewhat complex data
-     * format to something that is more useful.
-     *
-     * @param bindingTemplates
-     */
-    private String PrintBindingTemplates(BindingTemplates bindingTemplates) {
-        if (bindingTemplates == null) {
-            return "No binding templates";
-        }
-        StringBuilder sb = new StringBuilder();
-        for (int i = 0; i < bindingTemplates.getBindingTemplate().size(); i++) {
-            sb.append("Binding Key: ").append(bindingTemplates.getBindingTemplate().get(i).getBindingKey()).
-                    append("<Br>");
-            sb.append("Description: ").append(ListToDescString(bindingTemplates.getBindingTemplate().get(i).getDescription())).
-                    append("<Br>");
-            sb.append("CatBag: ").append(CatBagToString(bindingTemplates.getBindingTemplate().get(i).getCategoryBag())).
-                    append("<Br>");
-            sb.append("tModels: ").append(TModelInfoToString(bindingTemplates.getBindingTemplate().get(i).getTModelInstanceDetails())).append("<Br>");
-
-            //TODO The UDDI spec is kind of strange at this point.
-            //An access point could be a URL, a reference to another UDDI binding key, a hosting redirector (which is 
-            //esscentially a pointer to another UDDI registry) or a WSDL Deployment
-            //From an end client's perspective, all you really want is the endpoint.
-
-            //So if you have a wsdlDeployment useType, fetch the wsdl and parse for the invocation URL
-            //If its hosting director, you'll have to fetch that data from uddi recursively until the leaf node is found
-            //Consult the UDDI specification for more information
-
-            if (bindingTemplates.getBindingTemplate().get(i).getAccessPoint() != null) {
-                sb.append("Access Point: ").append(bindingTemplates.getBindingTemplate().get(i).getAccessPoint().getValue())
-                        .append(" type ").append(bindingTemplates.getBindingTemplate().get(i).getAccessPoint().getUseType())
-                        .append("<Br>");
-            }
-            if (bindingTemplates.getBindingTemplate().get(i).getHostingRedirector() != null) {
-                sb.append("Hosting Director: ").append(bindingTemplates.getBindingTemplate().get(i).getHostingRedirector().getBindingKey()).append("<br>");
-
-            }
-        }
-        return sb.toString();
-    }
-
-    public String TModelInfoToString(TModelInstanceDetails info) {
-        StringBuilder sb = new StringBuilder();
-        for (int i = 0; i < info.getTModelInstanceInfo().size(); i++) {
-            sb.append(info.getTModelInstanceInfo().get(i).getTModelKey());
-
-        }
-        return sb.toString();
-    }
-
     public String GetBusinessDetailsAsHtml(String bizid) throws Exception {
         if (bizid == null || bizid.isEmpty()) {
             return "No business id specified";
@@ -624,12 +546,12 @@ public class UddiHub {
             BusinessDetail businessDetail = inquiry.getBusinessDetail(gbd);
             for (int i = 0; i < businessDetail.getBusinessEntity().size(); i++) {
                 sb.append("Business Detail - key: ").append(businessDetail.getBusinessEntity().get(i).getBusinessKey()).append("<br>");
-                sb.append("Name: ").append(ListToString(businessDetail.getBusinessEntity().get(i).getName())).append("<br>");
-                sb.append("Description: ").append(ListToDescString(businessDetail.getBusinessEntity().get(i).getDescription())).append("<br>");
-                sb.append("Discovery URLs: ").append(ListDiscoToString(businessDetail.getBusinessEntity().get(i).getDiscoveryURLs())).append("<br>");
-                sb.append("Identifiers: ").append(ListIdentBagToString(businessDetail.getBusinessEntity().get(i).getIdentifierBag())).append("<br>");
-                sb.append("CategoryBag: ").append(CatBagToString(businessDetail.getBusinessEntity().get(i).getCategoryBag())).append("<br>");
-                PrintContacts(businessDetail.getBusinessEntity().get(i).getContacts());
+                sb.append("Name: ").append(Printers.ListNamesToString(businessDetail.getBusinessEntity().get(i).getName())).append("<br>");
+                sb.append("Description: ").append(Printers.ListToDescString(businessDetail.getBusinessEntity().get(i).getDescription())).append("<br>");
+                sb.append("Discovery URLs: ").append(Printers.ListDiscoToString(businessDetail.getBusinessEntity().get(i).getDiscoveryURLs())).append("<br>");
+                sb.append("Identifiers: ").append(Printers.ListIdentBagToString(businessDetail.getBusinessEntity().get(i).getIdentifierBag())).append("<br>");
+                sb.append("CategoryBag: ").append(Printers.CatBagToString(businessDetail.getBusinessEntity().get(i).getCategoryBag())).append("<br>");
+                Printers.PrintContacts(businessDetail.getBusinessEntity().get(i).getContacts());
             }
         } catch (Exception ex) {
             sb.append("error ").append(ex.getMessage());
@@ -666,576 +588,6 @@ public class UddiHub {
 
     }
 
-    String ListIdentBagToString(IdentifierBag info) {
-        StringBuilder sb = new StringBuilder();
-        if (info == null) {
-            return "";
-        }
-
-        for (int i = 0; i < info.getKeyedReference().size(); i++) {
-
-            sb.append(KeyedReferenceToString(info.getKeyedReference().get(i)));
-
-        }
-        return sb.toString();
-    }
-
-    String ListDiscoToString(DiscoveryURLs info) {
-        StringBuilder sb = new StringBuilder();
-        if (info == null) {
-            return "";
-        }
-        for (int i = 0; i < info.getDiscoveryURL().size(); i++) {
-            sb.append("Type: ").append(StringEscapeUtils.escapeHtml(info.getDiscoveryURL().get(i).getValue()))
-                    .append(" ")
-                    .append(StringEscapeUtils.escapeHtml(info.getDiscoveryURL().get(i).getValue()));
-        }
-        return sb.toString();
-    }
-
-    /**
-     * Converts category bags of tmodels to a readable string
-     *
-     * @param categoryBag
-     * @return
-     */
-    private String CatBagToString(CategoryBag categoryBag) {
-        StringBuilder sb = new StringBuilder();
-        if (categoryBag == null) {
-            return "no data";
-        }
-        for (int i = 0; i < categoryBag.getKeyedReference().size(); i++) {
-            sb.append(KeyedReferenceToString(categoryBag.getKeyedReference().get(i)));
-        }
-        for (int i = 0; i < categoryBag.getKeyedReferenceGroup().size(); i++) {
-            sb.append("Key Ref Grp: TModelKey=");
-            for (int k = 0; k < categoryBag.getKeyedReferenceGroup().get(i).getKeyedReference().size(); k++) {
-                sb.append(KeyedReferenceToString(categoryBag.getKeyedReferenceGroup().get(i).getKeyedReference().get(k)));
-            }
-        }
-        return sb.toString();
-    }
-
-    private String KeyedReferenceToString(KeyedReference item) {
-        StringBuilder sb = new StringBuilder();
-        sb.append("Key Ref: Name=").
-                append(item.getKeyName()).
-                append(" Value=").
-                append(item.getKeyValue()).
-                append(" tModel=").
-                append(item.getTModelKey()).
-                append(System.getProperty("line.separator"));
-        return sb.toString();
-    }
-
-    /**
-     * converts contacts to a simple string output
-     */
-    private String PrintContacts(Contacts contacts) {
-        if (contacts == null) {
-            return "";
-        }
-        StringBuilder sb = new StringBuilder();
-        for (int i = 0; i < contacts.getContact().size(); i++) {
-            sb.append("Contact ").append(i).append(" type:").append(contacts.getContact().get(i).getUseType()).append("<br>");
-            for (int k = 0; k < contacts.getContact().get(i).getPersonName().size(); k++) {
-                sb.append("Name: ").append(contacts.getContact().get(i).getPersonName().get(k).getValue()).append("<br>");
-            }
-            for (int k = 0; k < contacts.getContact().get(i).getEmail().size(); k++) {
-                sb.append("Email: ").append(contacts.getContact().get(i).getEmail().get(k).getValue()).append("<br>");
-            }
-            for (int k = 0; k < contacts.getContact().get(i).getAddress().size(); k++) {
-                sb.append("Address sort code ").append(contacts.getContact().get(i).getAddress().get(k).getSortCode()).append("<br>");
-                sb.append("Address use type ").append(contacts.getContact().get(i).getAddress().get(k).getUseType()).append("<br>");
-                sb.append("Address tmodel key ").append(contacts.getContact().get(i).getAddress().get(k).getTModelKey()).append("<br>");
-                for (int x = 0; x < contacts.getContact().get(i).getAddress().get(k).getAddressLine().size(); x++) {
-                    sb.append("Address line value ").append(contacts.getContact().get(i).getAddress().get(k).getAddressLine().get(x).getValue()).append("<br>");
-                    sb.append("Address line key name ").append(contacts.getContact().get(i).getAddress().get(k).getAddressLine().get(x).getKeyName()).append("<br>");
-                    sb.append("Address line key value ").append(contacts.getContact().get(i).getAddress().get(k).getAddressLine().get(x).getKeyValue()).append("<br>");
-                }
-            }
-            for (int k = 0; k < contacts.getContact().get(i).getDescription().size(); k++) {
-                sb.append("Desc: ").append(contacts.getContact().get(i).getDescription().get(k).getValue()).append("<br>");
-            }
-            for (int k = 0; k < contacts.getContact().get(i).getPhone().size(); k++) {
-                sb.append("Phone: ").append(contacts.getContact().get(i).getPhone().get(k).getValue()).append("<br>");
-            }
-        }
-        return sb.toString();
-    }
-    /**
-     * important - regex to separate postback names from indexes, do not remove
-     * or alter
-     */
-    static final Pattern p = Pattern.compile("[a-zA-Z]");
-
-    /**
-     * contactX
-     *
-     * @param map
-     * @return
-     */
-    private Contacts BuildContacts(Map map) {
-        Contacts cb = new Contacts();
-        Map contactdata = MapFilter(map, PostBackConstants.CONTACT_PREFIX);
-        Iterator it = contactdata.keySet().iterator();
-        List<String> processedIndexes = new ArrayList<String>();
-        while (it.hasNext()) {
-            String key = (String) it.next();
-            key = key.replace(PostBackConstants.CONTACT_PREFIX, "");
-            //key should now be a number (index), follwed
-
-            Matcher match = p.matcher(key);
-            if (match.find()) {
-                String index = key.substring(0, match.start());
-                if (!processedIndexes.contains(index)) {
-                    cb.getContact().add(
-                            BuildSingleContact(
-                            MapFilter(contactdata, PostBackConstants.CONTACT_PREFIX + index),
-                            PostBackConstants.CONTACT_PREFIX + index));
-                    processedIndexes.add(index);
-                }
-            } else {
-                //some kind of parsing error or invalud format data
-                throw new IllegalArgumentException("Invalid form data posted");
-            }
-        }
-
-        if (cb.getContact().isEmpty()) {
-            return null;
-        }
-        return cb;
-    }
-
-    private Contact BuildSingleContact(Map m, String prefix) {
-        Contact c = new Contact();
-        String[] t = (String[]) m.get(prefix + PostBackConstants.TYPE);
-        c.setUseType(t[0]);
-
-        //get the Names
-        c.getPersonName().addAll(
-                BuildContactPersonNames(
-                MapFilter(m, prefix + PostBackConstants.NAME),
-                prefix + PostBackConstants.NAME));
-        //get the descriptions
-        c.getDescription().addAll(
-                BuildDescription(
-                MapFilter(m, prefix + PostBackConstants.DESCRIPTION),
-                prefix + PostBackConstants.DESCRIPTION));
-        c.getEmail().addAll(BuildEmail(MapFilter(m, prefix + PostBackConstants.EMAIL), prefix + PostBackConstants.EMAIL));
-
-        c.getPhone().addAll(BuildPhone(MapFilter(m, prefix + PostBackConstants.PHONE), prefix + PostBackConstants.PHONE));
-        c.getAddress().addAll(BuildAddress(MapFilter(m, prefix + PostBackConstants.ADDRESS), prefix + PostBackConstants.ADDRESS));
-        return c;
-    }
-
-    /**
-     * Prefix should be contactXName
-     *
-     * @param map
-     * @param prefix
-     * @return
-     */
-    private List<PersonName> BuildContactPersonNames(Map map, String prefix) {
-        List<PersonName> ret = new ArrayList();
-        Iterator it = map.keySet().iterator();
-
-        List<String> processedIndexes = new ArrayList<String>();
-        while (it.hasNext()) {
-            String key = (String) it.next();
-            String filteredkey = key.replace(prefix, "");
-            //key should now be a number (index), follwed
-
-            Matcher match = p.matcher(filteredkey);
-            if (match.find()) {
-                String index = filteredkey.substring(0, match.start());
-                if (!processedIndexes.contains(index)) {
-                    PersonName pn = new PersonName();
-                    String[] t = (String[]) map.get(prefix + index + PostBackConstants.LANG);
-                    if (t[0] == null || t[0].equalsIgnoreCase(PostBackConstants.CLICK_TO_EDIT)) {
-                        pn.setLang(null);
-                    } else {
-                        pn.setLang(t[0]);
-                    }
-                    t = (String[]) map.get(prefix + index + PostBackConstants.VALUE);
-                    pn.setValue(t[0]);
-                    ret.add(pn);
-                    processedIndexes.add(index);
-                }
-            } else {
-                //some kind of parsing error or invalud format data
-                throw new IllegalArgumentException("Invalid form data posted");
-            }
-        }
-        return ret;
-    }
-
-    private List<Description> BuildDescription(Map map, String prefix) {
-        List<Description> ret = new ArrayList();
-        Iterator it = map.keySet().iterator();
-
-        List<String> processedIndexes = new ArrayList<String>();
-        while (it.hasNext()) {
-            String key = (String) it.next();
-            String filteredkey = key.replace(prefix, "");
-            //key should now be a number (index), follwed
-
-            Matcher match = p.matcher(filteredkey);
-            if (match.find()) {
-                String index = filteredkey.substring(0, match.start());
-                if (!processedIndexes.contains(index)) {
-                    Description pn = new Description();
-                    String[] t = (String[]) map.get(prefix + index + PostBackConstants.LANG);
-                    if (t[0] == null || t[0].equalsIgnoreCase(PostBackConstants.CLICK_TO_EDIT)) {
-                        pn.setLang(null);
-                    } else {
-                        pn.setLang(t[0]);
-                    }
-                    t = (String[]) map.get(prefix + index + PostBackConstants.VALUE);
-                    pn.setValue(t[0]);
-                    ret.add(pn);
-                    processedIndexes.add(index);
-                }
-            } else {
-                //some kind of parsing error or invalud format data
-                throw new IllegalArgumentException("Invalid form data posted");
-            }
-        }
-        return ret;
-
-    }
-
-    private List<Email> BuildEmail(Map map, String prefix) {
-        List<Email> list = new ArrayList<Email>();
-        Iterator it = map.keySet().iterator();
-
-        List<String> processedIndexes = new ArrayList<String>();
-        while (it.hasNext()) {
-            String key = (String) it.next();
-            String filteredkey = key.replace(prefix, "");
-            //key should now be a number (index), follwed
-
-            Matcher match = p.matcher(filteredkey);
-            if (match.find()) {
-                String index = filteredkey.substring(0, match.start());
-                if (!processedIndexes.contains(index)) {
-                    Email pn = new Email();
-                    String[] t = (String[]) map.get(prefix + index + PostBackConstants.TYPE);
-                    pn.setUseType(t[0]);
-                    t = (String[]) map.get(prefix + index + PostBackConstants.VALUE);
-                    pn.setValue(t[0]);
-
-                    list.add(pn);
-                    processedIndexes.add(index);
-                }
-            } else {
-                //some kind of parsing error or invalud format data
-                throw new IllegalArgumentException("Invalid form data posted");
-            }
-        }
-
-        return list;
-    }
-
-    private DiscoveryURLs BuildDisco(Map map, String prefix) {
-        DiscoveryURLs list = new DiscoveryURLs();
-        Iterator it = map.keySet().iterator();
-
-        List<String> processedIndexes = new ArrayList<String>();
-        while (it.hasNext()) {
-            String key = (String) it.next();
-            String filteredkey = key.replace(prefix, "");
-            //key should now be a number (index), follwed
-
-            Matcher match = p.matcher(filteredkey);
-            if (match.find()) {
-                String index = filteredkey.substring(0, match.start());
-                if (!processedIndexes.contains(index)) {
-                    DiscoveryURL pn = new DiscoveryURL();
-                    String[] t = (String[]) map.get(prefix + index + PostBackConstants.TYPE);
-                    pn.setUseType(t[0]);
-                    t = (String[]) map.get(prefix + index + PostBackConstants.VALUE);
-                    pn.setValue(t[0]);
-
-                    list.getDiscoveryURL().add(pn);
-                    processedIndexes.add(index);
-                }
-            } else {
-                //some kind of parsing error or invalud format data
-                throw new IllegalArgumentException("Invalid form data posted");
-            }
-        }
-        if (list.getDiscoveryURL().isEmpty()) {
-            return null;
-        }
-        return list;
-    }
-
-    private List<Name> BuildNames(Map map, String prefix) {
-        List<Name> ret = new ArrayList();
-        Iterator it = map.keySet().iterator();
-
-        List<String> processedIndexes = new ArrayList<String>();
-        while (it.hasNext()) {
-            String key = (String) it.next();
-            String filteredkey = key.replace(prefix, "");
-            //key should now be a number (index), follwed
-
-            Matcher match = p.matcher(filteredkey);
-            if (match.find()) {
-                String index = filteredkey.substring(0, match.start());
-                if (!processedIndexes.contains(index)) {
-                    Name pn = new Name();
-                    String[] t = (String[]) map.get(prefix + index + PostBackConstants.LANG);
-                    if (t[0].equalsIgnoreCase(PostBackConstants.CLICK_TO_EDIT)) {
-                        pn.setLang(null);
-                    } else {
-                        pn.setLang(t[0]);
-                    }
-                    t = (String[]) map.get(prefix + index + PostBackConstants.VALUE);
-                    pn.setValue(t[0]);
-
-
-                    ret.add(pn);
-                    processedIndexes.add(index);
-                }
-            } else {
-                //some kind of parsing error or invalud format data
-                throw new IllegalArgumentException("Invalid form data posted");
-            }
-        }
-        return ret;
-    }
-
-    private List< Phone> BuildPhone(Map map, String prefix) {
-        List<Phone> ret = new ArrayList();
-        Iterator it = map.keySet().iterator();
-
-        List<String> processedIndexes = new ArrayList<String>();
-        while (it.hasNext()) {
-            String key = (String) it.next();
-            String filteredkey = key.replace(prefix, "");
-            //key should now be a number (index), follwed
-
-            Matcher match = p.matcher(filteredkey);
-            if (match.find()) {
-                String index = filteredkey.substring(0, match.start());
-                if (!processedIndexes.contains(index)) {
-                    Phone pn = new Phone();
-                    String[] t = (String[]) map.get(prefix + index + PostBackConstants.TYPE);
-                    pn.setUseType(t[0]);
-                    t = (String[]) map.get(prefix + index + PostBackConstants.VALUE);
-                    pn.setValue(t[0]);
-
-                    ret.add(pn);
-                    processedIndexes.add(index);
-                }
-            } else {
-                //some kind of parsing error or invalud format data
-                throw new IllegalArgumentException("Invalid form data posted");
-            }
-        }
-        return ret;
-    }
-
-    private List<Address> BuildAddress(Map map, String prefix) {
-        List<Address> ret = new ArrayList();
-        Iterator it = map.keySet().iterator();
-
-        List<String> processedIndexes = new ArrayList<String>();
-        while (it.hasNext()) {
-            String key = (String) it.next();
-            String filteredkey = key.replace(prefix, "");
-            //key should now be a number (index), follwed
-
-            Matcher match = p.matcher(filteredkey);
-            if (match.find()) {
-                String index = filteredkey.substring(0, match.start());
-                if (!processedIndexes.contains(index)) {
-                    Address pn = new Address();
-                    String[] t = (String[]) map.get(prefix + index + PostBackConstants.LANG);
-                    if (t[0] == null || t[0].equalsIgnoreCase(PostBackConstants.CLICK_TO_EDIT)) {
-                        pn.setLang(null);
-                    } else {
-                        pn.setLang(t[0]);
-                    }
-                    t = (String[]) map.get(prefix + index + PostBackConstants.TYPE);
-                    if (t[0] == null || t[0].equalsIgnoreCase(PostBackConstants.CLICK_TO_EDIT)) {
-                        pn.setUseType(null);
-                    } else {
-                        pn.setUseType(t[0]);
-                    }
-
-                    t = (String[]) map.get(prefix + index + PostBackConstants.SORTCODE);
-                    if (t[0] == null || t[0].equalsIgnoreCase(PostBackConstants.CLICK_TO_EDIT)) {
-                        pn.setSortCode(null);
-                    } else {
-                        pn.setSortCode(t[0]);
-                    }
-                    t = (String[]) map.get(prefix + index + PostBackConstants.KEYNAME);
-                    if (t[0] == null || t[0].equalsIgnoreCase(PostBackConstants.CLICK_TO_EDIT)) {
-                        pn.setTModelKey(null);
-                    } else {
-                        pn.setTModelKey(t[0]);
-                    }
-                    pn.getAddressLine().addAll(BuildAddressLine(MapFilter(map, prefix + index + PostBackConstants.ADDRESSLINE), prefix + index + PostBackConstants.ADDRESSLINE));
-
-
-                    ret.add(pn);
-                    processedIndexes.add(index);
-                }
-            } else {
-                //some kind of parsing error or invalud format data
-                throw new IllegalArgumentException("Invalid form data posted");
-            }
-        }
-        return ret;
-    }
-
-    private List<AddressLine> BuildAddressLine(Map map, String prefix) {
-        List<AddressLine> ret = new ArrayList();
-        Iterator it = map.keySet().iterator();
-
-        List<String> processedIndexes = new ArrayList<String>();
-        while (it.hasNext()) {
-            String key = (String) it.next();
-            String filteredkey = key.replace(prefix, "");
-            //key should now be a number (index), follwed
-
-            Matcher match = p.matcher(filteredkey);
-            if (match.find()) {
-                String index = filteredkey.substring(0, match.start());
-                if (!processedIndexes.contains(index)) {
-                    AddressLine pn = new AddressLine();
-                    String[] t = (String[]) map.get(prefix + index + PostBackConstants.VALUE);
-                    pn.setValue(t[0]);
-                    t = (String[]) map.get(prefix + index + PostBackConstants.KEYNAME);
-                    pn.setKeyName(t[0]);
-                    t = (String[]) map.get(prefix + index + PostBackConstants.KEYVALUE);
-                    pn.setKeyValue(t[0]);
-
-
-                    ret.add(pn);
-                    processedIndexes.add(index);
-                }
-            } else {
-                //some kind of parsing error or invalud format data
-                throw new IllegalArgumentException("Invalid form data posted");
-            }
-        }
-        return ret;
-    }
-
-    private CategoryBag BuildCatBag(Map map, String prefix, Map mapgrp, String grpprefix) {
-        CategoryBag ret = new CategoryBag();
-        Iterator it = map.keySet().iterator();
-
-        List<String> processedIndexes = new ArrayList<String>();
-        while (it.hasNext()) {
-            String key = (String) it.next();
-            String filteredkey = key.replace(prefix, "");
-            //key should now be a number (index), follwed
-
-            Matcher match = p.matcher(filteredkey);
-            if (match.find()) {
-                String index = filteredkey.substring(0, match.start());
-                if (!processedIndexes.contains(index)) {
-                    KeyedReference pn = new KeyedReference();
-                    String[] t = (String[]) map.get(prefix + index + PostBackConstants.VALUE);
-                    pn.setTModelKey(t[0]);
-                    t = (String[]) map.get(prefix + index + PostBackConstants.KEYNAME);
-                    pn.setKeyName(t[0]);
-                    t = (String[]) map.get(prefix + index + PostBackConstants.KEYVALUE);
-                    pn.setKeyValue(t[0]);
-
-
-                    ret.getKeyedReference().add(pn);
-                    processedIndexes.add(index);
-                }
-            } else {
-                //some kind of parsing error or invalud format data
-                throw new IllegalArgumentException("Invalid form data posted");
-            }
-        }
-
-        return ret;
-    }
-
-    private IdentifierBag BuildIdentBag(Map map, String prefix) {
-        IdentifierBag ret = new IdentifierBag();
-        ret.getKeyedReference().addAll(BuildKeyedReference(map, prefix));
-
-        if (ret.getKeyedReference().isEmpty()) {
-            return null;
-        }
-        return ret;
-    }
-
-    private List<KeyedReferenceGroup> BuildKeyedReferenceGroup(Map map, String prefix) {
-        List<KeyedReferenceGroup> ret = new ArrayList<KeyedReferenceGroup>();
-        Iterator it = map.keySet().iterator();
-
-        List<String> processedIndexes = new ArrayList<String>();
-        while (it.hasNext()) {
-            String key = (String) it.next();
-            String filteredkey = key.replace(prefix, "");
-            //key should now be a number (index), follwed
-
-            Matcher match = p.matcher(filteredkey);
-            if (match.find()) {
-                String index = filteredkey.substring(0, match.start());
-                if (!processedIndexes.contains(index)) {
-                    KeyedReferenceGroup pn = new KeyedReferenceGroup();
-                    String[] t = (String[]) map.get(prefix + index + PostBackConstants.VALUE);
-                    pn.setTModelKey(t[0]);
-                    pn.getKeyedReference().addAll(BuildKeyedReference(MapFilter(map, prefix + index + PostBackConstants.KEY_REF), prefix + index + PostBackConstants.KEY_REF));
-                    ret.add(pn);
-                    processedIndexes.add(index);
-                }
-            } else {
-                //some kind of parsing error or invalud format data
-                throw new IllegalArgumentException("Invalid form data posted");
-            }
-        }
-
-        return ret;
-    }
-
-    private List<KeyedReference> BuildKeyedReference(Map map, String prefix) {
-        List<KeyedReference> ret = new ArrayList<KeyedReference>();
-
-        Iterator it = map.keySet().iterator();
-
-        List<String> processedIndexes = new ArrayList<String>();
-        while (it.hasNext()) {
-            String key = (String) it.next();
-            String filteredkey = key.replace(prefix, "");
-            //key should now be a number (index), follwed
-
-            Matcher match = p.matcher(filteredkey);
-            if (match.find()) {
-                String index = filteredkey.substring(0, match.start());
-                if (!processedIndexes.contains(index)) {
-                    KeyedReference pn = new KeyedReference();
-                    String[] t = (String[]) map.get(prefix + index + PostBackConstants.VALUE);
-                    pn.setTModelKey(t[0]);
-                    t = (String[]) map.get(prefix + index + PostBackConstants.KEYNAME);
-                    pn.setKeyName(t[0]);
-                    t = (String[]) map.get(prefix + index + PostBackConstants.KEYVALUE);
-                    pn.setKeyValue(t[0]);
-
-
-                    ret.add(pn);
-                    processedIndexes.add(index);
-                }
-            } else {
-                //some kind of parsing error or invalud format data
-                throw new IllegalArgumentException("Invalid form data posted");
-            }
-        }
-        return ret;
-    }
-
     public enum AuthStyle {
 
         HTTP_BASIC,
@@ -1245,22 +597,6 @@ public class UddiHub {
         HTTP_CLIENT_CERT
     }
 
-    private String ListToString(List<Name> name) {
-        StringBuilder sb = new StringBuilder();
-        for (int i = 0; i < name.size(); i++) {
-            sb.append(name.get(i).getValue()).append(" ");
-        }
-        return sb.toString();
-    }
-
-    private String ListToDescString(List<Description> name) {
-        StringBuilder sb = new StringBuilder();
-        for (int i = 0; i < name.size(); i++) {
-            sb.append(name.get(i).getValue()).append(" ");
-        }
-        return sb.toString();
-    }
-
     public PagableContainer SearchForServices(String keyword, String lang, int maxrecords, int offset) {
         PagableContainer ret = new PagableContainer();
         ret.displaycount = 0;
@@ -1297,7 +633,7 @@ public class UddiHub {
                         append("\" title=\"").
                         append(StringEscapeUtils.escapeHtml(findService.getServiceInfos().getServiceInfo().get(i).getServiceKey()))
                         .append("\">");
-                sb.append(ListToString(findService.getServiceInfos().getServiceInfo().get(i).getName())).append("</a></td><td>");
+                sb.append(Printers.ListNamesToString(findService.getServiceInfos().getServiceInfo().get(i).getName())).append("</a></td><td>");
                 sb.append((findService.getServiceInfos().getServiceInfo().get(i).getServiceKey())).append("</td><td>");
                 sb.append(StringEscapeUtils.escapeHtml((findService.getServiceInfos().getServiceInfo().get(i).getBusinessKey())))
                         .append("</td></tr>");
@@ -1477,7 +813,7 @@ public class UddiHub {
                             StringEscapeUtils.escapeHtml(findTModel.getTModelInfos().getTModelInfo().get(i).getTModelKey()))
                             .append("<br>");
                     sb.append("Description = ").append(
-                            StringEscapeUtils.escapeHtml(ListToDescString(findTModel.getTModelInfos().getTModelInfo().get(i).getDescription())))
+                            StringEscapeUtils.escapeHtml(Printers.ListToDescString(findTModel.getTModelInfos().getTModelInfo().get(i).getDescription())))
                             .append("<br>");
                     sb.append("Name = ").append(StringEscapeUtils.escapeHtml(findTModel.getTModelInfos().getTModelInfo().get(i).getName().getValue()))
                             .append(", ")
@@ -1655,7 +991,7 @@ public class UddiHub {
                     if (findBusiness.getBindingTemplate().get(i).getDescription().isEmpty()) {
                         sb.append(StringEscapeUtils.escapeHtml(findBusiness.getBindingTemplate().get(i).getServiceKey()));
                     } else {
-                        sb.append(StringEscapeUtils.escapeHtml(ListToDescString(findBusiness.getBindingTemplate().get(i).getDescription())));
+                        sb.append(StringEscapeUtils.escapeHtml(Printers.ListToDescString(findBusiness.getBindingTemplate().get(i).getDescription())));
                     }
                     sb.append("</a>");
                     sb.append("</td></tr>");
@@ -1727,7 +1063,7 @@ public class UddiHub {
                     if (findBusiness.getBusinessInfos().getBusinessInfo().get(i).getName().isEmpty()) {
                         sb.append(StringEscapeUtils.escapeHtml(findBusiness.getBusinessInfos().getBusinessInfo().get(i).getBusinessKey()));
                     } else {
-                        sb.append(StringEscapeUtils.escapeHtml(ListToString(findBusiness.getBusinessInfos().getBusinessInfo().get(i).getName())));
+                        sb.append(StringEscapeUtils.escapeHtml(Printers.ListNamesToString(findBusiness.getBusinessInfos().getBusinessInfo().get(i).getName())));
                     }
                     sb.append("</a>");
                     sb.append("</td></tr>");
@@ -1808,7 +1144,7 @@ public class UddiHub {
                     if (findBusiness.getServiceInfos().getServiceInfo().get(i).getName().isEmpty()) {
                         sb.append(StringEscapeUtils.escapeHtml(findBusiness.getServiceInfos().getServiceInfo().get(i).getServiceKey()));
                     } else {
-                        sb.append(StringEscapeUtils.escapeHtml(ListToString(findBusiness.getServiceInfos().getServiceInfo().get(i).getName())));
+                        sb.append(StringEscapeUtils.escapeHtml(Printers.ListNamesToString(findBusiness.getServiceInfos().getServiceInfo().get(i).getName())));
                     }
                     sb.append("</a>");
                     sb.append("</td></tr>");
@@ -1906,10 +1242,41 @@ public class UddiHub {
             return "No input";
         }
         List<String> x = new ArrayList<String>();
-        x.add(bizid);
+        x.add(bizid.trim());
         return deleteBusiness(x);
     }
 
+    public String deleteService(String serviceId) {
+        if (serviceId == null || serviceId.length() == 0) {
+            return "No input";
+        }
+        List<String> x = new ArrayList<String>();
+        x.add(serviceId.trim());
+        return deleteService(x);
+    }
+
+    public String deleteService(List<String> serviceId) {
+        if (serviceId == null || serviceId.isEmpty()) {
+            return "No input";
+        }
+        DeleteService db = new DeleteService();
+        db.setAuthInfo(GetToken());
+        db.getServiceKey().addAll(serviceId);
+        try {
+            publish.deleteService(db);
+        } catch (DispositionReportFaultMessage ex) {
+            log.log(Level.ERROR, null, ex);
+            return ex.getMessage() + " " + ex.detail.getMessage();
+        } catch (RemoteException ex) {
+            log.log(Level.ERROR, null, ex);
+            return ex.getMessage() + " " + ex.detail.getMessage();
+        } catch (Exception ex) {
+            log.log(Level.ERROR, null, ex);
+            return ex.getMessage();
+        }
+        return "Success";
+    }
+
     /**
      * Deletes a list of UDDI businesses by key
      *
@@ -2015,60 +1382,23 @@ public class UddiHub {
 
         //TODO signature
 
-        be.getDescription().addAll(BuildDescription(MapFilter(request.getParameterMap(), PostBackConstants.DESCRIPTION), PostBackConstants.DESCRIPTION));
-        be.getOverviewDoc().addAll(BuildOverviewDocs(MapFilter(request.getParameterMap(), PostBackConstants.OVERVIEW), PostBackConstants.OVERVIEW));
+        be.getDescription().addAll(Builders.BuildDescription(Builders.MapFilter(request.getParameterMap(), PostBackConstants.DESCRIPTION), PostBackConstants.DESCRIPTION));
+        be.getOverviewDoc().addAll(Builders.BuildOverviewDocs(Builders.MapFilter(request.getParameterMap(), PostBackConstants.OVERVIEW), PostBackConstants.OVERVIEW));
 
 //            be.setDiscoveryURLs(BuildDisco(MapFilter(request.getParameterMap(), PostBackConstants.DISCOVERYURL), PostBackConstants.DISCOVERYURL));
         CategoryBag cb = new CategoryBag();
-        cb.getKeyedReference().addAll(BuildKeyedReference(MapFilter(request.getParameterMap(), PostBackConstants.CATBAG_KEY_REF), PostBackConstants.CATBAG_KEY_REF));
-        cb.getKeyedReferenceGroup().addAll(BuildKeyedReferenceGroup(MapFilter(request.getParameterMap(), PostBackConstants.CATBAG_KEY_REF_GRP), PostBackConstants.CATBAG_KEY_REF_GRP));
+        cb.getKeyedReference().addAll(Builders.BuildKeyedReference(Builders.MapFilter(request.getParameterMap(), PostBackConstants.CATBAG_KEY_REF), PostBackConstants.CATBAG_KEY_REF));
+        cb.getKeyedReferenceGroup().addAll(Builders.BuildKeyedReferenceGroup(Builders.MapFilter(request.getParameterMap(), PostBackConstants.CATBAG_KEY_REF_GRP), PostBackConstants.CATBAG_KEY_REF_GRP));
 
         if (!cb.getKeyedReference().isEmpty() || !cb.getKeyedReferenceGroup().isEmpty()) {
             be.setCategoryBag(cb);
         }
-        be.setIdentifierBag(BuildIdentBag(MapFilter(request.getParameterMap(), PostBackConstants.IDENT_KEY_REF), PostBackConstants.IDENT_KEY_REF));
+        be.setIdentifierBag(Builders.BuildIdentBag(Builders.MapFilter(request.getParameterMap(), PostBackConstants.IDENT_KEY_REF), PostBackConstants.IDENT_KEY_REF));
 
         return SaveTModel(be);
 
     }
 
-    private List<OverviewDoc> BuildOverviewDocs(Map map, String prefix) {
-
-        List<OverviewDoc> ret = new ArrayList<OverviewDoc>();
-        Iterator it = map.keySet().iterator();
-        List<String> processedIndexes = new ArrayList<String>();
-        //
-        while (it.hasNext()) {
-            String key = (String) it.next();
-            String filteredkey = key.replace(prefix, "");
-            //key should now be a number (index), follwed
-
-            Matcher match = p.matcher(filteredkey);
-            if (match.find()) {
-                String index = filteredkey.substring(0, match.start());
-                if (!processedIndexes.contains(index)) {
-                    OverviewDoc pn = new OverviewDoc();
-                    //TODO is this a required field?
-                    pn.setOverviewURL(new OverviewURL());
-
-                    String[] t = (String[]) map.get(prefix + index + PostBackConstants.VALUE);
-                    pn.getOverviewURL().setValue(t[0]);
-                    t = (String[]) map.get(prefix + index + PostBackConstants.TYPE);
-                    pn.getOverviewURL().setUseType(t[0]);
-
-                    pn.getDescription().addAll(BuildDescription(MapFilter(map, prefix + index + PostBackConstants.DESCRIPTION), prefix + index + PostBackConstants.DESCRIPTION));
-
-                    ret.add(pn);
-                    processedIndexes.add(index);
-                }
-            } else {
-                //some kind of parsing error or invalud format data
-                throw new IllegalArgumentException("Invalid form data posted");
-            }
-        }
-        return ret;
-    }
-
     public static String SignatureToReadable(SignatureType sig) {
         StringBuilder sb = new StringBuilder();
         // X509Certificate signingcert = null;
@@ -2087,6 +1417,7 @@ public class UddiHub {
                                 CertificateFactory cf = CertificateFactory.getInstance("X.509");
                                 InputStream is = new ByteArrayInputStream((byte[]) element.getValue());
                                 X509Certificate cert = (X509Certificate) cf.generateCertificate(is);
+                                is.close();
                                 sb.append(cert.getSubjectDN().getName());
                             } catch (Exception ex) {
                             }
@@ -2099,4 +1430,160 @@ public class UddiHub {
         }
         return sb.toString();
     }
+
+    public static String SignatureToBase64(SignatureType sig) {
+        if (sig == null) {
+            return "Error, the signature was nullavailable";
+        }
+        for (int i = 0; i < sig.getKeyInfo().getContent().size(); i++) {
+            JAXBElement get = (JAXBElement) sig.getKeyInfo().getContent().get(i);
+
+            if (get.getValue() instanceof org.w3._2000._09.xmldsig_.X509DataType) {
+                X509DataType xd = (X509DataType) get.getValue();
+                for (int k = 0; k < xd.getX509IssuerSerialOrX509SKIOrX509SubjectName().size(); k++) {
+                    if (xd.getX509IssuerSerialOrX509SKIOrX509SubjectName().get(k) instanceof JAXBElement) {
+                        JAXBElement element = (JAXBElement) xd.getX509IssuerSerialOrX509SKIOrX509SubjectName().get(k);
+                        if (element.getValue() instanceof byte[]) {
+                            try {
+                                CertificateFactory cf = CertificateFactory.getInstance("X.509");
+                                // return org.apache.commons.codec.binary. encode((byte[])element.getValue());
+                                InputStream is = new ByteArrayInputStream((byte[]) element.getValue());
+                                X509Certificate cert = (X509Certificate) cf.generateCertificate(is);
+                                is.close();
+                                //(byte[])element.getValue()
+                                BASE64Encoder encoder = new BASE64Encoder();
+                                return encoder.encodeBuffer(cert.getEncoded());
+                                // byte[] decoded = org.apache.commons.codec.binary.Base64.decodeBase64(cert.getEncoded());
+                                //byte[] value = (byte[])element.getValue();
+                                //return new String(decoded, "UTF8");
+
+                            } catch (Exception ex) {
+                                log.log(Level.WARN, null, ex);
+                                return "Error! " + ex.getMessage();
+                            }
+                        } else if (element.getValue() instanceof String) {
+                        }
+                    }
+                }
+            }
+        }
+        return "Error, Not available";
+    }
+
+    /**
+     * Retrieves the UDDI entity, then attempts to return a base64 encoded
+     * certificate of the N'th indexed signature
+     *
+     * @param ft The type of item requested
+     * @param id the unique identifier of the entity
+     * @param index the offset of the signature, starting at 0
+     * @return the base64 encoded certification, omitting headers and footers OR
+     * "Error" with an error message
+     */
+    public String GetCertificate(FindType ft, String id, int index) {
+        SignatureType st = null;
+        switch (ft) {
+            case BindingTemplate:
+                BindingTemplate GetBindingDetailsAsObject = GetBindingDetailsAsObject(id);
+                if (GetBindingDetailsAsObject != null) {
+                    return SignatureToBase64(GetBindingDetailsAsObject.getSignature().get(index));
+                }
+                break;
+            case Business:
+                BusinessEntity GetBusinessDetailsAsObject = GetBusinessDetailsAsObject(id);
+                if (GetBusinessDetailsAsObject != null) {
+                    return SignatureToBase64(GetBusinessDetailsAsObject.getSignature().get(index));
+                }
+                break;
+            case Service:
+                BusinessService GetServiceDetailsAsObject = GetServiceDetailsAsObject(id);
+                if (GetServiceDetailsAsObject != null) {
+                    return SignatureToBase64(GetServiceDetailsAsObject.getSignature().get(index));
+                }
+                break;
+            case tModel:
+                TModel GettModelDetailsAsObject = GettModelDetailsAsObject(id);
+                if (GettModelDetailsAsObject != null) {
+                    return SignatureToBase64(GettModelDetailsAsObject.getSignature().get(index));
+                }
+                break;
+
+        }
+        return "Error, unsupported entity type";
+    }
+
+    /**
+     *
+     * @return null if there's an error
+     */
+    public List<Subscription> GetSubscriptions() {
+        try {
+            return subscription.getSubscriptions(GetToken());
+        } catch (DispositionReportFaultMessage ex) {
+            log.log(Level.ERROR, null, ex);
+        } catch (RemoteException ex) {
+            log.log(Level.ERROR, null, ex);
+        } catch (Exception ex) {
+            log.log(Level.ERROR, null, ex);
+        }
+        return null;
+    }
+
+    /**
+     *
+     * @param ft
+     * @param id
+     * @return null if theres an error
+     */
+    public List<OperationalInfo> GetOperationalInfo(String id) {
+        GetOperationalInfo goi = new GetOperationalInfo();
+        goi.setAuthInfo(id);
+        goi.getEntityKey().add(id);
+        OperationalInfos operationalInfo;
+        try {
+            operationalInfo = inquiry.getOperationalInfo(goi);
+            return operationalInfo.getOperationalInfo();
+        } catch (DispositionReportFaultMessage ex) {
+            log.log(Level.ERROR, null, ex);
+        } catch (RemoteException ex) {
+            log.log(Level.ERROR, null, ex);
+        } catch (Exception ex) {
+            log.log(Level.ERROR, null, ex);
+        }
+        return null;
+    }
+
+    /**
+     *GetOperationalInfo
+     * @param info
+     * @return
+     */
+    public String GetOperationalInfo(List<OperationalInfo> info) {
+        StringBuilder sb = new StringBuilder();
+
+        if (info != null) {
+            sb.append("<table class=\"table\">");
+            for (int i = 0; i < info.size(); i++) {
+                sb.append("<tr><th>Node Id</th><th>Authorized Name</th><th>Key</th><th>Created</th><th>Modified</th><th>Modified+</th></tr>");
+                sb.append("<tr><td>");
+                sb.append(StringEscapeUtils.escapeHtml(info.get(i).getNodeID()))
+                        .append("</td><td>")
+                        .append(StringEscapeUtils.escapeHtml(info.get(i).getAuthorizedName()))
+                        .append("</td><td>")
+                        .append(StringEscapeUtils.escapeHtml(info.get(i).getEntityKey()))
+                        .append("</td><td>")
+                        .append(StringEscapeUtils.escapeHtml(info.get(i).getCreated().toString()))
+                        .append("</td><td>")
+                        .append(StringEscapeUtils.escapeHtml(info.get(i).getModified().toString()))
+                        .append("</td><td>")
+                        .append(StringEscapeUtils.escapeHtml(info.get(i).getModifiedIncludingChildren().toString()))
+                        .append("</td></tr>");
+            }
+            sb.append("</table>");
+        }
+        return sb.toString();
+    }
+    
+    
+    
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@juddi.apache.org
For additional commands, e-mail: commits-help@juddi.apache.org


Mime
View raw message