Author: alexoree
Date: Tue Sep  3 21:02:38 2013
New Revision: 1519848

URL: http://svn.apache.org/r1519848
Log:
JUDDI-645 fixed
JUDDI-646 fixed
JUDDI-647 fixed

Added:
    juddi/trunk/juddi-tomcat/tomcat-users.xml
Modified:
    
juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/WADL2UDDI.java
    juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-3des.xml
    juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-aes128.xml
    juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-aes256.xml
    juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-default.xml
    juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3.xml
    juddi/trunk/juddi-core/src/main/java/org/apache/juddi/config/AppConfig.java
    juddi/trunk/juddi-core/src/main/java/org/apache/juddi/config/Install.java
    juddi/trunk/juddi-core/src/main/java/org/apache/juddi/config/Property.java
    juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-3des.xml
    juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-aes128.xml
    juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-aes256.xml
    juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-default.xml
    juddi/trunk/juddi-core/src/test/resources/juddiv3.xml
    
juddi/trunk/juddi-examples/uddi-annotations/src/main/webapp/WEB-INF/classes/juddiv3.xml
    juddi/trunk/juddi-tomcat/build.xml
    juddi/trunk/juddiv3-war/src/main/webapp/WEB-INF/classes/juddiv3.xml
    juddi/trunk/juddiv3-war/src/main/webapp/index.jsp

Modified: 
juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/WADL2UDDI.java
URL: 
http://svn.apache.org/viewvc/juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/WADL2UDDI.java?rev=1519848&r1=1519847&r2=1519848&view=diff
==============================================================================
--- 
juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/WADL2UDDI.java
 (original)
+++ 
juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/mapping/WADL2UDDI.java
 Tue Sep  3 21:02:38 2013
@@ -408,7 +408,7 @@ public class WADL2UDDI {
      * @param username
      * @param password
      * @param ignoreSSLErrors if true, SSL errors are ignored
-     * @return a non-null "Application" object, represeting a WADL's 
application root XML element
+     * @return a non-null "Application" object, represeting a WADL's 
application root XML 
      * Sample code:<br>
      * <pre>
      * Application app = WADL2UDDI.ParseWadl(new 
URL("http://server/wsdl.wsdl";), "username", "password", 

Modified: juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-3des.xml
URL: 
http://svn.apache.org/viewvc/juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-3des.xml?rev=1519848&r1=1519847&r2=1519848&view=diff
==============================================================================
--- juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-3des.xml 
(original)
+++ juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-3des.xml Tue 
Sep  3 21:02:38 2013
@@ -14,8 +14,16 @@
                <server>
                        <baseurl>http://localhost:8080/juddiv3</baseurl>
                </server>
-               <root>
+               <!-- The node Id must be unique when setup in a cluster of UDDI 
servers implementing the replication API
+                       don't worry, jUDDI doesn't implement it right now, but 
it may come in the future -->
+               <nodeId>uddi:juddi.apache.org:node1</nodeId>
+               <!-- The key of the root business that all of the UDDI services 
are registered in, as defined in the install_data -->
+                       <root>
+                       <!-- this is the 'root' username, or owner of the node 
-->
                        <publisher>root</publisher>
+                       <!-- The key of the root business that all of the UDDI 
services are registered in, as defined in the install_data -->
+                       
<businessId>uddi:juddi.apache.org:businesses-asf</businessId>
+                       <partition>uddi:juddi.apache.org</partition>
                </root>
                <seed>
                        <always>false</always>

Modified: 
juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-aes128.xml
URL: 
http://svn.apache.org/viewvc/juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-aes128.xml?rev=1519848&r1=1519847&r2=1519848&view=diff
==============================================================================
--- juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-aes128.xml 
(original)
+++ juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-aes128.xml 
Tue Sep  3 21:02:38 2013
@@ -14,8 +14,15 @@
                <server>
                        <baseurl>http://localhost:8080/juddiv3</baseurl>
                </server>
-               <root>
+               <!-- The node Id must be unique when setup in a cluster of UDDI 
servers implementing the replication API
+                       don't worry, jUDDI doesn't implement it right now, but 
it may come in the future -->
+               <nodeId>uddi:juddi.apache.org:node1</nodeId>
+                       <root>
+                       <!-- this is the 'root' username, or owner of the node 
-->
                        <publisher>root</publisher>
+                       <!-- The key of the root business that all of the UDDI 
services are registered in, as defined in the install_data -->
+                       
<businessId>uddi:juddi.apache.org:businesses-asf</businessId>
+                       <partition>uddi:juddi.apache.org</partition>
                </root>
                <seed>
                        <always>false</always>

Modified: 
juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-aes256.xml
URL: 
http://svn.apache.org/viewvc/juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-aes256.xml?rev=1519848&r1=1519847&r2=1519848&view=diff
==============================================================================
--- juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-aes256.xml 
(original)
+++ juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-aes256.xml 
Tue Sep  3 21:02:38 2013
@@ -14,8 +14,16 @@
                <server>
                        <baseurl>http://localhost:8080/juddiv3</baseurl>
                </server>
+               <!-- The node Id must be unique when setup in a cluster of UDDI 
servers implementing the replication API
+                       don't worry, jUDDI doesn't implement it right now, but 
it may come in the future -->
+               <nodeId>uddi:juddi.apache.org:node1</nodeId>
+               
                <root>
+                       <!-- this is the 'root' username, or owner of the node 
-->
                        <publisher>root</publisher>
+                       <!-- The key of the root business that all of the UDDI 
services are registered in, as defined in the install_data -->
+                       
<businessId>uddi:juddi.apache.org:businesses-asf</businessId>
+                       <partition>uddi:juddi.apache.org</partition>
                </root>
                <seed>
                        <always>false</always>

Modified: 
juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-default.xml
URL: 
http://svn.apache.org/viewvc/juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-default.xml?rev=1519848&r1=1519847&r2=1519848&view=diff
==============================================================================
--- juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-default.xml 
(original)
+++ juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3-enc-default.xml 
Tue Sep  3 21:02:38 2013
@@ -14,8 +14,15 @@
                <server>
                        <baseurl>http://localhost:8080/juddiv3</baseurl>
                </server>
+               <!-- The node Id must be unique when setup in a cluster of UDDI 
servers implementing the replication API
+                       don't worry, jUDDI doesn't implement it right now, but 
it may come in the future -->
+               <nodeId>uddi:juddi.apache.org:node1</nodeId>
                <root>
+                       <!-- this is the 'root' username, or owner of the node 
-->
                        <publisher>root</publisher>
+                       <!-- The key of the root business that all of the UDDI 
services are registered in, as defined in the install_data -->
+                       
<businessId>uddi:juddi.apache.org:businesses-asf</businessId>
+                       <partition>uddi:juddi.apache.org</partition>
                </root>
                <seed>
                        <always>false</always>

Modified: juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3.xml
URL: 
http://svn.apache.org/viewvc/juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3.xml?rev=1519848&r1=1519847&r2=1519848&view=diff
==============================================================================
--- juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3.xml (original)
+++ juddi/trunk/juddi-core-openjpa/src/test/resources/juddiv3.xml Tue Sep  3 
21:02:38 2013
@@ -14,8 +14,16 @@
                <server>
                        <baseurl>http://localhost:8080/juddiv3</baseurl>
                </server>
+               <!-- The node Id must be unique when setup in a cluster of UDDI 
servers implementing the replication API
+                       don't worry, jUDDI doesn't implement it right now, but 
it may come in the future -->
+               <nodeId>uddi:juddi.apache.org:node1</nodeId>
+               <!-- The key of the root business that all of the UDDI services 
are registered in, as defined in the install_data -->
                <root>
+                       <!-- this is the 'root' username, or owner of the node 
-->
                        <publisher>root</publisher>
+                       <!-- The key of the root business that all of the UDDI 
services are registered in, as defined in the install_data -->
+                       
<businessId>uddi:juddi.apache.org:businesses-asf</businessId>
+                       <partition>uddi:juddi.apache.org</partition>
                </root>
                <seed>
                        <always>false</always>

Modified: 
juddi/trunk/juddi-core/src/main/java/org/apache/juddi/config/AppConfig.java
URL: 
http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/main/java/org/apache/juddi/config/AppConfig.java?rev=1519848&r1=1519847&r2=1519848&view=diff
==============================================================================
--- juddi/trunk/juddi-core/src/main/java/org/apache/juddi/config/AppConfig.java 
(original)
+++ juddi/trunk/juddi-core/src/main/java/org/apache/juddi/config/AppConfig.java 
Tue Sep  3 21:02:38 2013
@@ -211,6 +211,8 @@ public class AppConfig 
                        else
                                throw new ConfigurationException("A node 
business entity was not found.  Please make sure that the application is 
properly installed.");
                        result.setProperty(Property.JUDDI_NODE_ID, nodeId);
+                        
+                        
//result.setProperty(Property.JUDDI_NODE_ROOT_BUSINESS, nodeId);
                        
                        tx.commit();
                        return result;

Modified: 
juddi/trunk/juddi-core/src/main/java/org/apache/juddi/config/Install.java
URL: 
http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/main/java/org/apache/juddi/config/Install.java?rev=1519848&r1=1519847&r2=1519848&view=diff
==============================================================================
--- juddi/trunk/juddi-core/src/main/java/org/apache/juddi/config/Install.java 
(original)
+++ juddi/trunk/juddi-core/src/main/java/org/apache/juddi/config/Install.java 
Tue Sep  3 21:02:38 2013
@@ -98,15 +98,17 @@ public class Install {
                        org.uddi.api_v3.BusinessEntity rootBusinessEntity = 
(org.uddi.api_v3.BusinessEntity)buildInstallEntity(fileRootBusinessEntity, 
"org.uddi.api_v3",config);
                        
                        String rootPartition = 
getRootPartition(rootTModelKeyGen);
-                       String nodeId = 
getNodeId(rootBusinessEntity.getBusinessKey(), rootPartition);
-                       
+                        //JUDDI-645
+                       String nodeId = 
config.getString(Property.JUDDI_NODE_ID,getNodeId(rootBusinessEntity.getBusinessKey(),
 rootPartition) );
+                                
//getNodeId(rootBusinessEntity.getBusinessKey(), rootPartition);
+                       String rootbizkey = 
getNodeId(rootBusinessEntity.getBusinessKey(), rootPartition);
                        String fileRootPublisher = rootPublisherStr + 
FILE_PUBLISHER;
                        if (!alreadyInstalled) {
                                log.info("Loading the root Publisher from file 
" + fileRootPublisher);
                        
                                rootPublisher = installPublisher(em, 
fileRootPublisher, config);
                                installRootPublisherKeyGen(em, 
rootTModelKeyGen, rootPartition, rootPublisher, nodeId);
-                               rootBusinessEntity.setBusinessKey(nodeId);
+                               rootBusinessEntity.setBusinessKey(rootbizkey);
                                installBusinessEntity(true, em, 
rootBusinessEntity, rootPublisher, rootPartition, config);
                        } else {
                                log.debug("juddi.seed.always reapplies all seed 
files except for the root data.");
@@ -271,7 +273,10 @@ public class Install {
                modelBusinessEntity.setCreated(now);
                modelBusinessEntity.setModified(now);
                modelBusinessEntity.setModifiedIncludingChildren(now);
-               
modelBusinessEntity.setNodeId(modelBusinessEntity.getEntityKey());
+                //JUDDI-645
+               
//modelBusinessEntity.setNodeId(modelBusinessEntity.getEntityKey());
+                
modelBusinessEntity.setNodeId(config.getString(Property.JUDDI_NODE_ID,modelBusinessEntity.getEntityKey()));
+
                
                for (org.apache.juddi.model.BusinessService service : 
modelBusinessEntity.getBusinessServices()) {
                        
service.setAuthorizedName(rootPublisher.getAuthorizedName());
@@ -279,7 +284,9 @@ public class Install {
                        service.setCreated(now);
                        service.setModified(now);
                        service.setModifiedIncludingChildren(now);
-                       service.setNodeId(modelBusinessEntity.getEntityKey());
+                        //JUDDI-645
+                        
service.setNodeId(config.getString(Property.JUDDI_NODE_ID,modelBusinessEntity.getEntityKey()));
+                       //service.setNodeId(modelBusinessEntity.getEntityKey());
                        
                        for (org.apache.juddi.model.BindingTemplate binding : 
service.getBindingTemplates()) {
                                
binding.setAuthorizedName(rootPublisher.getAuthorizedName());
@@ -287,7 +294,10 @@ public class Install {
                                binding.setCreated(now);
                                binding.setModified(now);
                                binding.setModifiedIncludingChildren(now);
-                               
binding.setNodeId(modelBusinessEntity.getEntityKey());
+                               
//binding.setNodeId(modelBusinessEntity.getEntityKey());
+                                
binding.setNodeId(config.getString(Property.JUDDI_NODE_ID,modelBusinessEntity.getEntityKey()));
+                                //JUDDI-645
+                                
                        }
                }
                
@@ -362,7 +372,7 @@ public class Install {
                String parentKey = businessService.getBusinessKey();
                if (parentKey != null && parentKey.length()> 0) {
                        if 
(!parentKey.equalsIgnoreCase(parent.getBusinessKey()))
-                               throw new InvalidKeyPassedException(new 
ErrorMessage("errors.invalidkey.ParentBusinessNotFound", parentKey));
+                               throw new InvalidKeyPassedException(new 
ErrorMessage("errors.invalidkey.ParentBusinessNotFound", parentKey + " " + 
businessService.getBusinessKey() + " " + 
businessService.getBusinessKey().length() + " " + parentKey.length()));
                }
                
                // Retrieve the service's passed key

Modified: 
juddi/trunk/juddi-core/src/main/java/org/apache/juddi/config/Property.java
URL: 
http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/main/java/org/apache/juddi/config/Property.java?rev=1519848&r1=1519847&r2=1519848&view=diff
==============================================================================
--- juddi/trunk/juddi-core/src/main/java/org/apache/juddi/config/Property.java 
(original)
+++ juddi/trunk/juddi-core/src/main/java/org/apache/juddi/config/Property.java 
Tue Sep  3 21:02:38 2013
@@ -38,7 +38,17 @@ public interface Property {
     public final static String JUDDI_USERSFILE = "juddi.auth.usersfile";
     public final static String JUDDI_MAX_ROWS = "juddi.maxRows";
     public final static String JUDDI_MAX_IN_CLAUSE = "juddi.maxInClause";
-    public final static String JUDDI_ROOT_PARTITION = "juddi.rootPartition";
+    public final static String JUDDI_ROOT_PARTITION = "juddi.root.partition";
+    /**
+     * This is the business id that all of the UDDI services on this node will 
be attached too
+     * (generally as defined in the install_data)
+     * JUDDI-645
+     */
+    public final static String JUDDI_NODE_ROOT_BUSINESS = 
"juddi.root.businessId";
+    /**
+     * this is the unique identifier of this uddi service provide, primarily 
used for clustered setups with the replication api
+     * JUDDI-645
+     */
     public final static String JUDDI_NODE_ID = "juddi.nodeId";
     public final static String JUDDI_TRANSFER_EXPIRATION_DAYS = 
"juddi.transfer.expiration.days";
     /**
@@ -67,7 +77,12 @@ public interface Property {
     public final static String JUDDI_AUTHENTICATOR_LDAP_EXPANDED_STR= 
"juddi.auth.authenticator.ldapexp";
     
     
-    
+    /**
+     * if enabled, tmodels must exist before using them
+     * binding templates must exist before a subscription can be made
+     * access point hosting redirector/binding template must exist before it 
can be made
+     * @since 3.1.5
+     */
     public final static String JUDDI_ENFORCE_REFERENTIAL_INTEGRITY = 
"juddi.validation.enforceReferentialIntegrity";
     public final static String JUDDI_SUBSCRIPTION_EXPIRATION_DAYS = 
"juddi.subscription.expiration.days";
     public final static String JUDDI_SUBSCRIPTION_NOTIFICATION = 
"juddi.subscription.notification";

Modified: juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-3des.xml
URL: 
http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-3des.xml?rev=1519848&r1=1519847&r2=1519848&view=diff
==============================================================================
--- juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-3des.xml (original)
+++ juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-3des.xml Tue Sep  3 
21:02:38 2013
@@ -14,8 +14,16 @@
                <server>
                        <baseurl>http://localhost:8080/juddiv3</baseurl>
                </server>
+               <!-- The node Id must be unique when setup in a cluster of UDDI 
servers implementing the replication API
+                       don't worry, jUDDI doesn't implement it right now, but 
it may come in the future -->
+               <nodeId>uddi:juddi.apache.org:node1</nodeId>
+               
                <root>
+                       <!-- this is the 'root' username, or owner of the node 
-->
                        <publisher>root</publisher>
+                       <!-- The key of the root business that all of the UDDI 
services are registered in, as defined in the install_data -->
+                       
<businessId>uddi:juddi.apache.org:businesses-asf</businessId>
+                       <partition>uddi:juddi.apache.org</partition>
                </root>
                <seed>
                        <always>false</always>

Modified: juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-aes128.xml
URL: 
http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-aes128.xml?rev=1519848&r1=1519847&r2=1519848&view=diff
==============================================================================
--- juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-aes128.xml (original)
+++ juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-aes128.xml Tue Sep  3 
21:02:38 2013
@@ -14,6 +14,9 @@
                <server>
                        <baseurl>http://localhost:8080/juddiv3</baseurl>
                </server>
+               <!-- The node Id must be unique when setup in a cluster of UDDI 
servers implementing the replication API
+                       don't worry, jUDDI doesn't implement it right now, but 
it may come in the future -->
+               <nodeId>uddi:juddi.apache.org:node1</nodeId>
                <root>
                        <publisher>root</publisher>
                </root>

Modified: juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-aes256.xml
URL: 
http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-aes256.xml?rev=1519848&r1=1519847&r2=1519848&view=diff
==============================================================================
--- juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-aes256.xml (original)
+++ juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-aes256.xml Tue Sep  3 
21:02:38 2013
@@ -14,8 +14,16 @@
                <server>
                        <baseurl>http://localhost:8080/juddiv3</baseurl>
                </server>
-               <root>
+               <!-- The node Id must be unique when setup in a cluster of UDDI 
servers implementing the replication API
+                       don't worry, jUDDI doesn't implement it right now, but 
it may come in the future -->
+               <nodeId>uddi:juddi.apache.org:node1</nodeId>
+                
+                       <root>
+                       <!-- this is the 'root' username, or owner of the node 
-->
                        <publisher>root</publisher>
+                       <!-- The key of the root business that all of the UDDI 
services are registered in, as defined in the install_data -->
+                       
<businessId>uddi:juddi.apache.org:businesses-asf</businessId>
+                       <partition>uddi:juddi.apache.org</partition>
                </root>
                <seed>
                        <always>false</always>

Modified: juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-default.xml
URL: 
http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-default.xml?rev=1519848&r1=1519847&r2=1519848&view=diff
==============================================================================
--- juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-default.xml (original)
+++ juddi/trunk/juddi-core/src/test/resources/juddiv3-enc-default.xml Tue Sep  
3 21:02:38 2013
@@ -14,8 +14,15 @@
                <server>
                        <baseurl>http://localhost:8080/juddiv3</baseurl>
                </server>
+               <!-- The node Id must be unique when setup in a cluster of UDDI 
servers implementing the replication API
+                       don't worry, jUDDI doesn't implement it right now, but 
it may come in the future -->
+               <nodeId>uddi:juddi.apache.org:node1</nodeId>
                <root>
+                       <!-- this is the 'root' username, or owner of the node 
-->
                        <publisher>root</publisher>
+                       <!-- The key of the root business that all of the UDDI 
services are registered in, as defined in the install_data -->
+                       
<businessId>uddi:juddi.apache.org:businesses-asf</businessId>
+                       <partition>uddi:juddi.apache.org</partition>
                </root>
                <seed>
                        <always>false</always>

Modified: juddi/trunk/juddi-core/src/test/resources/juddiv3.xml
URL: 
http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/test/resources/juddiv3.xml?rev=1519848&r1=1519847&r2=1519848&view=diff
==============================================================================
--- juddi/trunk/juddi-core/src/test/resources/juddiv3.xml (original)
+++ juddi/trunk/juddi-core/src/test/resources/juddiv3.xml Tue Sep  3 21:02:38 
2013
@@ -14,8 +14,16 @@
                <server>
                        <baseurl>http://localhost:8080/juddiv3</baseurl>
                </server>
+               <!-- The node Id must be unique when setup in a cluster of UDDI 
servers implementing the replication API
+                       don't worry, jUDDI doesn't implement it right now, but 
it may come in the future -->
+               <nodeId>uddi:juddi.apache.org:node1</nodeId>
+               <!-- The key of the root business that all of the UDDI services 
are registered in, as defined in the install_data -->
                <root>
+                       <!-- this is the 'root' username, or owner of the node 
-->
                        <publisher>root</publisher>
+                       <!-- The key of the root business that all of the UDDI 
services are registered in, as defined in the install_data -->
+                       
<businessId>uddi:juddi.apache.org:businesses-asf</businessId>
+                       <partition>uddi:juddi.apache.org</partition>
                </root>
                <seed>
                        <always>false</always>

Modified: 
juddi/trunk/juddi-examples/uddi-annotations/src/main/webapp/WEB-INF/classes/juddiv3.xml
URL: 
http://svn.apache.org/viewvc/juddi/trunk/juddi-examples/uddi-annotations/src/main/webapp/WEB-INF/classes/juddiv3.xml?rev=1519848&r1=1519847&r2=1519848&view=diff
==============================================================================
--- 
juddi/trunk/juddi-examples/uddi-annotations/src/main/webapp/WEB-INF/classes/juddiv3.xml
 (original)
+++ 
juddi/trunk/juddi-examples/uddi-annotations/src/main/webapp/WEB-INF/classes/juddiv3.xml
 Tue Sep  3 21:02:38 2013
@@ -14,8 +14,16 @@
                <server>
                        <baseurl>http://localhost:8080/juddiv3</baseurl>
                </server>
+               <!-- The node Id must be unique when setup in a cluster of UDDI 
servers implementing the replication API
+                       don't worry, jUDDI doesn't implement it right now, but 
it may come in the future -->
+               <nodeId>uddi:juddi.apache.org:node1</nodeId>
+               <!-- The key of the root business that all of the UDDI services 
are registered in, as defined in the install_data -->
                <root>
+                       <!-- this is the 'root' username, or owner of the node 
-->
                        <publisher>root</publisher>
+                       <!-- The key of the root business that all of the UDDI 
services are registered in, as defined in the install_data -->
+                       
<businessId>uddi:juddi.apache.org:businesses-asf</businessId>
+                       <partition>uddi:juddi.apache.org</partition>
                </root>
                <seed>
                        <always>false</always>

Modified: juddi/trunk/juddi-tomcat/build.xml
URL: 
http://svn.apache.org/viewvc/juddi/trunk/juddi-tomcat/build.xml?rev=1519848&r1=1519847&r2=1519848&view=diff
==============================================================================
--- juddi/trunk/juddi-tomcat/build.xml (original)
+++ juddi/trunk/juddi-tomcat/build.xml Tue Sep  3 21:02:38 2013
@@ -15,6 +15,7 @@
        <target name="copy-resources" depends="unzip-tomcat">
                <copy file="${basedir}/catalina.sh" 
todir="${basedir}/target/tomcat/apache-tomcat-${apache.tomcat.version}/bin" 
overwrite="true"/>
                <copy file="${basedir}/catalina.bat" 
todir="${basedir}/target/tomcat/apache-tomcat-${apache.tomcat.version}/bin" 
overwrite="true"/>
+                <copy file="${basedir}/tomcat-users.xml" todir="${conf.dir}" 
overwrite="true"/>
                <copy file="${basedir}/context.xml" 
todir="${webapps.dir}/juddiv3/META-INF" overwrite="true"/>
                <copy file="${basedir}/server.xml" todir="${conf.dir}" 
overwrite="true"/>
                <copy file="${basedir}/keystore.jks" todir="${conf.dir}" 
overwrite="true"/>

Added: juddi/trunk/juddi-tomcat/tomcat-users.xml
URL: 
http://svn.apache.org/viewvc/juddi/trunk/juddi-tomcat/tomcat-users.xml?rev=1519848&view=auto
==============================================================================
--- juddi/trunk/juddi-tomcat/tomcat-users.xml (added)
+++ juddi/trunk/juddi-tomcat/tomcat-users.xml Tue Sep  3 21:02:38 2013
@@ -0,0 +1,44 @@
+<?xml version='1.0' encoding='utf-8'?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<tomcat-users>
+<!--
+  NOTE:  By default, no user is included in the "manager" role required
+  to operate the "/manager" web application.  If you wish to use this app,
+  you must define such a user - the username and password are arbitrary.
+-->
+<!--
+  NOTE:  The sample user and role entries below are wrapped in a comment
+  and thus are ignored when reading this file. Do not forget to remove
+  <!.. ..> that surrounds them.
+-->
+<!--
+  <role rolename="tomcat"/>
+  <role rolename="role1"/>
+  <user username="tomcat" password="tomcat" roles="tomcat"/>
+  <user username="both" password="tomcat" roles="tomcat,role1"/>
+  <user username="role1" password="tomcat" roles="role1"/>
+-->
+
+<!-- jUDDI notes - the role 'uddiadmin' is for accessing:
+    -   the juddi server administration pages 
http://localhost:8080/juddiv3/admin
+    -   the juddi-gui configuration page 
http://localhost:8080/juddi-gui/settings.jsp
+    
+    -->
+  <role rolename="uddiadmin"/>  
+  <user username="uddiadmin" password="da_password1" roles="uddiadmin" />
+</tomcat-users>

Modified: juddi/trunk/juddiv3-war/src/main/webapp/WEB-INF/classes/juddiv3.xml
URL: 
http://svn.apache.org/viewvc/juddi/trunk/juddiv3-war/src/main/webapp/WEB-INF/classes/juddiv3.xml?rev=1519848&r1=1519847&r2=1519848&view=diff
==============================================================================
--- juddi/trunk/juddiv3-war/src/main/webapp/WEB-INF/classes/juddiv3.xml 
(original)
+++ juddi/trunk/juddiv3-war/src/main/webapp/WEB-INF/classes/juddiv3.xml Tue Sep 
 3 21:02:38 2013
@@ -14,8 +14,16 @@
                <server>
                        <baseurl>http://localhost:8080/juddiv3</baseurl>
                </server>
+               <!-- The node Id must be unique when setup in a cluster of UDDI 
servers implementing the replication API
+                       don't worry, jUDDI doesn't implement it right now, but 
it may come in the future -->
+               <nodeId>uddi:juddi.apache.org:node1</nodeId>
+               <!-- The key of the root business that all of the UDDI services 
are registered in, as defined in the install_data -->
                <root>
+                       <!-- this is the 'root' username, or owner of the node 
-->
                        <publisher>root</publisher>
+                       <!-- The key of the root business that all of the UDDI 
services are registered in, as defined in the install_data -->
+                       
<businessId>uddi:juddi.apache.org:businesses-asf</businessId>
+                       <partition>uddi:juddi.apache.org</partition>
                </root>
                <seed>
                        <always>false</always>

Modified: juddi/trunk/juddiv3-war/src/main/webapp/index.jsp
URL: 
http://svn.apache.org/viewvc/juddi/trunk/juddiv3-war/src/main/webapp/index.jsp?rev=1519848&r1=1519847&r2=1519848&view=diff
==============================================================================
--- juddi/trunk/juddiv3-war/src/main/webapp/index.jsp (original)
+++ juddi/trunk/juddiv3-war/src/main/webapp/index.jsp Tue Sep  3 21:02:38 2013
@@ -1,3 +1,4 @@
+<%@page import="org.apache.commons.lang.StringEscapeUtils"%>
 <%@ page session="false" %>
 <%@ page import="java.util.List,
          org.apache.juddi.config.Install,
@@ -26,14 +27,14 @@
         <h2><em>Welcome</em> to Apache jUDDI!</h2>
         jUDDI is an open source implementation of <a 
href="http://oasis-open.org";>OASIS</a>'s <a 
href="http://oasis-open.org/committees/uddi-spec/doc/tcspecs.htm#uddiv3";>Universal
 Discovery Description and Integration (UDDI)</a>.
         You've reached the deployment page for jUDDI's web services.<br>
-        
-               Looking for the old jUDDI Portal/Porlets? We've completely 
rewritten it. 
-               
+
+        Looking for the old jUDDI Portal/Porlets? We've completely rewritten 
it. 
+
         <h4><a href="/juddi-gui">View the jUDDI User Interface</a> - This is a 
nearly complete UDDIv3 end user web application.</h4>
-        
+
         <h4><a href="admin">View the jUDDI Administration Interface</a> - This 
is for administrators to use to reconfigure jUDDI, check the status, and 
perform administrative actions.</h4>
-               
-               
+
+
         Here's some useful links to learn more about the UDDI and jUDDI.
         <ul>
             <li><a href="services">View the service listing on this UDDI 
node</a></li>
@@ -45,9 +46,9 @@
             <li><a href="http://juddi.apache.org/issue-tracking.html"; >jUDDI's 
Issue Tracker (report a bug)</a></li>
             <li><a href="http://svn.apache.org/viewvc/juddi/"; >jUDDI's Source 
Code</a></li>
             <li><a href="http://www.nabble.com/jUDDI-f218.html";>jUDDI's 
Mailing lists</a></li>
-                       
+
         </ul>
-               
+
         <div class="install">
             <h4>jUDDI Installation Status</h4>
             <div class="content">
@@ -55,13 +56,15 @@
                     // This will tirgger the install process...
                     String rootPartition = 
AppConfig.getConfiguration().getString(Property.JUDDI_ROOT_PARTITION);
                     String nodeId = 
AppConfig.getConfiguration().getString(Property.JUDDI_NODE_ID);
+                    String rootBusiness = 
AppConfig.getConfiguration().getString(Property.JUDDI_NODE_ROOT_BUSINESS);
                     String nodeName = "";
                     String nodeDescription = "";
-
-                    BusinessEntity be = Install.getNodeBusinessEntity(nodeId);
-
-                    if (be != null) {
-                        Name n = (Name) be.getName().get(0);
+                    BusinessEntity be = null;
+                    boolean ok = true;
+                    String error = "";
+                    try {
+                        be = Install.getNodeBusinessEntity(rootBusiness);
+                        Name n = be.getName().get(0);
                         if (n != null) {
                             nodeName = n.getValue();
                         }
@@ -73,29 +76,58 @@
                                 nodeDescription = d.getValue();
                             }
                         }
+                    } catch (Exception ex) {
+                        ok = false;
+                        error = ex.getMessage();
+
                     }
+                    if (ok) {
+
                 %>
                 <div>jUDDI has been successfully installed!</div>
-                <p />
-                <h4>Node Information</h4>
+
+                <h3>Node Information</h3>
                 <table>
                     <tr>
                         <td><b>Root Partition:</b></td>
-                        <td><%= rootPartition%></td>
+                        <td><%= 
StringEscapeUtils.escapeHtml(rootPartition)%></td>
                     </tr>
+
                     <tr>
                         <td><b>Node Id:</b></td>
-                        <td><%= nodeId%></td>
+                        <td><%=StringEscapeUtils.escapeHtml(nodeId)%></td>
                     </tr>
                     <tr>
-                        <td><b>Name:</b></td>
-                        <td><%= nodeName%></td>
+                        <td><b>Root Business Key:</b></td>
+                        <td><%= 
StringEscapeUtils.escapeHtml(rootBusiness)%></td>
                     </tr>
                     <tr>
-                        <td><b>Description:</b></td>
-                        <td><%= nodeDescription%></td>
+                        <td><b>Root Business Name:</b></td>
+                        <td><%= StringEscapeUtils.escapeHtml(nodeName)%></td>
                     </tr>
+                    <tr>
+                        <td><b>Root Business Description:</b></td>
+                        
<td><%=StringEscapeUtils.escapeHtml(nodeDescription)%></td>
+                    </tr>
+
                 </table>
+                <%
+                } else {
+                %>
+                <h2>jUDDI has NOT installed correctly!</h2>
+                <p />
+                <h3>Error Information</h3>
+                <p>
+                    <%=StringEscapeUtils.escapeHtml(error)%><br>
+                    Suggestion: Check the juddiv3.xml config file for the 
following settings (in Xpath notation) and ensure that they either match the 
defaults, or the install data.
+                </p>
+                <ul>
+                    <li>config/juddi/nodeId, default = 
uddi:juddi.apache.org:node1</li>
+                    <li>config/juddi/rootBusinessId, default = 
uddi:juddi.apache.org:businesses-asf</li>
+                </ul>
+
+                <%                    }
+                %>
             </div>
         </div>
 



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to