You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juddi.apache.org by al...@apache.org on 2014/11/27 03:23:37 UTC

[1/9] juddi git commit: JUDDI-241 save/delete Node and clerk functioning

Repository: juddi
Updated Branches:
  refs/heads/JUDDI-241 455149a9e -> 20d9dff56


http://git-wip-us.apache.org/repos/asf/juddi/blob/7aa78f62/juddi-core/src/test/java/org/apache/juddi/api/impl/API_160_ReplicationTest.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/test/java/org/apache/juddi/api/impl/API_160_ReplicationTest.java b/juddi-core/src/test/java/org/apache/juddi/api/impl/API_160_ReplicationTest.java
index 6cf0f2b..d1719c2 100644
--- a/juddi-core/src/test/java/org/apache/juddi/api/impl/API_160_ReplicationTest.java
+++ b/juddi-core/src/test/java/org/apache/juddi/api/impl/API_160_ReplicationTest.java
@@ -18,6 +18,7 @@ package org.apache.juddi.api.impl;
 import java.math.BigInteger;
 import java.rmi.RemoteException;
 import java.util.List;
+import java.util.UUID;
 import org.apache.commons.configuration.ConfigurationException;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -125,7 +126,7 @@ public class API_160_ReplicationTest {
         }
 
         /**
-         * add a clerk and node, delete the node, then try to access the clerk.
+         * add a clerk and node, delete the clerk, then check that the node is still there
          * it should have been deleted
          *
          * @throws Exception
@@ -174,7 +175,62 @@ public class API_160_ReplicationTest {
                         }
                 }
                 //TODO revise cascade deletes on nodes and clerks
-                Assert.fail("node unexpected deleted");
+                Assert.fail("node unexpectedly deleted");
+        }
+        
+        
+        /**
+         * add clerk + node, try to delete the node
+         * @throws Exception 
+         */
+         @Test
+        public void testAddClerkNodeThenDelete2() throws Exception {
+                SaveClerk sc = new SaveClerk();
+                sc.setAuthInfo(authInfoRoot);
+                Clerk c = new Clerk();
+                c.setName("clerk1" + UUID.randomUUID().toString());
+
+                c.setPassword("pass");
+                c.setPublisher("username");
+                c.setNode(new Node());
+                c.getNode().setName("test_node" + UUID.randomUUID().toString());
+                c.getNode().setClientName("test_client");
+                c.getNode().setProxyTransport(org.apache.juddi.v3.client.transport.JAXWSTransport.class.getCanonicalName());
+                c.getNode().setCustodyTransferUrl("http://localhost");
+                c.getNode().setDescription("http://localhost");
+                c.getNode().setInquiryUrl("http://localhost");
+                c.getNode().setPublishUrl("http://localhost");
+                c.getNode().setReplicationUrl("http://localhost");
+                c.getNode().setSecurityUrl("http://localhost");
+                c.getNode().setSubscriptionListenerUrl("http://localhost");
+                c.getNode().setSubscriptionUrl("http://localhost");
+
+                sc.getClerk().add(c);
+                juddi.saveClerk(sc);
+
+                juddi.deleteNode(new DeleteNode(authInfoRoot, c.getNode().getName()));
+                //this should success
+                
+                
+                //the clerk should be gone too
+                ClerkList allNodes = juddi.getAllClerks(authInfoRoot);
+                boolean found = false;
+                for (int i = 0; i < allNodes.getClerk().size(); i++) {
+                        if (allNodes.getClerk().get(i).getName().equals(c.getName())) {
+                                found = true;
+                        }
+
+                }
+                Assert.assertFalse(found);
+
+                //confirm the node is gone
+                NodeList allNodes1 = juddi.getAllNodes(authInfoRoot);
+                for (int i = 0; i < allNodes1.getNode().size(); i++) {
+                        if (allNodes1.getNode().get(i).getName().equals(c.getNode().getName())) {
+                                 Assert.fail("node is still there!");
+                        }
+                }
+                
         }
 
         @Test
@@ -183,12 +239,12 @@ public class API_160_ReplicationTest {
                 SaveClerk sc = new SaveClerk();
                 sc.setAuthInfo(authInfoRoot);
                 Clerk c = new Clerk();
-                c.setName("clerk1");
+                c.setName("clerk1" + UUID.randomUUID().toString());
 
                 c.setPassword("pass");
                 c.setPublisher("username");
                 c.setNode(new Node());
-                c.getNode().setName("test_node");
+                c.getNode().setName("test_node" + UUID.randomUUID().toString());
                 c.getNode().setClientName("test_client");
                 c.getNode().setProxyTransport(org.apache.juddi.v3.client.transport.JAXWSTransport.class.getCanonicalName());
                 c.getNode().setCustodyTransferUrl("http://localhost");
@@ -208,15 +264,20 @@ public class API_160_ReplicationTest {
                 juddi.saveNode(saveNode);
 
                 juddi.saveClerk(sc);
+                
+                //success
+                
+                
                 //delete it
-                juddi.deleteClerk(new DeleteClerk(authInfoRoot, "clerk1"));
-
-                juddi.deleteNode(new DeleteNode(authInfoRoot, "test_node"));
+                juddi.deleteClerk(new DeleteClerk(authInfoRoot,c.getName()));
+                System.out.println(c.getName()+" deleted");
+                
+                juddi.deleteNode(new DeleteNode(authInfoRoot, c.getNode().getName()));
                 //confirm it's gone
                 NodeList allNodes = juddi.getAllNodes(authInfoRoot);
                 boolean found = false;
                 for (int i = 0; i < allNodes.getNode().size(); i++) {
-                        if (allNodes.getNode().get(i).getName().equals("test_node")) {
+                        if (allNodes.getNode().get(i).getName().equals(c.getNode().getName())) {
                                 found = true;
                         }
 

http://git-wip-us.apache.org/repos/asf/juddi/blob/7aa78f62/uddi-ws/src/main/java/org/uddi/repl_v3/ReplicationConfiguration.java
----------------------------------------------------------------------
diff --git a/uddi-ws/src/main/java/org/uddi/repl_v3/ReplicationConfiguration.java b/uddi-ws/src/main/java/org/uddi/repl_v3/ReplicationConfiguration.java
index a20b39d..a96a06e 100644
--- a/uddi-ws/src/main/java/org/uddi/repl_v3/ReplicationConfiguration.java
+++ b/uddi-ws/src/main/java/org/uddi/repl_v3/ReplicationConfiguration.java
@@ -214,6 +214,9 @@ public class ReplicationConfiguration implements Serializable{
     }
 
     /**
+     * The element, maximumTimeToSyncRegistry, allows for the specification of when (in hours) a change made at any single node in the Registry is expected to be visible at all nodes within the registry.  The element, maximumTimeToGetChanges, allows for the specification of the maximum amount of time (in hours) that an individual node may wait to request changes.  Use of this element is determined by registry policy as detailed in Section 9.6.4 Replication Policies.
+
+
      * Gets the value of the maximumTimeToSyncRegistry property.
      * 
      * @return
@@ -238,6 +241,9 @@ public class ReplicationConfiguration implements Serializable{
     }
 
     /**
+     * The element, maximumTimeToGetChanges, allows for the specification of the maximum amount of time (in hours) that an individual node may wait to request changes. Nodes MUST perform a get_changeRecords replication message within the time frame defined by the value of the maximumTimeToGetChanges element defined within the Replication Configuration Structure.  Thus, change data can always be propagated throughout the UDDI registry within a finite amount of time, while at the same time changes will often propagate quickly. Use of this element is determined by registry policy as detailed in Section 9.6.4 Replication Policies. 
+
+
      * Gets the value of the maximumTimeToGetChanges property.
      * 
      * @return


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


[7/9] juddi git commit: JUDDI-241 get/set replication cfg now works for all sub elements. notify changes works, however getChangeRecords fails when called from within the tomcat container.

Posted by al...@apache.org.
http://git-wip-us.apache.org/repos/asf/juddi/blob/22a846dd/juddi-core/src/main/java/org/apache/juddi/mapping/MappingApiToModel.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/mapping/MappingApiToModel.java b/juddi-core/src/main/java/org/apache/juddi/mapping/MappingApiToModel.java
index b42cf81..83a1492 100644
--- a/juddi-core/src/main/java/org/apache/juddi/mapping/MappingApiToModel.java
+++ b/juddi-core/src/main/java/org/apache/juddi/mapping/MappingApiToModel.java
@@ -38,6 +38,7 @@ import org.apache.juddi.model.CanonicalizationMethod;
 import org.apache.juddi.model.Contact;
 import org.apache.juddi.model.ControlMessage;
 import org.apache.juddi.model.Edge;
+import org.apache.juddi.model.EdgeReceiverAlternate;
 import org.apache.juddi.model.KeyDataValue;
 import org.apache.juddi.model.KeyInfo;
 import org.apache.juddi.model.Node;
@@ -45,6 +46,7 @@ import org.apache.juddi.model.Operator;
 import org.apache.juddi.model.OperatorStatusType;
 import org.apache.juddi.model.Publisher;
 import org.apache.juddi.model.Reference;
+import org.apache.juddi.model.ReplicationConfigurationNode;
 import org.apache.juddi.model.Signature;
 import org.apache.juddi.model.SignatureMethod;
 import org.apache.juddi.model.SignatureTransform;
@@ -102,8 +104,8 @@ public class MappingApiToModel {
          * @throws DispositionReportFaultMessage
          */
         public static void mapPublisher(org.apache.juddi.api_v3.Publisher apiPublisher,
-             org.apache.juddi.model.Publisher modelPublisher)
-             throws DispositionReportFaultMessage {
+                org.apache.juddi.model.Publisher modelPublisher)
+                throws DispositionReportFaultMessage {
                 modelPublisher.setAuthorizedName(apiPublisher.getAuthorizedName());
                 modelPublisher.setPublisherName(apiPublisher.getPublisherName());
                 modelPublisher.setEmailAddress(apiPublisher.getEmailAddress());
@@ -123,8 +125,8 @@ public class MappingApiToModel {
          * @throws DispositionReportFaultMessage
          */
         public static void mapBusinessEntity(org.uddi.api_v3.BusinessEntity apiBusinessEntity,
-             org.apache.juddi.model.BusinessEntity modelBusinessEntity)
-             throws DispositionReportFaultMessage {
+                org.apache.juddi.model.BusinessEntity modelBusinessEntity)
+                throws DispositionReportFaultMessage {
 
                 modelBusinessEntity.setEntityKey(apiBusinessEntity.getBusinessKey());
 
@@ -139,15 +141,15 @@ public class MappingApiToModel {
                 }
 
                 mapBusinessServices(apiBusinessEntity.getBusinessServices(),
-                     modelBusinessEntity.getBusinessServices(),
-                     modelBusinessEntity.getServiceProjections(),
-                     modelBusinessEntity);
+                        modelBusinessEntity.getBusinessServices(),
+                        modelBusinessEntity.getServiceProjections(),
+                        modelBusinessEntity);
 
                 mapBusinessSignature(apiBusinessEntity.getSignature(), modelBusinessEntity);
         }
 
         private static List<Signature> mapApiSignaturesToModelSignatures(List<org.w3._2000._09.xmldsig_.SignatureType> apiSignatures)
-             throws DispositionReportFaultMessage {
+                throws DispositionReportFaultMessage {
                 List<Signature> modelSignatures = new ArrayList<Signature>();
                 modelSignatures.clear();
                 for (org.w3._2000._09.xmldsig_.SignatureType signatureType : apiSignatures) {
@@ -243,7 +245,7 @@ public class MappingApiToModel {
          * @throws DispositionReportFaultMessage
          */
         public static void mapBusinessServiceSignature(List<org.w3._2000._09.xmldsig_.SignatureType> apiSignatures, BusinessService modelBusinessService)
-             throws DispositionReportFaultMessage {
+                throws DispositionReportFaultMessage {
                 List<Signature> modelSignatures = mapApiSignaturesToModelSignatures(apiSignatures);
                 for (Signature modelSignature : modelSignatures) {
                         modelSignature.setBusinessService(modelBusinessService);
@@ -258,7 +260,7 @@ public class MappingApiToModel {
          * @throws DispositionReportFaultMessage
          */
         public static void mapTmodelSignatures(List<org.w3._2000._09.xmldsig_.SignatureType> apiSignatures, Tmodel modelTmodel)
-             throws DispositionReportFaultMessage {
+                throws DispositionReportFaultMessage {
                 List<Signature> modelSignatures = mapApiSignaturesToModelSignatures(apiSignatures);
                 for (Signature modelSignature : modelSignatures) {
                         modelSignature.setTmodel(modelTmodel);
@@ -273,7 +275,7 @@ public class MappingApiToModel {
          * @throws DispositionReportFaultMessage
          */
         public static void mapBindingTemplateSignatures(List<org.w3._2000._09.xmldsig_.SignatureType> apiSignatures, BindingTemplate modelBindingTemplate)
-             throws DispositionReportFaultMessage {
+                throws DispositionReportFaultMessage {
                 List<Signature> modelSignatures = mapApiSignaturesToModelSignatures(apiSignatures);
                 for (Signature modelSignature : modelSignatures) {
                         modelSignature.setBindingTemplate(modelBindingTemplate);
@@ -288,7 +290,7 @@ public class MappingApiToModel {
          * @throws DispositionReportFaultMessage
          */
         public static void mapPublisherSignatures(List<org.w3._2000._09.xmldsig_.SignatureType> apiSignatures, Publisher modelPublisher)
-             throws DispositionReportFaultMessage {
+                throws DispositionReportFaultMessage {
                 List<Signature> modelSignatures = mapApiSignaturesToModelSignatures(apiSignatures);
                 for (Signature modelSignature : modelSignatures) {
                         modelSignature.setPublisher(modelPublisher);
@@ -303,8 +305,8 @@ public class MappingApiToModel {
          * @throws DispositionReportFaultMessage
          */
         public static void mapBusinessSignature(List<org.w3._2000._09.xmldsig_.SignatureType> apiSignatures,
-             org.apache.juddi.model.BusinessEntity modelBusinessEntity)
-             throws DispositionReportFaultMessage {
+                org.apache.juddi.model.BusinessEntity modelBusinessEntity)
+                throws DispositionReportFaultMessage {
                 List<Signature> modelSignatures = mapApiSignaturesToModelSignatures(apiSignatures);
                 for (Signature modelSignature : modelSignatures) {
                         modelSignature.setBusinessEntity(modelBusinessEntity);
@@ -320,9 +322,9 @@ public class MappingApiToModel {
          * @throws DispositionReportFaultMessage
          */
         public static void mapBusinessNames(List<org.uddi.api_v3.Name> apiNameList,
-             List<org.apache.juddi.model.BusinessName> modelNameList,
-             org.apache.juddi.model.BusinessEntity modelBusinessEntity)
-             throws DispositionReportFaultMessage {
+                List<org.apache.juddi.model.BusinessName> modelNameList,
+                org.apache.juddi.model.BusinessEntity modelBusinessEntity)
+                throws DispositionReportFaultMessage {
                 modelNameList.clear();
 
                 for (org.uddi.api_v3.Name apiName : apiNameList) {
@@ -338,9 +340,9 @@ public class MappingApiToModel {
          * @throws DispositionReportFaultMessage
          */
         public static void mapBusinessDescriptions(List<org.uddi.api_v3.Description> apiDescList,
-             List<org.apache.juddi.model.BusinessDescr> modelDescList,
-             org.apache.juddi.model.BusinessEntity modelBusinessEntity)
-             throws DispositionReportFaultMessage {
+                List<org.apache.juddi.model.BusinessDescr> modelDescList,
+                org.apache.juddi.model.BusinessEntity modelBusinessEntity)
+                throws DispositionReportFaultMessage {
                 modelDescList.clear();
 
                 for (org.uddi.api_v3.Description apiDesc : apiDescList) {
@@ -356,9 +358,9 @@ public class MappingApiToModel {
          * @throws DispositionReportFaultMessage
          */
         public static void mapDiscoveryUrls(org.uddi.api_v3.DiscoveryURLs apiDiscUrls,
-             List<org.apache.juddi.model.DiscoveryUrl> modelDiscUrlList,
-             org.apache.juddi.model.BusinessEntity modelBusinessEntity)
-             throws DispositionReportFaultMessage {
+                List<org.apache.juddi.model.DiscoveryUrl> modelDiscUrlList,
+                org.apache.juddi.model.BusinessEntity modelBusinessEntity)
+                throws DispositionReportFaultMessage {
                 modelDiscUrlList.clear();
 
                 if (apiDiscUrls != null) {
@@ -377,9 +379,9 @@ public class MappingApiToModel {
          * @throws DispositionReportFaultMessage
          */
         public static void mapContacts(org.uddi.api_v3.Contacts apiContacts,
-             List<org.apache.juddi.model.Contact> modelContactList,
-             org.apache.juddi.model.BusinessEntity modelBusinessEntity)
-             throws DispositionReportFaultMessage {
+                List<org.apache.juddi.model.Contact> modelContactList,
+                org.apache.juddi.model.BusinessEntity modelBusinessEntity)
+                throws DispositionReportFaultMessage {
                 modelContactList.clear();
 
                 if (apiContacts != null) {
@@ -408,10 +410,10 @@ public class MappingApiToModel {
          * @throws DispositionReportFaultMessage
          */
         public static void mapContactDescriptions(List<org.uddi.api_v3.Description> apiDescList,
-             List<org.apache.juddi.model.ContactDescr> modelDescList,
-             org.apache.juddi.model.Contact modelContact,
-             String businessKey)
-             throws DispositionReportFaultMessage {
+                List<org.apache.juddi.model.ContactDescr> modelDescList,
+                org.apache.juddi.model.Contact modelContact,
+                String businessKey)
+                throws DispositionReportFaultMessage {
                 modelDescList.clear();
 
                 for (org.uddi.api_v3.Description apiDesc : apiDescList) {
@@ -428,10 +430,10 @@ public class MappingApiToModel {
          * @throws DispositionReportFaultMessage
          */
         public static void mapPersonNames(List<org.uddi.api_v3.PersonName> apiPersonNameList,
-             List<org.apache.juddi.model.PersonName> modelPersonNameList,
-             org.apache.juddi.model.Contact modelContact,
-             String businessKey)
-             throws DispositionReportFaultMessage {
+                List<org.apache.juddi.model.PersonName> modelPersonNameList,
+                org.apache.juddi.model.Contact modelContact,
+                String businessKey)
+                throws DispositionReportFaultMessage {
                 modelPersonNameList.clear();
 
                 for (org.uddi.api_v3.PersonName apiPersonName : apiPersonNameList) {
@@ -448,10 +450,10 @@ public class MappingApiToModel {
          * @throws DispositionReportFaultMessage
          */
         public static void mapContactEmails(List<org.uddi.api_v3.Email> apiEmailList,
-             List<org.apache.juddi.model.Email> modelEmailList,
-             org.apache.juddi.model.Contact modelContact,
-             String businessKey)
-             throws DispositionReportFaultMessage {
+                List<org.apache.juddi.model.Email> modelEmailList,
+                org.apache.juddi.model.Contact modelContact,
+                String businessKey)
+                throws DispositionReportFaultMessage {
                 modelEmailList.clear();
 
                 for (org.uddi.api_v3.Email apiEmail : apiEmailList) {
@@ -468,10 +470,10 @@ public class MappingApiToModel {
          * @throws DispositionReportFaultMessage
          */
         public static void mapContactPhones(List<org.uddi.api_v3.Phone> apiPhoneList,
-             List<org.apache.juddi.model.Phone> modelPhoneList,
-             org.apache.juddi.model.Contact modelContact,
-             String businessKey)
-             throws DispositionReportFaultMessage {
+                List<org.apache.juddi.model.Phone> modelPhoneList,
+                org.apache.juddi.model.Contact modelContact,
+                String businessKey)
+                throws DispositionReportFaultMessage {
                 modelPhoneList.clear();
 
                 for (org.uddi.api_v3.Phone apiPhone : apiPhoneList) {
@@ -488,10 +490,10 @@ public class MappingApiToModel {
          * @throws DispositionReportFaultMessage
          */
         public static void mapContactAddresses(List<org.uddi.api_v3.Address> apiAddressList,
-             List<org.apache.juddi.model.Address> modelAddressList,
-             org.apache.juddi.model.Contact modelContact
+                List<org.apache.juddi.model.Address> modelAddressList,
+                org.apache.juddi.model.Contact modelContact
         )
-             throws DispositionReportFaultMessage {
+                throws DispositionReportFaultMessage {
                 modelAddressList.clear();
 
                 for (org.uddi.api_v3.Address apiAddress : apiAddressList) {
@@ -516,10 +518,10 @@ public class MappingApiToModel {
          * @throws DispositionReportFaultMessage
          */
         public static void mapAddressLines(List<org.uddi.api_v3.AddressLine> apiAddressLineList,
-             List<org.apache.juddi.model.AddressLine> modelAddressLineList,
-             org.apache.juddi.model.Address modelAddress,
-             Long contactId)
-             throws DispositionReportFaultMessage {
+                List<org.apache.juddi.model.AddressLine> modelAddressLineList,
+                org.apache.juddi.model.Address modelAddress,
+                Long contactId)
+                throws DispositionReportFaultMessage {
                 modelAddressLineList.clear();
 
                 for (org.uddi.api_v3.AddressLine apiAddressLine : apiAddressLineList) {
@@ -535,9 +537,9 @@ public class MappingApiToModel {
          * @throws DispositionReportFaultMessage
          */
         public static void mapBusinessIdentifiers(org.uddi.api_v3.IdentifierBag apiIdentifierBag,
-             List<org.apache.juddi.model.BusinessIdentifier> modelIdentifierList,
-             org.apache.juddi.model.BusinessEntity modelBusinessEntity)
-             throws DispositionReportFaultMessage {
+                List<org.apache.juddi.model.BusinessIdentifier> modelIdentifierList,
+                org.apache.juddi.model.BusinessEntity modelBusinessEntity)
+                throws DispositionReportFaultMessage {
                 modelIdentifierList.clear();
 
                 if (apiIdentifierBag != null) {
@@ -557,10 +559,10 @@ public class MappingApiToModel {
          * @throws DispositionReportFaultMessage
          */
         public static void mapBusinessServices(org.uddi.api_v3.BusinessServices apiBusinessServices,
-             List<org.apache.juddi.model.BusinessService> modelBusinessServiceList,
-             List<org.apache.juddi.model.ServiceProjection> modelServiceProjectionList,
-             org.apache.juddi.model.BusinessEntity modelBusinessEntity)
-             throws DispositionReportFaultMessage {
+                List<org.apache.juddi.model.BusinessService> modelBusinessServiceList,
+                List<org.apache.juddi.model.ServiceProjection> modelServiceProjectionList,
+                org.apache.juddi.model.BusinessEntity modelBusinessEntity)
+                throws DispositionReportFaultMessage {
                 modelBusinessServiceList.clear();
                 if (apiBusinessServices != null) {
                         List<org.uddi.api_v3.BusinessService> apiBusinessServiceList = apiBusinessServices.getBusinessService();
@@ -569,7 +571,7 @@ public class MappingApiToModel {
 
                                 // If the parent businessEntity key and the service businessEntity key (if provided) do not match, it's a projection.
                                 if (apiBusinessService.getBusinessKey() != null && apiBusinessService.getBusinessKey().length() > 0
-                                     && !modelBusinessEntity.getEntityKey().equalsIgnoreCase(apiBusinessService.getBusinessKey())) {
+                                        && !modelBusinessEntity.getEntityKey().equalsIgnoreCase(apiBusinessService.getBusinessKey())) {
 
                                         modelBusinessService.setEntityKey(apiBusinessService.getServiceKey());
                                         org.apache.juddi.model.ServiceProjection modelServiceProjection = new org.apache.juddi.model.ServiceProjection(modelBusinessEntity, modelBusinessService);
@@ -591,9 +593,9 @@ public class MappingApiToModel {
          * @throws DispositionReportFaultMessage
          */
         public static void mapBusinessService(org.uddi.api_v3.BusinessService apiBusinessService,
-             org.apache.juddi.model.BusinessService modelBusinessService,
-             org.apache.juddi.model.BusinessEntity modelBusinessEntity)
-             throws DispositionReportFaultMessage {
+                org.apache.juddi.model.BusinessService modelBusinessService,
+                org.apache.juddi.model.BusinessEntity modelBusinessEntity)
+                throws DispositionReportFaultMessage {
 
                 modelBusinessService.setBusinessEntity(modelBusinessEntity);
                 modelBusinessService.setEntityKey(apiBusinessService.getServiceKey());
@@ -617,9 +619,9 @@ public class MappingApiToModel {
          * @throws DispositionReportFaultMessage
          */
         public static void mapServiceNames(List<org.uddi.api_v3.Name> apiNameList,
-             List<org.apache.juddi.model.ServiceName> modelNameList,
-             org.apache.juddi.model.BusinessService modelBusinessService)
-             throws DispositionReportFaultMessage {
+                List<org.apache.juddi.model.ServiceName> modelNameList,
+                org.apache.juddi.model.BusinessService modelBusinessService)
+                throws DispositionReportFaultMessage {
                 modelNameList.clear();
 
                 for (org.uddi.api_v3.Name apiName : apiNameList) {
@@ -635,9 +637,9 @@ public class MappingApiToModel {
          * @throws DispositionReportFaultMessage
          */
         public static void mapServiceDescriptions(List<org.uddi.api_v3.Description> apiDescList,
-             List<org.apache.juddi.model.ServiceDescr> modelDescList,
-             org.apache.juddi.model.BusinessService modelBusinessService)
-             throws DispositionReportFaultMessage {
+                List<org.apache.juddi.model.ServiceDescr> modelDescList,
+                org.apache.juddi.model.BusinessService modelBusinessService)
+                throws DispositionReportFaultMessage {
                 modelDescList.clear();
 
                 for (org.uddi.api_v3.Description apiDesc : apiDescList) {
@@ -653,9 +655,9 @@ public class MappingApiToModel {
          * @throws DispositionReportFaultMessage
          */
         public static void mapBindingTemplates(org.uddi.api_v3.BindingTemplates apiBindingTemplates,
-             List<org.apache.juddi.model.BindingTemplate> modelBindingTemplateList,
-             org.apache.juddi.model.BusinessService modelBusinessService)
-             throws DispositionReportFaultMessage {
+                List<org.apache.juddi.model.BindingTemplate> modelBindingTemplateList,
+                org.apache.juddi.model.BusinessService modelBusinessService)
+                throws DispositionReportFaultMessage {
                 modelBindingTemplateList.clear();
 
                 if (apiBindingTemplates != null) {
@@ -678,9 +680,9 @@ public class MappingApiToModel {
          * @throws DispositionReportFaultMessage
          */
         public static void mapBindingTemplate(org.uddi.api_v3.BindingTemplate apiBindingTemplate,
-             org.apache.juddi.model.BindingTemplate modelBindingTemplate,
-             org.apache.juddi.model.BusinessService modelBusinessService)
-             throws DispositionReportFaultMessage {
+                org.apache.juddi.model.BindingTemplate modelBindingTemplate,
+                org.apache.juddi.model.BusinessService modelBusinessService)
+                throws DispositionReportFaultMessage {
 
                 modelBindingTemplate.setBusinessService(modelBusinessService);
                 modelBindingTemplate.setEntityKey(apiBindingTemplate.getBindingKey());
@@ -709,9 +711,9 @@ public class MappingApiToModel {
          * @throws DispositionReportFaultMessage
          */
         public static void mapBindingDescriptions(List<org.uddi.api_v3.Description> apiDescList,
-             List<org.apache.juddi.model.BindingDescr> modelDescList,
-             org.apache.juddi.model.BindingTemplate modelBindingTemplate)
-             throws DispositionReportFaultMessage {
+                List<org.apache.juddi.model.BindingDescr> modelDescList,
+                org.apache.juddi.model.BindingTemplate modelBindingTemplate)
+                throws DispositionReportFaultMessage {
                 modelDescList.clear();
                 for (org.uddi.api_v3.Description apiDesc : apiDescList) {
                         modelDescList.add(new org.apache.juddi.model.BindingDescr(modelBindingTemplate, apiDesc.getLang(), apiDesc.getValue()));
@@ -725,8 +727,8 @@ public class MappingApiToModel {
          * @throws DispositionReportFaultMessage
          */
         public static void mapCategoryBag(org.uddi.api_v3.CategoryBag apiCategoryBag,
-             org.apache.juddi.model.CategoryBag modelCategoryBag)
-             throws DispositionReportFaultMessage {
+                org.apache.juddi.model.CategoryBag modelCategoryBag)
+                throws DispositionReportFaultMessage {
 
                 if (apiCategoryBag != null) {
                         List<org.uddi.api_v3.KeyedReference> krList = apiCategoryBag.getKeyedReference();
@@ -736,7 +738,7 @@ public class MappingApiToModel {
                                         //modelKeyedReferences.clear();
                                         org.uddi.api_v3.KeyedReference apiKeyedReference = (org.uddi.api_v3.KeyedReference) elem;
                                         modelKeyedReferences.add(new org.apache.juddi.model.KeyedReference(modelCategoryBag,
-                                             apiKeyedReference.getTModelKey(), apiKeyedReference.getKeyName(), apiKeyedReference.getKeyValue()));
+                                                apiKeyedReference.getTModelKey(), apiKeyedReference.getKeyName(), apiKeyedReference.getKeyValue()));
                                 }
                         }
                         List<org.uddi.api_v3.KeyedReferenceGroup> krgList = apiCategoryBag.getKeyedReferenceGroup();
@@ -764,9 +766,9 @@ public class MappingApiToModel {
          * @throws DispositionReportFaultMessage
          */
         public static void mapKeyedReferenceGroup(org.uddi.api_v3.KeyedReferenceGroup apiKeyedReferenceGroup,
-             org.apache.juddi.model.KeyedReferenceGroup modelKeyedReferenceGroup,
-             org.apache.juddi.model.CategoryBag modelCategoryBag)
-             throws DispositionReportFaultMessage {
+                org.apache.juddi.model.KeyedReferenceGroup modelKeyedReferenceGroup,
+                org.apache.juddi.model.CategoryBag modelCategoryBag)
+                throws DispositionReportFaultMessage {
                 if (apiKeyedReferenceGroup != null) {
                         modelKeyedReferenceGroup.setCategoryBag(modelCategoryBag);
                         modelKeyedReferenceGroup.setTmodelKey(apiKeyedReferenceGroup.getTModelKey());
@@ -775,7 +777,7 @@ public class MappingApiToModel {
                                 List<org.apache.juddi.model.KeyedReference> modelKeyedReferences = modelKeyedReferenceGroup.getKeyedReferences();
                                 for (org.uddi.api_v3.KeyedReference apiKeyedReference : apiKeyedReferenceGroup.getKeyedReference()) {
                                         modelKeyedReferences.add(new org.apache.juddi.model.KeyedReference(modelKeyedReferenceGroup,
-                                             apiKeyedReference.getTModelKey(), apiKeyedReference.getKeyName(), apiKeyedReference.getKeyValue()));
+                                                apiKeyedReference.getTModelKey(), apiKeyedReference.getKeyName(), apiKeyedReference.getKeyValue()));
                                 }
                         }
 
@@ -791,9 +793,9 @@ public class MappingApiToModel {
          * @throws DispositionReportFaultMessage
          */
         public static void mapTModelInstanceDetails(org.uddi.api_v3.TModelInstanceDetails apiTModelInstDetails,
-             List<org.apache.juddi.model.TmodelInstanceInfo> modelTModelInstInfoList,
-             org.apache.juddi.model.BindingTemplate modelBindingTemplate)
-             throws DispositionReportFaultMessage {
+                List<org.apache.juddi.model.TmodelInstanceInfo> modelTModelInstInfoList,
+                org.apache.juddi.model.BindingTemplate modelBindingTemplate)
+                throws DispositionReportFaultMessage {
                 modelTModelInstInfoList.clear();
 
                 if (apiTModelInstDetails != null) {
@@ -817,9 +819,9 @@ public class MappingApiToModel {
          * @throws DispositionReportFaultMessage
          */
         public static void mapTModelInstanceInfoDescriptions(List<org.uddi.api_v3.Description> apiDescList,
-             List<org.apache.juddi.model.TmodelInstanceInfoDescr> modelDescList,
-             org.apache.juddi.model.TmodelInstanceInfo modelTModelInstInfo)
-             throws DispositionReportFaultMessage {
+                List<org.apache.juddi.model.TmodelInstanceInfoDescr> modelDescList,
+                org.apache.juddi.model.TmodelInstanceInfo modelTModelInstInfo)
+                throws DispositionReportFaultMessage {
                 modelDescList.clear();
 
                 for (org.uddi.api_v3.Description apiDesc : apiDescList) {
@@ -834,8 +836,8 @@ public class MappingApiToModel {
          * @throws DispositionReportFaultMessage
          */
         public static void mapInstanceDetails(org.uddi.api_v3.InstanceDetails apiInstanceDetails,
-             org.apache.juddi.model.TmodelInstanceInfo modelTmodelInstInfo)
-             throws DispositionReportFaultMessage {
+                org.apache.juddi.model.TmodelInstanceInfo modelTmodelInstInfo)
+                throws DispositionReportFaultMessage {
                 modelTmodelInstInfo.getInstanceDetailsDescrs().clear();
 
                 if (apiInstanceDetails != null) {
@@ -843,8 +845,8 @@ public class MappingApiToModel {
                         List<org.uddi.api_v3.OverviewDoc> overviewdocs = apiInstanceDetails.getOverviewDoc();
                         for (org.uddi.api_v3.Description apiDesc : descriptions) {
                                 org.apache.juddi.model.InstanceDetailsDescr modelInstanceDetailsDescr
-                                     = new org.apache.juddi.model.InstanceDetailsDescr(
-                                          modelTmodelInstInfo, apiDesc.getLang(), apiDesc.getValue());
+                                        = new org.apache.juddi.model.InstanceDetailsDescr(
+                                                modelTmodelInstInfo, apiDesc.getLang(), apiDesc.getValue());
                                 modelTmodelInstInfo.getInstanceDetailsDescrs().add(modelInstanceDetailsDescr);
                         }
                         for (org.uddi.api_v3.OverviewDoc apiOverviewDoc : overviewdocs) {
@@ -863,8 +865,8 @@ public class MappingApiToModel {
          * @throws DispositionReportFaultMessage
          */
         public static void mapOverviewDoc(org.uddi.api_v3.OverviewDoc apiOverviewDoc,
-             org.apache.juddi.model.OverviewDoc modelOverviewDoc)
-             throws DispositionReportFaultMessage {
+                org.apache.juddi.model.OverviewDoc modelOverviewDoc)
+                throws DispositionReportFaultMessage {
                 if (apiOverviewDoc != null) {
 
                         List<Description> descContent = apiOverviewDoc.getDescription();
@@ -872,7 +874,7 @@ public class MappingApiToModel {
                                 org.uddi.api_v3.Description description = (org.uddi.api_v3.Description) elem;
                                 if (description != null) {
                                         org.apache.juddi.model.OverviewDocDescr modelOverviewDocDescr = new org.apache.juddi.model.OverviewDocDescr(
-                                             modelOverviewDoc, description.getLang(), description.getValue());
+                                                modelOverviewDoc, description.getLang(), description.getValue());
                                         modelOverviewDoc.getOverviewDocDescrs().add(modelOverviewDocDescr);
                                 }
                         }
@@ -894,8 +896,8 @@ public class MappingApiToModel {
          * @throws DispositionReportFaultMessage
          */
         public static void mapTModel(org.uddi.api_v3.TModel apiTModel,
-             org.apache.juddi.model.Tmodel modelTModel)
-             throws DispositionReportFaultMessage {
+                org.apache.juddi.model.Tmodel modelTModel)
+                throws DispositionReportFaultMessage {
 
                 modelTModel.setEntityKey(apiTModel.getTModelKey());
                 modelTModel.setName(apiTModel.getName().getValue());
@@ -920,9 +922,9 @@ public class MappingApiToModel {
          * @throws DispositionReportFaultMessage
          */
         public static void mapTModelDescriptions(List<org.uddi.api_v3.Description> apiDescList,
-             List<org.apache.juddi.model.TmodelDescr> modelDescList,
-             org.apache.juddi.model.Tmodel modelTModel)
-             throws DispositionReportFaultMessage {
+                List<org.apache.juddi.model.TmodelDescr> modelDescList,
+                org.apache.juddi.model.Tmodel modelTModel)
+                throws DispositionReportFaultMessage {
                 modelDescList.clear();
 
                 for (org.uddi.api_v3.Description apiDesc : apiDescList) {
@@ -938,9 +940,9 @@ public class MappingApiToModel {
          * @throws DispositionReportFaultMessage
          */
         public static void mapTModelIdentifiers(org.uddi.api_v3.IdentifierBag apiIdentifierBag,
-             List<org.apache.juddi.model.TmodelIdentifier> modelIdentifierList,
-             org.apache.juddi.model.Tmodel modelTModel)
-             throws DispositionReportFaultMessage {
+                List<org.apache.juddi.model.TmodelIdentifier> modelIdentifierList,
+                org.apache.juddi.model.Tmodel modelTModel)
+                throws DispositionReportFaultMessage {
                 modelIdentifierList.clear();
 
                 if (apiIdentifierBag != null) {
@@ -959,9 +961,9 @@ public class MappingApiToModel {
          * @throws DispositionReportFaultMessage
          */
         public static void mapTModelOverviewDocs(List<org.uddi.api_v3.OverviewDoc> apiOverviewDocList,
-             List<org.apache.juddi.model.OverviewDoc> modelOverviewDocList,
-             org.apache.juddi.model.Tmodel modelTmodel)
-             throws DispositionReportFaultMessage {
+                List<org.apache.juddi.model.OverviewDoc> modelOverviewDocList,
+                org.apache.juddi.model.Tmodel modelTmodel)
+                throws DispositionReportFaultMessage {
                 modelOverviewDocList.clear();
 
                 for (org.uddi.api_v3.OverviewDoc apiOverviewDoc : apiOverviewDocList) {
@@ -978,8 +980,8 @@ public class MappingApiToModel {
          * @throws DispositionReportFaultMessage
          */
         public static void mapPublisherAssertion(org.uddi.api_v3.PublisherAssertion apiPubAssertion,
-             org.apache.juddi.model.PublisherAssertion modelPubAssertion)
-             throws DispositionReportFaultMessage {
+                org.apache.juddi.model.PublisherAssertion modelPubAssertion)
+                throws DispositionReportFaultMessage {
 
                 modelPubAssertion.setId(new org.apache.juddi.model.PublisherAssertionId(apiPubAssertion.getFromKey(), apiPubAssertion.getToKey()));
 
@@ -1006,8 +1008,8 @@ public class MappingApiToModel {
          * @throws DispositionReportFaultMessage
          */
         public static void mapSubscription(org.uddi.sub_v3.Subscription apiSubscription,
-             org.apache.juddi.model.Subscription modelSubscription)
-             throws DispositionReportFaultMessage {
+                org.apache.juddi.model.Subscription modelSubscription)
+                throws DispositionReportFaultMessage {
 
                 modelSubscription.setSubscriptionKey(apiSubscription.getSubscriptionKey());
                 modelSubscription.setBindingKey(apiSubscription.getBindingKey());
@@ -1039,8 +1041,8 @@ public class MappingApiToModel {
          * @throws DispositionReportFaultMessage
          */
         public static void mapClientSubscriptionInfo(org.apache.juddi.api_v3.ClientSubscriptionInfo apiClientSubscriptionInfo,
-             org.apache.juddi.model.ClientSubscriptionInfo modelClientSubscriptionInfo)
-             throws DispositionReportFaultMessage {
+                org.apache.juddi.model.ClientSubscriptionInfo modelClientSubscriptionInfo)
+                throws DispositionReportFaultMessage {
 
                 modelClientSubscriptionInfo.setLastNotified(new Date());
                 modelClientSubscriptionInfo.setSubscriptionKey(apiClientSubscriptionInfo.getSubscriptionKey());
@@ -1416,48 +1418,52 @@ public class MappingApiToModel {
                 }
                 model.setMaximumTimeToGetChanges(replicationConfiguration.getMaximumTimeToGetChanges());
                 model.setMaximumTimeToSyncRegistry(replicationConfiguration.getMaximumTimeToSyncRegistry());
+                //this is set by the service when saving
                 model.setSerialNumber(null);
-
+               
                 //the spec doesn't specify what the format should be, however there was an example
                 //2002 03 04 1859Z
                 SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddkkmmZ");
                 model.setTimeOfConfigurationUpdate(sdf.format(new Date()));
                 if (replicationConfiguration.getRegistryContact() != null) {
-                        model.setContact(mapContact(replicationConfiguration.getRegistryContact().getContact()));
+                        model.setContact(mapContact(replicationConfiguration.getRegistryContact().getContact(), model));
                 }
-                mapCommunicationGraph(model,replicationConfiguration.getCommunicationGraph(), em);
-                model.setOperator(mapOperators(replicationConfiguration.getOperator()));
+                mapCommunicationGraph(model, replicationConfiguration.getCommunicationGraph(), em);
+                model.setOperator(mapOperators(replicationConfiguration,model));
                 if (replicationConfiguration.getSignature() != null) {
                         model.setSignatures(mapApiSignaturesToModelSignatures(replicationConfiguration.getSignature()));
                 }
 
         }
 
-        private static Contact mapContact(org.uddi.api_v3.Contact contact) throws DispositionReportFaultMessage {
-                Contact model = new Contact();
-                model.setAddresses(new ArrayList<Address>());
-                mapContactAddresses(contact.getAddress(), model.getAddresses(), model);
-                if (model.getAddresses().isEmpty()) {
-                        model.setAddresses(null);
+        private static Contact mapContact(org.uddi.api_v3.Contact contact, org.apache.juddi.model.ReplicationConfiguration model) throws DispositionReportFaultMessage {
+                Contact cmodel = new Contact();
+                cmodel.setReplicationConfigId(model);
+                cmodel.setAddresses(new ArrayList<Address>());
+                mapContactAddresses(contact.getAddress(), cmodel.getAddresses(), cmodel);
+                if (cmodel.getAddresses().isEmpty()) {
+                        cmodel.setAddresses(null);
                 }
-                return model;
+                return cmodel;
         }
 
-       
-
-        private static List<Operator> mapOperators(List<org.uddi.repl_v3.Operator> api) throws DispositionReportFaultMessage {
+        private static List<Operator> mapOperators(ReplicationConfiguration cfg, org.apache.juddi.model.ReplicationConfiguration modelparent) throws DispositionReportFaultMessage {
+                if (cfg==null) return null;
+                List<org.uddi.repl_v3.Operator> api = cfg.getOperator();
                 if (api == null) {
                         return null;
                 }
                 List<Operator> model = new ArrayList<Operator>();
                 for (int i = 0; i < api.size(); i++) {
                         Operator op = new Operator();
+                        op.setParent(modelparent);
+                       
                         op.setSoapReplicationURL(api.get(i).getSoapReplicationURL());
 
                         if (!api.get(i).getContact().isEmpty()) {
                                 op.setContact(new ArrayList<Contact>());
                                 for (int k = 0; k < api.get(i).getContact().size(); k++) {
-                                        op.getContact().add(mapContact(api.get(i).getContact().get(k)));
+                                        op.getContact().add(mapContact(api.get(i).getContact().get(k), null));
                                 }
                         }
                         op.setOperatorNodeID(api.get(i).getOperatorNodeID());
@@ -1496,12 +1502,13 @@ public class MappingApiToModel {
                 return null;
         }
 
-    private static void mapCommunicationGraph(org.apache.juddi.model.ReplicationConfiguration model, CommunicationGraph communicationGraph, EntityManager em) throws ValueNotAllowedException {
-        
-    if (model == null) {
+        private static void mapCommunicationGraph(org.apache.juddi.model.ReplicationConfiguration model, CommunicationGraph communicationGraph, EntityManager em) throws ValueNotAllowedException {
+
+                if (model == null) {
                         return;
                 }
-           
+                
+
                 /**
                  * Following the listing of nodes is the controlledMessage
                  * element that lists the set of messages over which this
@@ -1515,39 +1522,30 @@ public class MappingApiToModel {
                  */
                 if (communicationGraph.getControlledMessage() != null) {
                         model.setControlMessage(new ArrayList<ControlMessage>());
+
                         for (int k = 0; k < communicationGraph.getControlledMessage().size(); k++) {
-                                model.getControlMessage().add(new ControlMessage(communicationGraph.getControlledMessage().get(k)));
+                                ControlMessage BC = new ControlMessage(communicationGraph.getControlledMessage().get(k));
+                                BC.setReplicationConfiguration(model);
+                                
+                                model.getControlMessage().add(BC);
                         }
                 }
-                model.setNode(new ArrayList<Node>());
+                
                 for (int i = 0; i < communicationGraph.getNode().size(); i++) {
-                        Node find = em.find(org.apache.juddi.model.Node.class, communicationGraph.getNode().get(i));
-                        if (find == null) {
-                                throw new ValueNotAllowedException(new ErrorMessage("errors.replication.configNodeNotFound", communicationGraph.getNode().get(i)));
-                        }
-                        model.getNode().add(find);
+                        ReplicationConfigurationNode replicationConfigurationNode = new ReplicationConfigurationNode();
+
+                        replicationConfigurationNode.setNodeName(communicationGraph.getNode().get(i));
+                        replicationConfigurationNode.setParent(model);
+                        model.getNode().add(replicationConfigurationNode);
                 }
                 if (communicationGraph.getEdge() != null && !communicationGraph.getEdge().isEmpty()) {
                         List<Edge> ret = new ArrayList<Edge>();
                         for (int i = 0; i < communicationGraph.getEdge().size(); i++) {
                                 Edge e = new Edge();
+                                e.setReplicationConfiguration(model);
                                 
-                                if (communicationGraph.getEdge().get(i).getMessageReceiver() == null) {
-                                        throw new ValueNotAllowedException(new ErrorMessage("errors.replication.configNodeNotFound", communicationGraph.getEdge().get(i).getMessageReceiver()));
-                                }
-                                Node find = em.find(org.apache.juddi.model.Node.class, communicationGraph.getEdge().get(i).getMessageReceiver());
-                                if (find == null) {
-                                        throw new ValueNotAllowedException(new ErrorMessage("errors.replication.configNodeNotFound", communicationGraph.getEdge().get(i).getMessageReceiver()));
-                                }
-                                e.setMessageReceiver(find);
-                                if (communicationGraph.getEdge().get(i).getMessageSender() == null) {
-                                        throw new ValueNotAllowedException(new ErrorMessage("errors.replication.configNodeNotFound", communicationGraph.getEdge().get(i).getMessageReceiver()));
-                                }
-                                find = em.find(org.apache.juddi.model.Node.class, communicationGraph.getEdge().get(i).getMessageSender());
-                                if (find == null) {
-                                        throw new ValueNotAllowedException(new ErrorMessage("errors.replication.configNodeNotFound", communicationGraph.getEdge().get(i).getMessageSender()));
-                                }
-                                e.setMessageSender(find);
+                                e.setMessageReceiver(communicationGraph.getEdge().get(i).getMessageReceiver());
+                               e.setMessageSender(communicationGraph.getEdge().get(i).getMessageSender());
 
                                 /**
                                  * The message elements contain the local name
@@ -1560,24 +1558,29 @@ public class MappingApiToModel {
                                 if (communicationGraph.getEdge().get(i).getMessage() != null) {
                                         e.setMessage(new ArrayList<ControlMessage>());
                                         for (int k = 0; k < communicationGraph.getEdge().get(i).getMessage().size(); k++) {
-                                                e.getMessages().add(new ControlMessage(communicationGraph.getEdge().get(i).getMessage().get(k)));
+                                                ControlMessage controlMessage = new ControlMessage(communicationGraph.getEdge().get(i).getMessage().get(k));
+                                                controlMessage.setReplicationConfiguration(model);
+                                                controlMessage.setParentEdge(e);
+                                                e.getMessages().add(controlMessage);
                                         }
                                 }
                                 if (communicationGraph.getEdge().get(i).getMessageReceiverAlternate() != null) {
-                                        e.setMessageReceiverAlternate(new HashSet<Node>());
-                                        for (int k = 0; k < communicationGraph.getEdge().get(i).getMessageReceiverAlternate().size(); k++) {
-                                                find = em.find(org.apache.juddi.model.Node.class, communicationGraph.getEdge().get(i).getMessageSender());
-                                                if (find == null) {
-                                                        throw new ValueNotAllowedException(new ErrorMessage("errors.replication.configNodeNotFound", communicationGraph.getEdge().get(i).getMessageSender()));
-                                                }
-                                                e.getMessageReceiverAlternate().add(find);
+                                        List<EdgeReceiverAlternate> eras = new ArrayList<EdgeReceiverAlternate>();
+                                        for (String s: communicationGraph.getEdge().get(i).getMessageReceiverAlternate() ){
+                                                EdgeReceiverAlternate x = new EdgeReceiverAlternate();
+                                                x.setParent(e);
+                                                x.setReceiverAlternate(s);
+                                                eras.add(x);
                                         }
+                                        e.setMessageReceiverAlternate(eras);
+                                      
                                 }
 
                                 ret.add(e);
                         }
                         model.setEdge(ret);
-                }}            }
-    
-
+                }
+        }
 
+        
+}

http://git-wip-us.apache.org/repos/asf/juddi/blob/22a846dd/juddi-core/src/main/java/org/apache/juddi/mapping/MappingModelToApi.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/mapping/MappingModelToApi.java b/juddi-core/src/main/java/org/apache/juddi/mapping/MappingModelToApi.java
index 50535da..481df3d 100644
--- a/juddi-core/src/main/java/org/apache/juddi/mapping/MappingModelToApi.java
+++ b/juddi-core/src/main/java/org/apache/juddi/mapping/MappingModelToApi.java
@@ -48,6 +48,7 @@ import org.apache.juddi.jaxb.JAXBMarshaller;
 import org.apache.juddi.model.CanonicalizationMethod;
 import org.apache.juddi.model.ControlMessage;
 import org.apache.juddi.model.Edge;
+import org.apache.juddi.model.EdgeReceiverAlternate;
 import org.apache.juddi.model.KeyInfo;
 import org.apache.juddi.model.OverviewDoc;
 import org.apache.juddi.model.Reference;
@@ -58,14 +59,17 @@ import org.apache.juddi.model.UddiEntity;
 import org.apache.juddi.model.KeyDataValue;
 import org.apache.juddi.model.Node;
 import org.apache.juddi.model.ReplicationConfiguration;
+import org.apache.juddi.model.ReplicationConfigurationNode;
 import org.apache.juddi.model.SignatureTransformDataValue;
 import org.apache.juddi.subscription.TypeConvertor;
 import org.apache.juddi.v3.error.ErrorMessage;
 import org.apache.juddi.v3.error.FatalErrorException;
 import org.uddi.api_v3.BusinessEntity;
 import org.uddi.api_v3.CompletionStatus;
+import org.uddi.api_v3.Contact;
 import org.uddi.api_v3.Contacts;
 import org.uddi.api_v3.OperationalInfo;
+import org.uddi.api_v3.PersonName;
 import org.uddi.repl_v3.ChangeRecord;
 import org.uddi.repl_v3.ChangeRecordIDType;
 import org.uddi.repl_v3.CommunicationGraph;
@@ -1203,6 +1207,7 @@ public class MappingModelToApi {
                 item.setMaximumTimeToGetChanges(find.getMaximumTimeToGetChanges());
                 item.setMaximumTimeToSyncRegistry(find.getMaximumTimeToSyncRegistry());
                 item.setSerialNumber(find.getSerialNumber());
+                
                 List<SignatureType> sigs = new ArrayList<SignatureType>();
                 mapSignature(find.getSignatures(), sigs);
                 item.getSignature().addAll(sigs);
@@ -1213,10 +1218,16 @@ public class MappingModelToApi {
                 org.uddi.api_v3.Contacts cs = new Contacts();
 
                 mapContacts(modelContactList, cs, new BusinessEntity());
+                item.setRegistryContact(new org.uddi.repl_v3.ReplicationConfiguration.RegistryContact());
                 if (!cs.getContact().isEmpty()) {
-                        item.setRegistryContact(new org.uddi.repl_v3.ReplicationConfiguration.RegistryContact());
+                        
                         item.getRegistryContact().setContact(cs.getContact().get(0));
                 }
+                else
+                {
+                        item.getRegistryContact().setContact(new Contact());
+                        item.getRegistryContact().getContact().getPersonName().add(new PersonName("unknown", null));
+                }
                 item.setTimeOfConfigurationUpdate(find.getTimeOfConfigurationUpdate());
                 CommunicationGraph xcom = new CommunicationGraph();
 
@@ -1278,16 +1289,16 @@ public class MappingModelToApi {
                         Edge modelEdge = it.next();
 
                         CommunicationGraph.Edge apiEdge = new CommunicationGraph.Edge();
-                        apiEdge.setMessageReceiver(modelEdge.getMessageReceiver().getName());
-                        apiEdge.setMessageSender(modelEdge.getMessageSender().getName());
+                        apiEdge.setMessageReceiver(modelEdge.getMessageReceiver());
+                        apiEdge.setMessageSender(modelEdge.getMessageSender());
 
                         Iterator<ControlMessage> it2 = modelEdge.getMessages().iterator();
                         while (it2.hasNext()) {
                                 apiEdge.getMessage().add(it2.next().getMessage());
                         }
-                        Iterator<Node> it3 = modelEdge.getMessageReceiverAlternate().iterator();
+                        Iterator<EdgeReceiverAlternate> it3 = modelEdge.getMessageReceiverAlternate().iterator();
                         while (it3.hasNext()) {
-                                apiEdge.getMessageReceiverAlternate().add(it3.next().getName());
+                                apiEdge.getMessageReceiverAlternate().add(it3.next().getReceiverAlternate());
                         }
 
                         api.add(apiEdge);
@@ -1302,10 +1313,10 @@ public class MappingModelToApi {
                 }
         }
 
-        private static void mapEdgeNodes(List<Node> model, List<String> api) {
-                Iterator<Node> it = model.iterator();
+        private static void mapEdgeNodes(List<ReplicationConfigurationNode> model, List<String> api) {
+                Iterator<ReplicationConfigurationNode> it = model.iterator();
                 while (it.hasNext()) {
-                        api.add(it.next().getName());
+                        api.add(it.next().getNodeName());
                 }
         }
 

http://git-wip-us.apache.org/repos/asf/juddi/blob/22a846dd/juddi-core/src/main/java/org/apache/juddi/model/Contact.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/model/Contact.java b/juddi-core/src/main/java/org/apache/juddi/model/Contact.java
index 4f8b62d..9dfc41e 100644
--- a/juddi-core/src/main/java/org/apache/juddi/model/Contact.java
+++ b/juddi-core/src/main/java/org/apache/juddi/model/Contact.java
@@ -28,6 +28,7 @@ import javax.persistence.Id;
 import javax.persistence.JoinColumn;
 import javax.persistence.ManyToOne;
 import javax.persistence.OneToMany;
+import javax.persistence.OneToOne;
 import javax.persistence.OrderBy;
 import javax.persistence.Table;
 
@@ -42,6 +43,7 @@ public class Contact implements java.io.Serializable {
 	private static final long serialVersionUID = 3350341195850056589L;
 	private Long id;
 	private BusinessEntity businessEntity;
+        private ReplicationConfiguration replicationConfigSerial;
 	private String useType;
 	private List<PersonName> personNames = new ArrayList<PersonName>(0);
 	private List<ContactDescr> contactDescrs = new ArrayList<ContactDescr>(0);
@@ -67,6 +69,15 @@ public class Contact implements java.io.Serializable {
 		this.addresses = addresses;
 	}
 
+        @OneToOne(fetch = FetchType.LAZY)
+	@JoinColumn(name = "replicationCfgId", nullable = true)
+        public ReplicationConfiguration getReplicationConfigId() {
+		return this.replicationConfigSerial;
+	}
+	public void setReplicationConfigId(ReplicationConfiguration id) {
+		this.replicationConfigSerial = id;
+	}
+        
 	@Id
 	@GeneratedValue(strategy=GenerationType.AUTO)
 	public Long getId() {

http://git-wip-us.apache.org/repos/asf/juddi/blob/22a846dd/juddi-core/src/main/java/org/apache/juddi/model/ControlMessage.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/model/ControlMessage.java b/juddi-core/src/main/java/org/apache/juddi/model/ControlMessage.java
index ce79b8f..39ab63a 100644
--- a/juddi-core/src/main/java/org/apache/juddi/model/ControlMessage.java
+++ b/juddi-core/src/main/java/org/apache/juddi/model/ControlMessage.java
@@ -19,7 +19,13 @@ package org.apache.juddi.model;
 import java.io.Serializable;
 import javax.persistence.Column;
 import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
 import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import org.uddi.repl_v3.CommunicationGraph;
 
 /**
  *
@@ -48,6 +54,7 @@ public class ControlMessage implements Serializable{
         }
 
         @Id
+        @GeneratedValue(strategy = GenerationType.AUTO)
         public Long getId() {
                 return id;
         }
@@ -55,4 +62,27 @@ public class ControlMessage implements Serializable{
         public void setId(Long id) {
                 this.id = id;
         }
+        
+       //  @JoinColumn( )
+       // @ManyToOne(targetEntity = ReplicationConfiguration.class)
+         @ManyToOne(fetch = FetchType.LAZY)
+	@JoinColumn(name = "ReplicationConfiguration", nullable = true)
+        public ReplicationConfiguration getReplicationConfiguration() {
+                return parent;
+        }
+        private ReplicationConfiguration parent;
+        public void setReplicationConfiguration(ReplicationConfiguration p){
+                parent = p;
+        }
+        
+         @ManyToOne(fetch = FetchType.LAZY)
+	@JoinColumn(name = "entity_key_ed", nullable = true)
+         public Edge getParentEdge(){
+                 return this.edge;
+         }
+         private Edge edge;
+         public void setParentEdge(Edge e){
+                 this.edge = e;
+         }
+         
 }

http://git-wip-us.apache.org/repos/asf/juddi/blob/22a846dd/juddi-core/src/main/java/org/apache/juddi/model/Edge.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/model/Edge.java b/juddi-core/src/main/java/org/apache/juddi/model/Edge.java
index bc25990..669a2a2 100644
--- a/juddi-core/src/main/java/org/apache/juddi/model/Edge.java
+++ b/juddi-core/src/main/java/org/apache/juddi/model/Edge.java
@@ -20,6 +20,7 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
 import javax.persistence.CascadeType;
+import javax.persistence.Column;
 import javax.persistence.Entity;
 import javax.persistence.FetchType;
 import javax.persistence.GeneratedValue;
@@ -37,11 +38,20 @@ public class Edge {
 
         private Long id;
         private List<ControlMessage>  message;
-        private Node messageSender;
-        private Node messageReceiver;
-        private Set<Node> messageReceiverAlternate;
+        private String messageSender;
+        private String messageReceiver;
+        private List<EdgeReceiverAlternate> messageReceiverAlternate;
         private ReplicationConfiguration parent;
 
+         @ManyToOne(fetch = FetchType.LAZY)
+	@JoinColumn(name = "ReplicationConfiguration", nullable = false)
+        public ReplicationConfiguration getReplicationConfiguration() {
+                return parent;
+        }
+        
+        public void setReplicationConfiguration(ReplicationConfiguration p){
+                parent = p;
+        }
         
         /**
          * The message elements contain the local name of the Replication API message elements
@@ -58,13 +68,13 @@ public class Edge {
                 this.message = values;
         }
 
-        @JoinColumn(referencedColumnName ="name" )
-        @ManyToOne(targetEntity = Node.class)
-        public Node getMessageSender() {
+        
+        @Column
+        public String getMessageSender() {
                 return messageSender;
         }
 
-        public void setMessageSender(Node value) {
+        public void setMessageSender(String value) {
                 this.messageSender = value;
         }
 
@@ -73,13 +83,12 @@ public class Edge {
                  *
          * @return
          */
-        @JoinColumn(referencedColumnName ="name" )
-        @ManyToOne(targetEntity = Node.class)
-        public Node getMessageReceiver() {
+        @Column
+        public String getMessageReceiver() {
                 return messageReceiver;
         }
 
-        public void setMessageReceiver(Node value) {
+        public void setMessageReceiver(String value) {
                 this.messageReceiver = value;
         }
 
@@ -90,10 +99,12 @@ public class Edge {
          *
          * @return
          */
-        @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, targetEntity = Node.class)
-        public Set<Node> getMessageReceiverAlternate() {
+        @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, targetEntity = EdgeReceiverAlternate.class
+                //, mappedBy = "messageReceiverAlternate"
+        )
+        public List<EdgeReceiverAlternate> getMessageReceiverAlternate() {
                 if (messageReceiverAlternate == null) {
-                        messageReceiverAlternate = new HashSet<Node>();
+                        messageReceiverAlternate = new ArrayList<EdgeReceiverAlternate>();
                 }
                 return this.messageReceiverAlternate;
         }
@@ -108,7 +119,7 @@ public class Edge {
                 this.message = message;
         }
 
-        public void setMessageReceiverAlternate(Set<Node> messageReceiverAlternate) {
+        public void setMessageReceiverAlternate(List<EdgeReceiverAlternate> messageReceiverAlternate) {
                 this.messageReceiverAlternate = messageReceiverAlternate;
         }
 

http://git-wip-us.apache.org/repos/asf/juddi/blob/22a846dd/juddi-core/src/main/java/org/apache/juddi/model/EdgeReceiverAlternate.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/model/EdgeReceiverAlternate.java b/juddi-core/src/main/java/org/apache/juddi/model/EdgeReceiverAlternate.java
new file mode 100644
index 0000000..b64a65f
--- /dev/null
+++ b/juddi-core/src/main/java/org/apache/juddi/model/EdgeReceiverAlternate.java
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2014 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+package org.apache.juddi.model;
+
+import java.io.Serializable;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.Table;
+
+/**
+ *
+ * @author alex
+ */
+@Entity
+@Table(name = "j3_chg_replcfgear")
+public class EdgeReceiverAlternate implements Serializable{
+        private static final long serialVersionUID = -3199894835641632162L;
+       Long id;
+       String rx;
+       
+               @Id
+        @GeneratedValue(strategy = GenerationType.AUTO)
+        public Long getId() {
+                return id;
+        }
+
+        public void setId(Long id) {
+                this.id = id;
+        }
+        
+         @ManyToOne(fetch = FetchType.LAZY, targetEntity = Edge.class)
+	@JoinColumn(name = "entity_key_ed", nullable = false)
+         public Edge getParent(){
+                 return this.edge;
+         }
+         private Edge edge;
+         public void setParent(Edge e){
+                 this.edge = e;
+         }
+
+         @Column
+         public String getReceiverAlternate() {
+                return this.rx;
+        }
+         
+        public void setReceiverAlternate(String s) {
+                this.rx = s;
+        }
+}

http://git-wip-us.apache.org/repos/asf/juddi/blob/22a846dd/juddi-core/src/main/java/org/apache/juddi/model/Node.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/model/Node.java b/juddi-core/src/main/java/org/apache/juddi/model/Node.java
index 53fbe12..d5d9df4 100644
--- a/juddi-core/src/main/java/org/apache/juddi/model/Node.java
+++ b/juddi-core/src/main/java/org/apache/juddi/model/Node.java
@@ -15,17 +15,9 @@ package org.apache.juddi.model;
  * limitations under the License.
  */
 
-import java.util.List;
-import java.util.Set;
-import javax.persistence.CascadeType;
 import javax.persistence.Column;
 import javax.persistence.Entity;
-import javax.persistence.FetchType;
 import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.OneToMany;
-import javax.persistence.OneToOne;
 import javax.persistence.Table;
 import javax.persistence.Transient;
 
@@ -36,168 +28,168 @@ import javax.persistence.Transient;
 @Table(name = "j3_node")
 public class Node implements java.io.Serializable {
 
-	@Transient
-	private static final long serialVersionUID = -893203927029468343L;
-	@Id
-	@Column(name="name", nullable = false, length=255)
-	private String name;
-	@Column(name="client_name", nullable = false, length=255)
-	private String clientName;
-	@Column(name="security_url", nullable = false, length=255)
-	private String securityUrl;
-	@Column(name="inquiry_url", nullable = false, length=255)
-	private String inquiryUrl;
-	@Column(name="publish_url", nullable = false, length=255)
-	private String publishUrl;
-	@Column(name="custody_transfer_url", nullable = false, length=255)
-	private String custodyTransferUrl;
-	@Column(name="subscription_url", nullable = false, length=255)
-	private String subscriptionUrl;
-        
-        @Column(name="subscriptionlist_url", nullable = false, length=255)
-	private String subscriptionListenerUrl;
-        @Column(name="replication_url", nullable = true, length=255)
-	private String replicationUrl;
-        @Column(name="proxy_transport", nullable = false, length=255)
-	private String proxyTransport;
-        
-	@Column(name="juddi_api_url", nullable = true, length=255)
-	private String juddiApiUrl;
-	@Column(name="factory_initial", nullable = true, length=255)
-	private String factoryInitial;
-	@Column(name="factory_url_pkgs", nullable = true, length=255)
-	private String factoryURLPkgs;
-	@Column(name="factory_naming_provider", nullable = true, length=255)
-	private String factoryNamingProvider;
-        
-	public Node() {}
-
-	public Node(String custodyTransferUrl, String inquiryUrl,
-			String juddiApiUrl, String name, String proxyTransport,
-			String publishUrl, String securityUrl, String subscriptionUrl, String replicationURL) {
-		super();
-		this.custodyTransferUrl = custodyTransferUrl;
-		this.inquiryUrl = inquiryUrl;
-		this.juddiApiUrl = juddiApiUrl;
-		this.name = name;
-		this.proxyTransport = proxyTransport;
-		this.publishUrl = publishUrl;
-		this.securityUrl = securityUrl;
-		this.subscriptionUrl = subscriptionUrl;
-                this.replicationUrl=replicationURL;
-	}
-
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-
-	public String getClientName() {
-		return clientName;
-	}
-
-	public void setClientName(String clientName) {
-		this.clientName = clientName;
-	}
-
-	public String getProxyTransport() {
-		return proxyTransport;
-	}
-
-	public void setProxyTransport(String proxyTransport) {
-		this.proxyTransport = proxyTransport;
-	}
-
-	public String getSecurityUrl() {
-		return securityUrl;
-	}
-
-	public void setSecurityUrl(String securityUrl) {
-		this.securityUrl = securityUrl;
-	}
-
-	public String getInquiryUrl() {
-		return inquiryUrl;
-	}
-
-	public void setInquiryUrl(String inquiryUrl) {
-		this.inquiryUrl = inquiryUrl;
-	}
-
-	public String getPublishUrl() {
-		return publishUrl;
-	}
-
-	public void setPublishUrl(String publishUrl) {
-		this.publishUrl = publishUrl;
-	}
-
-	public String getCustodyTransferUrl() {
-		return custodyTransferUrl;
-	}
-
-	public void setCustodyTransferUrl(String custodyTransferUrl) {
-		this.custodyTransferUrl = custodyTransferUrl;
-	}
-
-	public String getSubscriptionUrl() {
-		return subscriptionUrl;
-	}
-
-	public void setSubscriptionUrl(String subscriptionUrl) {
-		this.subscriptionUrl = subscriptionUrl;
-	}
-        
+        @Transient
+        private static final long serialVersionUID = -893203927029468343L;
+        @Id
+        @Column(name = "name", nullable = false, length = 255)
+        private String name;
+        @Column(name = "client_name", nullable = false, length = 255)
+        private String clientName;
+        @Column(name = "security_url", nullable = true, length = 255)
+        private String securityUrl;
+        @Column(name = "inquiry_url", nullable = false, length = 255)
+        private String inquiryUrl;
+        @Column(name = "publish_url", nullable = false, length = 255)
+        private String publishUrl;
+        @Column(name = "custody_transfer_url", nullable = true, length = 255)
+        private String custodyTransferUrl;
+        @Column(name = "subscription_url", nullable = true, length = 255)
+        private String subscriptionUrl;
+
+        @Column(name = "subscriptionlist_url", nullable = true, length = 255)
+        private String subscriptionListenerUrl;
+        @Column(name = "replication_url", nullable = true, length = 255)
+        private String replicationUrl;
+        @Column(name = "proxy_transport", nullable = false, length = 255)
+        private String proxyTransport;
+
+        @Column(name = "juddi_api_url", nullable = true, length = 255)
+        private String juddiApiUrl;
+        @Column(name = "factory_initial", nullable = true, length = 255)
+        private String factoryInitial;
+        @Column(name = "factory_url_pkgs", nullable = true, length = 255)
+        private String factoryURLPkgs;
+        @Column(name = "factory_naming_provider", nullable = true, length = 255)
+        private String factoryNamingProvider;
+
+        public Node() {
+        }
+
+        public Node(String custodyTransferUrl, String inquiryUrl,
+                String juddiApiUrl, String name, String proxyTransport,
+                String publishUrl, String securityUrl, String subscriptionUrl, String replicationURL) {
+                super();
+                this.custodyTransferUrl = custodyTransferUrl;
+                this.inquiryUrl = inquiryUrl;
+                this.juddiApiUrl = juddiApiUrl;
+                this.name = name;
+                this.proxyTransport = proxyTransport;
+                this.publishUrl = publishUrl;
+                this.securityUrl = securityUrl;
+                this.subscriptionUrl = subscriptionUrl;
+                this.replicationUrl = replicationURL;
+        }
+
+        public String getName() {
+                return name;
+        }
+
+        public void setName(String name) {
+                this.name = name;
+        }
+
+        public String getClientName() {
+                return clientName;
+        }
+
+        public void setClientName(String clientName) {
+                this.clientName = clientName;
+        }
+
+        public String getProxyTransport() {
+                return proxyTransport;
+        }
+
+        public void setProxyTransport(String proxyTransport) {
+                this.proxyTransport = proxyTransport;
+        }
+
+        public String getSecurityUrl() {
+                return securityUrl;
+        }
+
+        public void setSecurityUrl(String securityUrl) {
+                this.securityUrl = securityUrl;
+        }
+
+        public String getInquiryUrl() {
+                return inquiryUrl;
+        }
+
+        public void setInquiryUrl(String inquiryUrl) {
+                this.inquiryUrl = inquiryUrl;
+        }
+
+        public String getPublishUrl() {
+                return publishUrl;
+        }
+
+        public void setPublishUrl(String publishUrl) {
+                this.publishUrl = publishUrl;
+        }
+
+        public String getCustodyTransferUrl() {
+                return custodyTransferUrl;
+        }
+
+        public void setCustodyTransferUrl(String custodyTransferUrl) {
+                this.custodyTransferUrl = custodyTransferUrl;
+        }
+
+        public String getSubscriptionUrl() {
+                return subscriptionUrl;
+        }
+
+        public void setSubscriptionUrl(String subscriptionUrl) {
+                this.subscriptionUrl = subscriptionUrl;
+        }
+
         public String getSubscriptionListenerUrl() {
-		return subscriptionListenerUrl;
-	}
+                return subscriptionListenerUrl;
+        }
+
+        public void setSubscriptionListenerUrl(String subscriptionUrl) {
+                this.subscriptionListenerUrl = subscriptionUrl;
+        }
 
-	public void setSubscriptionListenerUrl(String subscriptionUrl) {
-		this.subscriptionListenerUrl = subscriptionUrl;
-	}
         public String getReplicationUrl() {
-		return replicationUrl;
-	}
-
-	public void setReplicationUrl(String replicationUrl) {
-		this.replicationUrl = replicationUrl;
-	}
-
-	public String getJuddiApiUrl() {
-		return juddiApiUrl;
-	}
-
-	public void setJuddiApiUrl(String juddiApiUrl) {
-		this.juddiApiUrl = juddiApiUrl;
-	}
-
-	public String getFactoryInitial() {
-		return factoryInitial;
-	}
-
-	public void setFactoryInitial(String factoryInitial) {
-		this.factoryInitial = factoryInitial;
-	}
-
-	public String getFactoryURLPkgs() {
-		return factoryURLPkgs;
-	}
-
-	public void setFactoryURLPkgs(String factoryURLPkgs) {
-		this.factoryURLPkgs = factoryURLPkgs;
-	}
-
-	public String getFactoryNamingProvider() {
-		return factoryNamingProvider;
-	}
-
-	public void setFactoryNamingProvider(String factoryNamingProvider) {
-		this.factoryNamingProvider = factoryNamingProvider;
-	}
-        
-        
+                return replicationUrl;
+        }
+
+        public void setReplicationUrl(String replicationUrl) {
+                this.replicationUrl = replicationUrl;
+        }
+
+        public String getJuddiApiUrl() {
+                return juddiApiUrl;
+        }
+
+        public void setJuddiApiUrl(String juddiApiUrl) {
+                this.juddiApiUrl = juddiApiUrl;
+        }
+
+        public String getFactoryInitial() {
+                return factoryInitial;
+        }
+
+        public void setFactoryInitial(String factoryInitial) {
+                this.factoryInitial = factoryInitial;
+        }
+
+        public String getFactoryURLPkgs() {
+                return factoryURLPkgs;
+        }
+
+        public void setFactoryURLPkgs(String factoryURLPkgs) {
+                this.factoryURLPkgs = factoryURLPkgs;
+        }
+
+        public String getFactoryNamingProvider() {
+                return factoryNamingProvider;
+        }
+
+        public void setFactoryNamingProvider(String factoryNamingProvider) {
+                this.factoryNamingProvider = factoryNamingProvider;
+        }
 
 }

http://git-wip-us.apache.org/repos/asf/juddi/blob/22a846dd/juddi-core/src/main/java/org/apache/juddi/model/Operator.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/model/Operator.java b/juddi-core/src/main/java/org/apache/juddi/model/Operator.java
index ef724fb..4420071 100644
--- a/juddi-core/src/main/java/org/apache/juddi/model/Operator.java
+++ b/juddi-core/src/main/java/org/apache/juddi/model/Operator.java
@@ -23,7 +23,11 @@ import javax.persistence.CascadeType;
 import javax.persistence.Column;
 import javax.persistence.Entity;
 import javax.persistence.FetchType;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
 import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
 import javax.persistence.OneToMany;
 import javax.persistence.Table;
 
@@ -37,8 +41,19 @@ public class Operator implements Serializable {
         private List<Contact> contact;
         private String soapReplicationURL;
         private List<KeyInfo> keyInfo;
+        Long id;
+        ReplicationConfiguration parent;
+        
+                  @Id
+        @GeneratedValue(strategy = GenerationType.AUTO)
+        public Long getId() {
+                return id;
+        }
 
-        @Id
+        public void setId(Long id) {
+                this.id = id;
+        }
+        @Column(name="operator_node")
         public String getOperatorNodeID() {
                 return operatorNodeID;
         }
@@ -88,5 +103,15 @@ public class Operator implements Serializable {
         public void setKeyInfo(List<KeyInfo> c) {
                 this.keyInfo=c;
         }
-}
-
\ No newline at end of file
+        
+         @ManyToOne(fetch = FetchType.LAZY)
+        @JoinColumn(name = "entity_key_ed", nullable = true)
+        public ReplicationConfiguration getParent() {
+                return this.parent;
+        }
+        
+
+        public void setParent(ReplicationConfiguration e) {
+                this.parent = e;
+        }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/juddi/blob/22a846dd/juddi-core/src/main/java/org/apache/juddi/model/ReplicationConfiguration.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/model/ReplicationConfiguration.java b/juddi-core/src/main/java/org/apache/juddi/model/ReplicationConfiguration.java
index 72c717b..93d0f73 100644
--- a/juddi-core/src/main/java/org/apache/juddi/model/ReplicationConfiguration.java
+++ b/juddi-core/src/main/java/org/apache/juddi/model/ReplicationConfiguration.java
@@ -19,27 +19,23 @@ package org.apache.juddi.model;
 import java.io.Serializable;
 import java.math.BigInteger;
 import java.util.ArrayList;
-import java.util.HashSet;
 import java.util.List;
 import javax.persistence.CascadeType;
 import javax.persistence.Column;
 import javax.persistence.Entity;
 import javax.persistence.FetchType;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
 import javax.persistence.Id;
 import javax.persistence.OneToMany;
 import javax.persistence.OneToOne;
 import javax.persistence.OrderBy;
 import javax.persistence.Table;
-import javax.persistence.TableGenerator;
 
 @Entity
 @Table(name = "j3_chg_replconf")
 public class ReplicationConfiguration implements Serializable {
 
         private static final long serialVersionUID = 1L;
-        
+
         private Long serialNumber;
         private String timeOfConfigurationUpdate;
         private List<Operator> operator = new ArrayList<Operator>(0);
@@ -47,6 +43,9 @@ public class ReplicationConfiguration implements Serializable {
         private BigInteger maximumTimeToGetChanges;
         private List<Signature> signatures = new ArrayList<Signature>(0);
         private Contact contact;
+        private List<ReplicationConfigurationNode> node;
+        private List<ControlMessage> controlledMessage;
+        private List<Edge> edge;
 
         /**
          * Gets the value of the contact property.
@@ -54,7 +53,8 @@ public class ReplicationConfiguration implements Serializable {
          * @return possible object is {@link Contact }
          *
          */
-        @OneToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY, targetEntity = Contact.class)
+        @OneToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "replicationConfigId")
+        //@OneToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY, targetEntity = Contact.class, mappedBy = "serialNumber")
         public Contact getContact() {
                 return contact;
         }
@@ -75,7 +75,7 @@ public class ReplicationConfiguration implements Serializable {
          */
         @Column(name = "serialnumb")
         @OrderBy(value = "SerialNumber DESC")
-         @Id
+        @Id
         public Long getSerialNumber() {
                 return serialNumber;
         }
@@ -116,14 +116,11 @@ public class ReplicationConfiguration implements Serializable {
                 }
                 return this.operator;
         }
-        
-        
-         public void setOperator(List<Operator> v) {
-                
-                this.operator=v;
-        }
 
-      
+        public void setOperator(List<Operator> v) {
+
+                this.operator = v;
+        }
 
         /**
          * Gets the value of the maximumTimeToSyncRegistry property.
@@ -177,26 +174,24 @@ public class ReplicationConfiguration implements Serializable {
                 this.signatures = signatures;
         }
 
-        private List<Node> node;
-        private List<ControlMessage> controlledMessage;
-        private List<Edge> edge;
-
         //To use a Node or a String reference...
         //Node will give us strict ref integ but makes a change history of the replication config impossible
         //Strig increases code logic for ref integ,but makes chage history possible
-        @OneToMany(targetEntity = Node.class, orphanRemoval = false,fetch = FetchType.LAZY, cascade = {CascadeType.MERGE, CascadeType.REFRESH, CascadeType.PERSIST})
-        public List<Node> getNode() {
+        @OneToMany(targetEntity = ReplicationConfigurationNode.class, fetch = FetchType.LAZY, cascade = CascadeType.ALL)
+       // @OneToMany(cascade = {CascadeType.ALL})
+        public List<ReplicationConfigurationNode> getNode() {
                 if (node == null) {
-                        node = new ArrayList<Node>();
+                        node = new ArrayList<ReplicationConfigurationNode>();
                 }
                 return this.node;
         }
 
-        public void setNode(List<Node> nodes) {
+        public void setNode(List<ReplicationConfigurationNode> nodes) {
 
                 this.node = nodes;
         }
 
+        //@javax.persistence.Transient
         @OneToMany(targetEntity = ControlMessage.class, fetch = FetchType.LAZY, cascade = CascadeType.ALL)
         public List<ControlMessage> getControlMessage() {
                 if (controlledMessage == null) {
@@ -215,9 +210,8 @@ public class ReplicationConfiguration implements Serializable {
         public List<Edge> getEdge() {
                 return this.edge;
         }
-        
-         public void setEdge( List<Edge> edges) {
-                this.edge=edges;
+
+        public void setEdge(List<Edge> edges) {
+                this.edge = edges;
         }
 }
-
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/juddi/blob/22a846dd/juddi-core/src/main/java/org/apache/juddi/model/ReplicationConfigurationNode.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/model/ReplicationConfigurationNode.java b/juddi-core/src/main/java/org/apache/juddi/model/ReplicationConfigurationNode.java
new file mode 100644
index 0000000..e146375
--- /dev/null
+++ b/juddi-core/src/main/java/org/apache/juddi/model/ReplicationConfigurationNode.java
@@ -0,0 +1,72 @@
+/*
+ * Copyright 2014 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+package org.apache.juddi.model;
+
+import java.io.Serializable;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.Table;
+
+/**
+ *
+ * @author alex
+ */
+@Entity
+@Table(name = "j3_chg_replconfn")
+public class ReplicationConfigurationNode implements Serializable {
+
+        private static final long serialVersionUID = 1L;
+        private Long id;
+        private ReplicationConfiguration parent;
+        String rx;
+
+        @Id
+        @GeneratedValue(strategy = GenerationType.AUTO)
+        public Long getId() {
+                return id;
+        }
+
+        public void setId(Long id) {
+                this.id = id;
+        }
+
+        @ManyToOne(fetch = FetchType.LAZY)
+        @JoinColumn(name = "entity_key_ed", nullable = false)
+        public ReplicationConfiguration getParent() {
+                return this.parent;
+        }
+        private Edge edge;
+
+        public void setParent(ReplicationConfiguration e) {
+                this.parent = e;
+        }
+
+        @Column
+        public String getNodeName() {
+                return this.rx;
+        }
+
+        public void setNodeName(String s) {
+                this.rx = s;
+        }
+
+}


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


[3/9] juddi git commit: JUDDI-241 adjusting database configuration. get/setReplicationConfig now function as expected

Posted by al...@apache.org.
JUDDI-241 adjusting database configuration. get/setReplicationConfig now function as expected


Project: http://git-wip-us.apache.org/repos/asf/juddi/repo
Commit: http://git-wip-us.apache.org/repos/asf/juddi/commit/a975954b
Tree: http://git-wip-us.apache.org/repos/asf/juddi/tree/a975954b
Diff: http://git-wip-us.apache.org/repos/asf/juddi/diff/a975954b

Branch: refs/heads/JUDDI-241
Commit: a975954b140694096ac3f81cd5bf77da19922cbb
Parents: 7aa78f6
Author: Alex <al...@apache.org>
Authored: Sat Nov 15 21:45:07 2014 -0500
Committer: Alex <al...@apache.org>
Committed: Sat Nov 15 21:45:07 2014 -0500

----------------------------------------------------------------------
 .../org/apache/juddi/api/impl/JUDDIApiImpl.java | 194 +++++++++--------
 .../apache/juddi/mapping/MappingApiToModel.java | 123 ++++++-----
 .../apache/juddi/mapping/MappingModelToApi.java |   4 +-
 .../apache/juddi/model/CommunicationGraph.java  |  99 ---------
 .../main/java/org/apache/juddi/model/Edge.java  |  21 +-
 .../juddi/model/ReplicationConfiguration.java   |  70 +++---
 .../juddi/validation/ValidateReplication.java   |  43 +++-
 .../src/main/resources/messages.properties      |   2 +-
 .../juddi/api/impl/API_160_ReplicationTest.java |  20 ++
 .../src/test/resources/META-INF/persistence.xml | 212 +++++++++----------
 10 files changed, 371 insertions(+), 417 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/juddi/blob/a975954b/juddi-core/src/main/java/org/apache/juddi/api/impl/JUDDIApiImpl.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/api/impl/JUDDIApiImpl.java b/juddi-core/src/main/java/org/apache/juddi/api/impl/JUDDIApiImpl.java
index 1f7ca77..e2b9dc5 100644
--- a/juddi-core/src/main/java/org/apache/juddi/api/impl/JUDDIApiImpl.java
+++ b/juddi-core/src/main/java/org/apache/juddi/api/impl/JUDDIApiImpl.java
@@ -118,8 +118,8 @@ import org.uddi.v3_service.UDDISubscriptionPortType;
  * @author <a href="mailto:alexoree@apache.org">Alex O'Ree</a>
  */
 @WebService(serviceName = "JUDDIApiService",
-     endpointInterface = "org.apache.juddi.v3_service.JUDDIApiPortType",
-     targetNamespace = "urn:juddi-apache-org:v3_service")
+        endpointInterface = "org.apache.juddi.v3_service.JUDDIApiPortType",
+        targetNamespace = "urn:juddi-apache-org:v3_service")
 public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortType {
 
         private Log log = LogFactory.getLog(this.getClass());
@@ -134,7 +134,7 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
          * @throws DispositionReportFaultMessage
          */
         public PublisherDetail savePublisher(SavePublisher body)
-             throws DispositionReportFaultMessage {
+                throws DispositionReportFaultMessage {
                 long startTime = System.currentTimeMillis();
                 EntityManager em = PersistenceManager.getEntityManager();
                 EntityTransaction tx = em.getTransaction();
@@ -167,12 +167,12 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
                         tx.commit();
                         long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(JUDDIQuery.SAVE_PUBLISHER,
-                             QueryStatus.SUCCESS, procTime);
+                                QueryStatus.SUCCESS, procTime);
                         return result;
                 } catch (DispositionReportFaultMessage drfm) {
                         long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(JUDDIQuery.SAVE_PUBLISHER,
-                             QueryStatus.FAILED, procTime);
+                                QueryStatus.FAILED, procTime);
                         throw drfm;
                 } finally {
                         if (tx.isActive()) {
@@ -190,7 +190,7 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
          * @throws DispositionReportFaultMessage
          */
         public void deletePublisher(DeletePublisher body)
-             throws DispositionReportFaultMessage {
+                throws DispositionReportFaultMessage {
                 long startTime = System.currentTimeMillis();
                 EntityManager em = PersistenceManager.getEntityManager();
                 EntityTransaction tx = em.getTransaction();
@@ -249,11 +249,11 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
                         tx.commit();
                         long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(JUDDIQuery.DELETE_PUBLISHER,
-                             QueryStatus.SUCCESS, procTime);
+                                QueryStatus.SUCCESS, procTime);
                 } catch (DispositionReportFaultMessage drfm) {
                         long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(JUDDIQuery.DELETE_PUBLISHER,
-                             QueryStatus.FAILED, procTime);
+                                QueryStatus.FAILED, procTime);
                         throw drfm;
                 } finally {
                         if (tx.isActive()) {
@@ -272,7 +272,7 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
          * @throws DispositionReportFaultMessage
          */
         public PublisherDetail getPublisherDetail(GetPublisherDetail body)
-             throws DispositionReportFaultMessage {
+                throws DispositionReportFaultMessage {
                 long startTime = System.currentTimeMillis();
                 new ValidatePublisher(null).validateGetPublisherDetail(body);
 
@@ -306,12 +306,12 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
                         tx.commit();
                         long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(JUDDIQuery.GET_PUBLISHER_DETAIL,
-                             QueryStatus.SUCCESS, procTime);
+                                QueryStatus.SUCCESS, procTime);
                         return result;
                 } catch (DispositionReportFaultMessage drfm) {
                         long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(JUDDIQuery.GET_PUBLISHER_DETAIL,
-                             QueryStatus.FAILED, procTime);
+                                QueryStatus.FAILED, procTime);
                         throw drfm;
                 } finally {
                         if (tx.isActive()) {
@@ -335,7 +335,7 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
          */
         @SuppressWarnings("unchecked")
         public PublisherDetail getAllPublisherDetail(GetAllPublisherDetail body)
-             throws DispositionReportFaultMessage, RemoteException {
+                throws DispositionReportFaultMessage, RemoteException {
                 long startTime = System.currentTimeMillis();
                 new ValidatePublisher(null).validateGetAllPublisherDetail(body);
 
@@ -363,12 +363,12 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
                         tx.commit();
                         long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(JUDDIQuery.GET_ALL_PUBLISHER_DETAIL,
-                             QueryStatus.SUCCESS, procTime);
+                                QueryStatus.SUCCESS, procTime);
                         return result;
                 } catch (DispositionReportFaultMessage drfm) {
                         long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(JUDDIQuery.GET_ALL_PUBLISHER_DETAIL,
-                             QueryStatus.FAILED, procTime);
+                                QueryStatus.FAILED, procTime);
                         throw drfm;
                 } finally {
                         if (tx.isActive()) {
@@ -390,7 +390,7 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
          * @throws DispositionReportFaultMessage
          */
         public void adminDeleteTModel(DeleteTModel body)
-             throws DispositionReportFaultMessage {
+                throws DispositionReportFaultMessage {
                 long startTime = System.currentTimeMillis();
                 EntityManager em = PersistenceManager.getEntityManager();
                 EntityTransaction tx = em.getTransaction();
@@ -410,11 +410,11 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
                         tx.commit();
                         long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(JUDDIQuery.ADMIN_DELETE_TMODEL,
-                             QueryStatus.SUCCESS, procTime);
+                                QueryStatus.SUCCESS, procTime);
                 } catch (DispositionReportFaultMessage drfm) {
                         long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(JUDDIQuery.ADMIN_DELETE_TMODEL,
-                             QueryStatus.FAILED, procTime);
+                                QueryStatus.FAILED, procTime);
                         throw drfm;
                 } finally {
                         if (tx.isActive()) {
@@ -433,7 +433,7 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
          * @throws RemoteException
          */
         public void deleteClientSubscriptionInfo(DeleteClientSubscriptionInfo body)
-             throws DispositionReportFaultMessage, RemoteException {
+                throws DispositionReportFaultMessage, RemoteException {
                 long startTime = System.currentTimeMillis();
                 EntityManager em = PersistenceManager.getEntityManager();
                 EntityTransaction tx = em.getTransaction();
@@ -453,11 +453,11 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
                         tx.commit();
                         long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(JUDDIQuery.DELETE_CLIENT_SUB,
-                             QueryStatus.SUCCESS, procTime);
+                                QueryStatus.SUCCESS, procTime);
                 } catch (DispositionReportFaultMessage drfm) {
                         long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(JUDDIQuery.DELETE_CLIENT_SUB,
-                             QueryStatus.FAILED, procTime);
+                                QueryStatus.FAILED, procTime);
                         throw drfm;
 
                 } finally {
@@ -479,7 +479,7 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
          * @throws RemoteException
          */
         public ClientSubscriptionInfoDetail saveClientSubscriptionInfo(SaveClientSubscriptionInfo body)
-             throws DispositionReportFaultMessage, RemoteException {
+                throws DispositionReportFaultMessage, RemoteException {
                 long startTime = System.currentTimeMillis();
                 EntityManager em = PersistenceManager.getEntityManager();
                 EntityTransaction tx = em.getTransaction();
@@ -513,12 +513,12 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
 
                         long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(JUDDIQuery.SAVE_CLIENT_SUB,
-                             QueryStatus.SUCCESS, procTime);
+                                QueryStatus.SUCCESS, procTime);
                         return result;
                 } catch (DispositionReportFaultMessage drfm) {
                         long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(JUDDIQuery.SAVE_CLIENT_SUB,
-                             QueryStatus.FAILED, procTime);
+                                QueryStatus.FAILED, procTime);
                         throw drfm;
 
                 } finally {
@@ -539,7 +539,7 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
          */
         @SuppressWarnings("unchecked")
         public ClientSubscriptionInfoDetail getAllClientSubscriptionInfoDetail(GetAllClientSubscriptionInfoDetail body)
-             throws DispositionReportFaultMessage {
+                throws DispositionReportFaultMessage {
                 long startTime = System.currentTimeMillis();
                 new ValidateClientSubscriptionInfo(null).validateGetAllClientSubscriptionDetail(body);
 
@@ -559,7 +559,7 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
 
                                 org.apache.juddi.api_v3.ClientSubscriptionInfo apiClientSubscriptionInfo = new org.apache.juddi.api_v3.ClientSubscriptionInfo();
 
-                                MappingModelToApi.mapClientSubscriptionInfo(modelClientSubscriptionInfo, apiClientSubscriptionInfo,em);
+                                MappingModelToApi.mapClientSubscriptionInfo(modelClientSubscriptionInfo, apiClientSubscriptionInfo, em);
 
                                 result.getClientSubscriptionInfo().add(apiClientSubscriptionInfo);
                         }
@@ -567,12 +567,12 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
                         tx.commit();
                         long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(JUDDIQuery.GET_ALL_CLIENT_SUB,
-                             QueryStatus.SUCCESS, procTime);
+                                QueryStatus.SUCCESS, procTime);
                         return result;
                 } catch (DispositionReportFaultMessage drfm) {
                         long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(JUDDIQuery.GET_ALL_CLIENT_SUB,
-                             QueryStatus.FAILED, procTime);
+                                QueryStatus.FAILED, procTime);
                         throw drfm;
 
                 } finally {
@@ -594,7 +594,7 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
          * @throws DispositionReportFaultMessage
          */
         public ClientSubscriptionInfoDetail getClientSubscriptionInfoDetail(GetClientSubscriptionInfoDetail body)
-             throws DispositionReportFaultMessage {
+                throws DispositionReportFaultMessage {
                 long startTime = System.currentTimeMillis();
                 new ValidateClientSubscriptionInfo(null).validateGetClientSubscriptionInfoDetail(body);
 
@@ -622,7 +622,7 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
 
                                 org.apache.juddi.api_v3.ClientSubscriptionInfo apiClientSubscriptionInfo = new org.apache.juddi.api_v3.ClientSubscriptionInfo();
 
-                                MappingModelToApi.mapClientSubscriptionInfo(modelClientSubscriptionInfo, apiClientSubscriptionInfo,em);
+                                MappingModelToApi.mapClientSubscriptionInfo(modelClientSubscriptionInfo, apiClientSubscriptionInfo, em);
 
                                 result.getClientSubscriptionInfo().add(apiClientSubscriptionInfo);
                         }
@@ -631,12 +631,12 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
 
                         long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(JUDDIQuery.GET_CLIENT_SUB,
-                             QueryStatus.SUCCESS, procTime);
+                                QueryStatus.SUCCESS, procTime);
                         return result;
                 } catch (DispositionReportFaultMessage drfm) {
                         long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(JUDDIQuery.GET_CLIENT_SUB,
-                             QueryStatus.FAILED, procTime);
+                                QueryStatus.FAILED, procTime);
                         throw drfm;
                 } finally {
                         if (tx.isActive()) {
@@ -658,7 +658,7 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
          */
         @Override
         public ClerkDetail saveClerk(SaveClerk body)
-             throws DispositionReportFaultMessage {
+                throws DispositionReportFaultMessage {
                 long startTime = System.currentTimeMillis();
                 EntityManager em = PersistenceManager.getEntityManager();
                 EntityTransaction tx = em.getTransaction();
@@ -678,35 +678,34 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
 
                                 MappingApiToModel.mapClerk(apiClerk, modelClerk);
                                 org.apache.juddi.model.Node node2 = em.find(org.apache.juddi.model.Node.class, apiClerk.getNode().getName());
-                                if (node2==null)
-                                {
+                                if (node2 == null) {
                                         //it doesn't exist yet
                                         node2 = new Node();
                                         MappingApiToModel.mapNode(apiClerk.getNode(), node2);
                                         em.persist(node2);
                                 }
-                                
+
                                 modelClerk.setNode(node2.getName());
                                 Object existingUddiEntity = em.find(modelClerk.getClass(), modelClerk.getClerkName());
                                 if (existingUddiEntity != null) {
-                                        
+
                                         em.merge(modelClerk);
                                 } else {
                                         em.persist(modelClerk);
                                 }
-                
+
                                 result.getClerk().add(apiClerk);
                         }
 
                         tx.commit();
                         long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(JUDDIQuery.SAVE_CLERK,
-                             QueryStatus.SUCCESS, procTime);
+                                QueryStatus.SUCCESS, procTime);
                         return result;
                 } catch (DispositionReportFaultMessage drfm) {
                         long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(JUDDIQuery.SAVE_CLERK,
-                             QueryStatus.FAILED, procTime);
+                                QueryStatus.FAILED, procTime);
                         throw drfm;
 
                 } finally {
@@ -728,7 +727,7 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
          * @throws DispositionReportFaultMessage
          */
         public NodeDetail saveNode(SaveNode body)
-             throws DispositionReportFaultMessage {
+                throws DispositionReportFaultMessage {
                 long startTime = System.currentTimeMillis();
                 EntityManager em = PersistenceManager.getEntityManager();
                 EntityTransaction tx = em.getTransaction();
@@ -761,12 +760,12 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
                         tx.commit();
                         long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(JUDDIQuery.SAVE_NODE,
-                             QueryStatus.SUCCESS, procTime);
+                                QueryStatus.SUCCESS, procTime);
                         return result;
                 } catch (DispositionReportFaultMessage drfm) {
                         long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(JUDDIQuery.SAVE_NODE,
-                             QueryStatus.FAILED, procTime);
+                                QueryStatus.FAILED, procTime);
                         throw drfm;
 
                 } finally {
@@ -788,14 +787,14 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
          */
         @SuppressWarnings("unchecked")
         public SyncSubscriptionDetail invokeSyncSubscription(
-             SyncSubscription body) throws DispositionReportFaultMessage,
-             RemoteException {
+                SyncSubscription body) throws DispositionReportFaultMessage,
+                RemoteException {
                 long startTime = System.currentTimeMillis();
                 //validate
                 SyncSubscriptionDetail syncSubscriptionDetail = new SyncSubscriptionDetail();
 
                 Map<String, org.apache.juddi.api_v3.ClientSubscriptionInfo> clientSubscriptionInfoMap
-                     = new HashMap<String, org.apache.juddi.api_v3.ClientSubscriptionInfo>();
+                        = new HashMap<String, org.apache.juddi.api_v3.ClientSubscriptionInfo>();
                 //find the clerks to go with these subscriptions
                 EntityManager em = PersistenceManager.getEntityManager();
                 EntityTransaction tx = em.getTransaction();
@@ -815,7 +814,7 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
                                         throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.SubscripKeyNotFound", subscriptionKey));
                                 }
                                 org.apache.juddi.api_v3.ClientSubscriptionInfo apiClientSubscriptionInfo = new org.apache.juddi.api_v3.ClientSubscriptionInfo();
-                                MappingModelToApi.mapClientSubscriptionInfo(modelClientSubscriptionInfo, apiClientSubscriptionInfo,em);
+                                MappingModelToApi.mapClientSubscriptionInfo(modelClientSubscriptionInfo, apiClientSubscriptionInfo, em);
                                 clientSubscriptionInfoMap.put(apiClientSubscriptionInfo.getSubscriptionKey(), apiClientSubscriptionInfo);
                         }
 
@@ -823,7 +822,7 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
                 } catch (DispositionReportFaultMessage drfm) {
                         long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(JUDDIQuery.INVOKE_SYNCSUB,
-                             QueryStatus.FAILED, procTime);
+                                QueryStatus.FAILED, procTime);
                         throw drfm;
 
                 } finally {
@@ -852,23 +851,23 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
                                 marshaller.marshal(list, sw);
 
                                 log.info(
-                                     "Notification received by UDDISubscriptionListenerService : " + sw.toString());
+                                        "Notification received by UDDISubscriptionListenerService : " + sw.toString());
 
                                 NotificationList<String> nl = NotificationList.getInstance();
 
                                 nl.getNotifications()
-                                     .add(sw.toString());
+                                        .add(sw.toString());
 
                                 //update the registry with the notification list.
                                 XRegisterHelper.handle(fromClerk, toClerk, list);
 
                                 syncSubscriptionDetail.getSubscriptionResultsList()
-                                     .add(list);
+                                        .add(list);
                         } catch (Exception ce) {
                                 log.error(ce.getMessage(), ce);
                                 long procTime = System.currentTimeMillis() - startTime;
                                 serviceCounter.update(JUDDIQuery.SAVE_NODE,
-                                     QueryStatus.FAILED, procTime);
+                                        QueryStatus.FAILED, procTime);
                                 if (ce instanceof DispositionReportFaultMessage) {
                                         throw (DispositionReportFaultMessage) ce;
                                 }
@@ -882,7 +881,7 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
 
                 long procTime = System.currentTimeMillis() - startTime;
                 serviceCounter.update(JUDDIQuery.INVOKE_SYNCSUB,
-                     QueryStatus.SUCCESS, procTime);
+                        QueryStatus.SUCCESS, procTime);
                 return syncSubscriptionDetail;
         }
 
@@ -915,11 +914,11 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
                         tx.commit();
                         long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(JUDDIQuery.GET_ALL_NODES,
-                             QueryStatus.SUCCESS, procTime);
+                                QueryStatus.SUCCESS, procTime);
                 } catch (DispositionReportFaultMessage drfm) {
                         long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(JUDDIQuery.GET_ALL_NODES,
-                             QueryStatus.FAILED, procTime);
+                                QueryStatus.FAILED, procTime);
                         throw drfm;
                 } finally {
                         if (tx.isActive()) {
@@ -951,18 +950,18 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
                         List<org.apache.juddi.model.Clerk> resultList = qry.getResultList();
                         for (int i = 0; i < resultList.size(); i++) {
                                 Clerk api = new Clerk();
-                                MappingModelToApi.mapClerk(resultList.get(i), api,em);
+                                MappingModelToApi.mapClerk(resultList.get(i), api, em);
                                 ret.getClerk().add(api);
 
                         }
                         tx.commit();
                         long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(JUDDIQuery.GET_ALL_CLERKS,
-                             QueryStatus.SUCCESS, procTime);
+                                QueryStatus.SUCCESS, procTime);
                 } catch (DispositionReportFaultMessage drfm) {
                         long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(JUDDIQuery.GET_ALL_CLERKS,
-                             QueryStatus.FAILED, procTime);
+                                QueryStatus.FAILED, procTime);
                         throw drfm;
 
                 } finally {
@@ -991,27 +990,25 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
                         org.apache.juddi.model.Node existingUddiEntity = em.find(org.apache.juddi.model.Node.class, req.getNodeID());
                         if (existingUddiEntity != null) {
 
-                            
                                 //cascade delete all clerks tied to this node, confirm that it works
-                              
-                            Query createQuery = em.createQuery("delete from Clerk c where c.node = :nodename");
-                            createQuery.setParameter("nodename", req.getNodeID());
-                            createQuery.executeUpdate();
-                             
-                               em.remove(existingUddiEntity);
-                                found=true;
+                                Query createQuery = em.createQuery("delete from Clerk c where c.node = :nodename");
+                                createQuery.setParameter("nodename", req.getNodeID());
+                                createQuery.executeUpdate();
+
+                                em.remove(existingUddiEntity);
+                                found = true;
+                        } else {
+                                throw new InvalidKeyPassedException(new ErrorMessage("errors.deleteNode.NotFound"));
                         }
-                        else 
-                            throw new InvalidKeyPassedException(new ErrorMessage("errors.deleteNode.NotFound"));
 
                         tx.commit();
                         long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(JUDDIQuery.DELETE_NODE,
-                             QueryStatus.SUCCESS, procTime);
+                                QueryStatus.SUCCESS, procTime);
                 } catch (DispositionReportFaultMessage drfm) {
                         long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(JUDDIQuery.DELETE_NODE,
-                             QueryStatus.FAILED, procTime);
+                                QueryStatus.FAILED, procTime);
                         throw drfm;
 
                 } finally {
@@ -1042,7 +1039,7 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
 
                         org.apache.juddi.model.Clerk existingUddiEntity = em.find(org.apache.juddi.model.Clerk.class, req.getClerkID());
                         if (existingUddiEntity
-                             != null) {
+                                != null) {
                                 em.remove(existingUddiEntity);
                                 found = true;
                         }
@@ -1050,11 +1047,11 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
                         tx.commit();
                         long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(JUDDIQuery.DELETE_CLERK,
-                             QueryStatus.SUCCESS, procTime);
+                                QueryStatus.SUCCESS, procTime);
                 } catch (DispositionReportFaultMessage drfm) {
                         long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(JUDDIQuery.DELETE_CLERK,
-                             QueryStatus.FAILED, procTime);
+                                QueryStatus.FAILED, procTime);
                         throw drfm;
 
                 } finally {
@@ -1148,11 +1145,11 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
                         tx.commit();
                         long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(SubscriptionQuery.DELETE_SUBSCRIPTION,
-                             QueryStatus.SUCCESS, procTime);
+                                QueryStatus.SUCCESS, procTime);
                 } catch (DispositionReportFaultMessage drfm) {
                         long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(SubscriptionQuery.DELETE_SUBSCRIPTION,
-                             QueryStatus.FAILED, procTime);
+                                QueryStatus.FAILED, procTime);
                         throw drfm;
                 } finally {
                         if (tx.isActive()) {
@@ -1168,7 +1165,7 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
                 long startTime = System.currentTimeMillis();
                 long procTime = System.currentTimeMillis() - startTime;
                 serviceCounter.update(JUDDIQuery.ADMIN_SAVE_BUSINESS,
-                     QueryStatus.SUCCESS, procTime);
+                        QueryStatus.SUCCESS, procTime);
                 ValidatePublish.unsupportedAPICall();
                 return null;
         }
@@ -1196,11 +1193,11 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
                         tx.commit();
                         long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(JUDDIQuery.ADMIN_SAVE_TMODEL,
-                             QueryStatus.SUCCESS, procTime);
+                                QueryStatus.SUCCESS, procTime);
                 } catch (DispositionReportFaultMessage drfm) {
                         long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(JUDDIQuery.ADMIN_SAVE_TMODEL,
-                             QueryStatus.FAILED, procTime);
+                                QueryStatus.FAILED, procTime);
                         throw drfm;
 
                 } finally {
@@ -1247,11 +1244,11 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
                         tx.commit();
                         long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(JUDDIQuery.GET_ALL_CLIENT_SUB,
-                             QueryStatus.SUCCESS, procTime);
+                                QueryStatus.SUCCESS, procTime);
                 } catch (DispositionReportFaultMessage drfm) {
                         long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(JUDDIQuery.GET_ALL_CLIENT_SUB,
-                             QueryStatus.FAILED, procTime);
+                                QueryStatus.FAILED, procTime);
                         throw drfm;
                 } finally {
                         if (tx.isActive()) {
@@ -1264,7 +1261,7 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
         }
 
         @Override
-        public DispositionReport setReplicationNodes(String authInfo, org.uddi.repl_v3.ReplicationConfiguration replicationConfiguration) throws DispositionReportFaultMessage, RemoteException {
+        public synchronized DispositionReport setReplicationNodes(String authInfo, org.uddi.repl_v3.ReplicationConfiguration replicationConfiguration) throws DispositionReportFaultMessage, RemoteException {
                 long startTime = System.currentTimeMillis();
 
                 EntityManager em = PersistenceManager.getEntityManager();
@@ -1276,20 +1273,37 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
                         if (!((Publisher) publisher).isAdmin()) {
                                 throw new UserMismatchException(new ErrorMessage("errors.AdminReqd"));
                         }
-                        new ValidateReplication(publisher).validateSetReplicationNodes(replicationConfiguration);
+                        new ValidateReplication(publisher).validateSetReplicationNodes(replicationConfiguration,em);
 
-                        org.apache.juddi.model.ReplicationConfiguration model = new ReplicationConfiguration();
-                        MappingApiToModel.mapReplicationConfiguration(replicationConfiguration, model, em);
-                        em.persist(model);
+                        org.apache.juddi.model.ReplicationConfiguration model = null;
+                        try {
+                                model = (ReplicationConfiguration) em.createQuery("select c FROM ReplicationConfiguration c order by c.serialNumber desc").getSingleResult();
+                        } catch (Exception ex) {
+                        }
+                        if (model == null) {
+                                model = new ReplicationConfiguration();
+                                MappingApiToModel.mapReplicationConfiguration(replicationConfiguration, model, em);
+                                model.setSerialNumber(System.currentTimeMillis());
+                                em.persist(model);
+
+                        } else {
+                                //long oldid = model.getSerialNumber();
+                                em.remove(model);
+                                model = new ReplicationConfiguration();
+                                MappingApiToModel.mapReplicationConfiguration(replicationConfiguration, model, em);
+                                model.setSerialNumber(System.currentTimeMillis());
+                                em.persist(model);
+
+                        }
 
                         tx.commit();
                         long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(JUDDIQuery.SET_REPLICATION_NODES,
-                             QueryStatus.SUCCESS, procTime);
+                                QueryStatus.SUCCESS, procTime);
                 } catch (DispositionReportFaultMessage drfm) {
                         long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(JUDDIQuery.SET_REPLICATION_NODES,
-                             QueryStatus.FAILED, procTime);
+                                QueryStatus.FAILED, procTime);
                         throw drfm;
                 } finally {
                         if (tx.isActive()) {
@@ -1327,11 +1341,11 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
                         tx.commit();
                         long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(JUDDIQuery.GET_ALL_NODES,
-                             QueryStatus.SUCCESS, procTime);
+                                QueryStatus.SUCCESS, procTime);
                 } catch (DispositionReportFaultMessage drfm) {
                         long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(JUDDIQuery.GET_ALL_NODES,
-                             QueryStatus.FAILED, procTime);
+                                QueryStatus.FAILED, procTime);
                         throw drfm;
                 } finally {
                         if (tx.isActive()) {
@@ -1366,11 +1380,11 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
                         tx.commit();
                         long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(JUDDIQuery.ADMIN_SAVE_SUB,
-                             QueryStatus.SUCCESS, procTime);
+                                QueryStatus.SUCCESS, procTime);
                 } catch (DispositionReportFaultMessage drfm) {
                         long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(JUDDIQuery.ADMIN_SAVE_SUB,
-                             QueryStatus.FAILED, procTime);
+                                QueryStatus.FAILED, procTime);
                         throw drfm;
 
                 } finally {

http://git-wip-us.apache.org/repos/asf/juddi/blob/a975954b/juddi-core/src/main/java/org/apache/juddi/mapping/MappingApiToModel.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/mapping/MappingApiToModel.java b/juddi-core/src/main/java/org/apache/juddi/mapping/MappingApiToModel.java
index 65739a4..b42cf81 100644
--- a/juddi-core/src/main/java/org/apache/juddi/mapping/MappingApiToModel.java
+++ b/juddi-core/src/main/java/org/apache/juddi/mapping/MappingApiToModel.java
@@ -35,7 +35,6 @@ import org.apache.juddi.model.Address;
 import org.apache.juddi.model.BindingTemplate;
 import org.apache.juddi.model.BusinessService;
 import org.apache.juddi.model.CanonicalizationMethod;
-import org.apache.juddi.model.CommunicationGraph;
 import org.apache.juddi.model.Contact;
 import org.apache.juddi.model.ControlMessage;
 import org.apache.juddi.model.Edge;
@@ -60,6 +59,7 @@ import org.uddi.api_v3.Description;
 import org.uddi.api_v3.OperationalInfo;
 import org.uddi.api_v3.SaveBinding;
 import org.uddi.repl_v3.ChangeRecord;
+import org.uddi.repl_v3.CommunicationGraph;
 import org.uddi.repl_v3.ReplicationConfiguration;
 import org.uddi.sub_v3.ObjectFactory;
 import org.uddi.v3_service.DispositionReportFaultMessage;
@@ -1425,7 +1425,7 @@ public class MappingApiToModel {
                 if (replicationConfiguration.getRegistryContact() != null) {
                         model.setContact(mapContact(replicationConfiguration.getRegistryContact().getContact()));
                 }
-                model.setCommunicationGraph(mapCommunicationGraph(replicationConfiguration.getCommunicationGraph(), em));
+                mapCommunicationGraph(model,replicationConfiguration.getCommunicationGraph(), em);
                 model.setOperator(mapOperators(replicationConfiguration.getOperator()));
                 if (replicationConfiguration.getSignature() != null) {
                         model.setSignatures(mapApiSignaturesToModelSignatures(replicationConfiguration.getSignature()));
@@ -1443,12 +1443,65 @@ public class MappingApiToModel {
                 return model;
         }
 
-        private static CommunicationGraph mapCommunicationGraph(org.uddi.repl_v3.CommunicationGraph communicationGraph, EntityManager em) throws DispositionReportFaultMessage {
-                if (communicationGraph == null) {
+       
+
+        private static List<Operator> mapOperators(List<org.uddi.repl_v3.Operator> api) throws DispositionReportFaultMessage {
+                if (api == null) {
                         return null;
                 }
-                CommunicationGraph model = new CommunicationGraph();
+                List<Operator> model = new ArrayList<Operator>();
+                for (int i = 0; i < api.size(); i++) {
+                        Operator op = new Operator();
+                        op.setSoapReplicationURL(api.get(i).getSoapReplicationURL());
 
+                        if (!api.get(i).getContact().isEmpty()) {
+                                op.setContact(new ArrayList<Contact>());
+                                for (int k = 0; k < api.get(i).getContact().size(); k++) {
+                                        op.getContact().add(mapContact(api.get(i).getContact().get(k)));
+                                }
+                        }
+                        op.setOperatorNodeID(api.get(i).getOperatorNodeID());
+                        op.setOperatorStatus(mapOperatorStatus(api.get(i).getOperatorStatus()));
+                        if (!api.get(i).getKeyInfo().isEmpty()) {
+                                op.setKeyInfo(new ArrayList<KeyInfo>());
+                                for (int k = 0; k < api.get(i).getKeyInfo().size(); k++) {
+                                        org.apache.juddi.model.KeyInfo modelKeyInfo = new KeyInfo();
+                                        modelKeyInfo.setXmlID(api.get(i).getKeyInfo().get(i).getId());
+                                        modelKeyInfo.setKeyDataValue(new ArrayList<KeyDataValue>());
+                                        if (api.get(i).getKeyInfo().get(i).getContent() != null) {
+                                                modelKeyInfo.setKeyDataValue(new ArrayList<KeyDataValue>());
+                                                for (int x = 0; x < api.get(i).getKeyInfo().get(k).getContent().size(); x++) {
+                                                        mapKeyValue((JAXBElement) api.get(i).getKeyInfo().get(k).getContent().get(x), modelKeyInfo.getKeyDataValue());
+                                                }
+                                        }
+                                        op.getKeyInfo().add(modelKeyInfo);
+                                }
+
+                        }
+                        model.add(op);
+
+                }
+                return model;
+        }
+
+        private static OperatorStatusType mapOperatorStatus(org.uddi.repl_v3.OperatorStatusType operatorStatus) {
+                switch (operatorStatus) {
+                        case NEW:
+                                return OperatorStatusType.NEW;
+                        case NORMAL:
+                                return OperatorStatusType.NORMAL;
+                        case RESIGNED:
+                                return OperatorStatusType.RESIGNED;
+                }
+                return null;
+        }
+
+    private static void mapCommunicationGraph(org.apache.juddi.model.ReplicationConfiguration model, CommunicationGraph communicationGraph, EntityManager em) throws ValueNotAllowedException {
+        
+    if (model == null) {
+                        return;
+                }
+           
                 /**
                  * Following the listing of nodes is the controlledMessage
                  * element that lists the set of messages over which this
@@ -1478,7 +1531,7 @@ public class MappingApiToModel {
                         List<Edge> ret = new ArrayList<Edge>();
                         for (int i = 0; i < communicationGraph.getEdge().size(); i++) {
                                 Edge e = new Edge();
-                                e.setCommunicationGraph(model);
+                                
                                 if (communicationGraph.getEdge().get(i).getMessageReceiver() == null) {
                                         throw new ValueNotAllowedException(new ErrorMessage("errors.replication.configNodeNotFound", communicationGraph.getEdge().get(i).getMessageReceiver()));
                                 }
@@ -1524,61 +1577,7 @@ public class MappingApiToModel {
                                 ret.add(e);
                         }
                         model.setEdge(ret);
-                }
-
-                return model;
-
-        }
-
-        private static List<Operator> mapOperators(List<org.uddi.repl_v3.Operator> api) throws DispositionReportFaultMessage {
-                if (api == null) {
-                        return null;
-                }
-                List<Operator> model = new ArrayList<Operator>();
-                for (int i = 0; i < api.size(); i++) {
-                        Operator op = new Operator();
-                        op.setSoapReplicationURL(api.get(i).getSoapReplicationURL());
+                }}            }
+    
 
-                        if (!api.get(i).getContact().isEmpty()) {
-                                op.setContact(new ArrayList<Contact>());
-                                for (int k = 0; k < api.get(i).getContact().size(); k++) {
-                                        op.getContact().add(mapContact(api.get(i).getContact().get(k)));
-                                }
-                        }
-                        op.setOperatorNodeID(api.get(i).getOperatorNodeID());
-                        op.setOperatorStatus(mapOperatorStatus(api.get(i).getOperatorStatus()));
-                        if (!api.get(i).getKeyInfo().isEmpty()) {
-                                op.setKeyInfo(new ArrayList<KeyInfo>());
-                                for (int k = 0; k < api.get(i).getKeyInfo().size(); k++) {
-                                        org.apache.juddi.model.KeyInfo modelKeyInfo = new KeyInfo();
-                                        modelKeyInfo.setXmlID(api.get(i).getKeyInfo().get(i).getId());
-                                        modelKeyInfo.setKeyDataValue(new ArrayList<KeyDataValue>());
-                                        if (api.get(i).getKeyInfo().get(i).getContent() != null) {
-                                                modelKeyInfo.setKeyDataValue(new ArrayList<KeyDataValue>());
-                                                for (int x = 0; x < api.get(i).getKeyInfo().get(k).getContent().size(); x++) {
-                                                        mapKeyValue((JAXBElement) api.get(i).getKeyInfo().get(k).getContent().get(x), modelKeyInfo.getKeyDataValue());
-                                                }
-                                        }
-                                        op.getKeyInfo().add(modelKeyInfo);
-                                }
-
-                        }
-                        model.add(op);
-
-                }
-                return model;
-        }
-
-        private static OperatorStatusType mapOperatorStatus(org.uddi.repl_v3.OperatorStatusType operatorStatus) {
-                switch (operatorStatus) {
-                        case NEW:
-                                return OperatorStatusType.NEW;
-                        case NORMAL:
-                                return OperatorStatusType.NORMAL;
-                        case RESIGNED:
-                                return OperatorStatusType.RESIGNED;
-                }
-                return null;
-        }
 
-}

http://git-wip-us.apache.org/repos/asf/juddi/blob/a975954b/juddi-core/src/main/java/org/apache/juddi/mapping/MappingModelToApi.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/mapping/MappingModelToApi.java b/juddi-core/src/main/java/org/apache/juddi/mapping/MappingModelToApi.java
index 0b5d9a3..50535da 100644
--- a/juddi-core/src/main/java/org/apache/juddi/mapping/MappingModelToApi.java
+++ b/juddi-core/src/main/java/org/apache/juddi/mapping/MappingModelToApi.java
@@ -1220,7 +1220,7 @@ public class MappingModelToApi {
                 item.setTimeOfConfigurationUpdate(find.getTimeOfConfigurationUpdate());
                 CommunicationGraph xcom = new CommunicationGraph();
 
-                mapCommunicationGraph(find.getCommunicationGraph(), xcom);
+                mapCommunicationGraph(find, xcom);
                 item.setCommunicationGraph(xcom);
                 //(List<org.apache.juddi.model.Contact> modelContactList, 
                 //org.uddi.api_v3.Contacts apiContacts,
@@ -1263,7 +1263,7 @@ public class MappingModelToApi {
 
         }
 
-        private static void mapCommunicationGraph(org.apache.juddi.model.CommunicationGraph model,
+        private static void mapCommunicationGraph(org.apache.juddi.model.ReplicationConfiguration model,
              CommunicationGraph api) {
 
                 mapEdge(model.getEdge(), api.getEdge());

http://git-wip-us.apache.org/repos/asf/juddi/blob/a975954b/juddi-core/src/main/java/org/apache/juddi/model/CommunicationGraph.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/model/CommunicationGraph.java b/juddi-core/src/main/java/org/apache/juddi/model/CommunicationGraph.java
deleted file mode 100644
index b2ec7d0..0000000
--- a/juddi-core/src/main/java/org/apache/juddi/model/CommunicationGraph.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright 2001-2008 The Apache Software Foundation.
- * 
- * Licensed 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.
- *
- */
-package org.apache.juddi.model;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import javax.persistence.CascadeType;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.FetchType;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.OneToMany;
-import javax.persistence.Table;
-import javax.persistence.TableGenerator;
-
-@Entity
-@Table(name = "j3_chg_graph")
-public class CommunicationGraph implements Serializable {
-
-        private Long id;
-        private List<Node> node;
-        private List<ControlMessage> controlledMessage;
-        private List<Edge> edge;
-
-        
-        @OneToMany(targetEntity = Node.class, fetch = FetchType.LAZY, cascade = CascadeType.ALL)
-        public List<Node> getNode() {
-                if (node == null) {
-                        node = new ArrayList<Node>();
-                }
-                return this.node;
-        }
-
-        public void setNode(List<Node> nodes) {
-
-                this.node = nodes;
-        }
-
-        @OneToMany(targetEntity = ControlMessage.class, fetch = FetchType.LAZY, cascade = CascadeType.ALL)
-        public List<ControlMessage> getControlMessage() {
-                if (controlledMessage == null) {
-                        controlledMessage = new ArrayList<ControlMessage>();
-                }
-                return this.controlledMessage;
-        }
-
-        public void setControlMessage(List<ControlMessage> controlledMessages) {
-
-                this.controlledMessage = controlledMessages;
-        }
-
-        // @OneToMany( fetch = FetchType.LAZY,targetEntity = Edge.class, mappedBy = "Edge")
-        @OneToMany(targetEntity = Edge.class, fetch = FetchType.LAZY, cascade = CascadeType.ALL)
-        public List<Edge> getEdge() {
-                return this.edge;
-        }
-        
-         public void setEdge( List<Edge> edges) {
-                this.edge=edges;
-        }
-
-        @Id
-        @Column(name = "j3_id")
-        @GeneratedValue(strategy = GenerationType.TABLE,
-             generator = "cfggrphGen")
-        @TableGenerator(name = "cfggrphGen",
-             table = "JPAGEN_CFGGRPH",
-             pkColumnName = "NAME",
-             pkColumnValue = "JPAGEN_PERSON_GEN",
-             valueColumnName = "VALUE")
-        public Long getId() {
-                return id;
-        }
-
-        public void setId(Long id) {
-                this.id = id;
-        }
-}
-
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/juddi/blob/a975954b/juddi-core/src/main/java/org/apache/juddi/model/Edge.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/model/Edge.java b/juddi-core/src/main/java/org/apache/juddi/model/Edge.java
index 768bb23..bc25990 100644
--- a/juddi-core/src/main/java/org/apache/juddi/model/Edge.java
+++ b/juddi-core/src/main/java/org/apache/juddi/model/Edge.java
@@ -40,26 +40,9 @@ public class Edge {
         private Node messageSender;
         private Node messageReceiver;
         private Set<Node> messageReceiverAlternate;
-        private CommunicationGraph parent;
-
-         /**
-         * link the parent object
-         * @param val 
-         */
-        @OneToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY, targetEntity = CommunicationGraph.class)
-        //@JoinColumn(name = "OWNER_ID")
-        public CommunicationGraph getCommunicationGraph() {
-                return parent;
-        }
-
-        /**
-         * link the parent object
-         * @param val 
-         */
-        public void setCommunicationGraph(CommunicationGraph val) {
-                parent = val;
-        }
+        private ReplicationConfiguration parent;
 
+        
         /**
          * The message elements contain the local name of the Replication API message elements
          * @return 

http://git-wip-us.apache.org/repos/asf/juddi/blob/a975954b/juddi-core/src/main/java/org/apache/juddi/model/ReplicationConfiguration.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/model/ReplicationConfiguration.java b/juddi-core/src/main/java/org/apache/juddi/model/ReplicationConfiguration.java
index a481412..72c717b 100644
--- a/juddi-core/src/main/java/org/apache/juddi/model/ReplicationConfiguration.java
+++ b/juddi-core/src/main/java/org/apache/juddi/model/ReplicationConfiguration.java
@@ -43,7 +43,6 @@ public class ReplicationConfiguration implements Serializable {
         private Long serialNumber;
         private String timeOfConfigurationUpdate;
         private List<Operator> operator = new ArrayList<Operator>(0);
-        private CommunicationGraph communicationGraph;
         private BigInteger maximumTimeToSyncRegistry;
         private BigInteger maximumTimeToGetChanges;
         private List<Signature> signatures = new ArrayList<Signature>(0);
@@ -77,13 +76,6 @@ public class ReplicationConfiguration implements Serializable {
         @Column(name = "serialnumb")
         @OrderBy(value = "SerialNumber DESC")
          @Id
-        @GeneratedValue(strategy = GenerationType.TABLE,
-             generator = "replcfgGen")
-        @TableGenerator(name = "replcfgGen",
-             table = "JPAGEN_REPLGEN",
-             pkColumnName = "NAME",
-             pkColumnValue = "JPAGEN_PERSON_GEN",
-             valueColumnName = "VALUE")
         public Long getSerialNumber() {
                 return serialNumber;
         }
@@ -131,26 +123,7 @@ public class ReplicationConfiguration implements Serializable {
                 this.operator=v;
         }
 
-        /**
-         * Gets the value of the communicationGraph property.
-         *
-         * @return possible object is {@link CommunicationGraph }
-         *
-         */
-        @OneToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY, targetEntity = CommunicationGraph.class)
-        public CommunicationGraph getCommunicationGraph() {
-                return communicationGraph;
-        }
-
-        /**
-         * Sets the value of the communicationGraph property.
-         *
-         * @param value allowed object is {@link CommunicationGraph }
-         *
-         */
-        public void setCommunicationGraph(CommunicationGraph value) {
-                this.communicationGraph = value;
-        }
+      
 
         /**
          * Gets the value of the maximumTimeToSyncRegistry property.
@@ -204,6 +177,47 @@ public class ReplicationConfiguration implements Serializable {
                 this.signatures = signatures;
         }
 
+        private List<Node> node;
+        private List<ControlMessage> controlledMessage;
+        private List<Edge> edge;
+
+        //To use a Node or a String reference...
+        //Node will give us strict ref integ but makes a change history of the replication config impossible
+        //Strig increases code logic for ref integ,but makes chage history possible
+        @OneToMany(targetEntity = Node.class, orphanRemoval = false,fetch = FetchType.LAZY, cascade = {CascadeType.MERGE, CascadeType.REFRESH, CascadeType.PERSIST})
+        public List<Node> getNode() {
+                if (node == null) {
+                        node = new ArrayList<Node>();
+                }
+                return this.node;
+        }
+
+        public void setNode(List<Node> nodes) {
+
+                this.node = nodes;
+        }
+
+        @OneToMany(targetEntity = ControlMessage.class, fetch = FetchType.LAZY, cascade = CascadeType.ALL)
+        public List<ControlMessage> getControlMessage() {
+                if (controlledMessage == null) {
+                        controlledMessage = new ArrayList<ControlMessage>();
+                }
+                return this.controlledMessage;
+        }
+
+        public void setControlMessage(List<ControlMessage> controlledMessages) {
+
+                this.controlledMessage = controlledMessages;
+        }
+
+        // @OneToMany( fetch = FetchType.LAZY,targetEntity = Edge.class, mappedBy = "Edge")
+        @OneToMany(targetEntity = Edge.class, fetch = FetchType.LAZY, cascade = CascadeType.ALL)
+        public List<Edge> getEdge() {
+                return this.edge;
+        }
         
+         public void setEdge( List<Edge> edges) {
+                this.edge=edges;
+        }
 }
 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/juddi/blob/a975954b/juddi-core/src/main/java/org/apache/juddi/validation/ValidateReplication.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/validation/ValidateReplication.java b/juddi-core/src/main/java/org/apache/juddi/validation/ValidateReplication.java
index 460c94d..6ede348 100644
--- a/juddi-core/src/main/java/org/apache/juddi/validation/ValidateReplication.java
+++ b/juddi-core/src/main/java/org/apache/juddi/validation/ValidateReplication.java
@@ -17,11 +17,15 @@
 package org.apache.juddi.validation;
 
 import java.math.BigInteger;
+import javax.persistence.EntityManager;
 import javax.xml.ws.WebServiceContext;
+import org.apache.juddi.model.Node;
 import org.apache.juddi.model.UddiEntityPublisher;
 import org.apache.juddi.v3.error.ErrorMessage;
 import org.apache.juddi.v3.error.FatalErrorException;
+import org.apache.juddi.v3.error.InvalidValueException;
 import org.apache.juddi.v3.error.ValueNotAllowedException;
+import org.uddi.repl_v3.CommunicationGraph.Edge;
 import org.uddi.repl_v3.HighWaterMarkVectorType;
 import org.uddi.repl_v3.NotifyChangeRecordsAvailable;
 import org.uddi.repl_v3.ReplicationConfiguration;
@@ -75,11 +79,11 @@ public class ValidateReplication extends ValidateUDDIApi {
                 if (responseLimitVector != null) {
                         for (int i = 0; i < responseLimitVector.getHighWaterMark().size(); i++) {
                                 if (responseLimitVector.getHighWaterMark().get(i).getOriginatingUSN() == null
-                                     || responseLimitVector.getHighWaterMark().get(i).getOriginatingUSN() <= 0) {
+                                        || responseLimitVector.getHighWaterMark().get(i).getOriginatingUSN() <= 0) {
                                         throw new FatalErrorException(new ErrorMessage("errors.replication.limitVectorNull"));
                                 }
-                                if (responseLimitVector.getHighWaterMark().get(i).getNodeID()== null
-                                     || responseLimitVector.getHighWaterMark().get(i).getNodeID().trim().equalsIgnoreCase("")) {
+                                if (responseLimitVector.getHighWaterMark().get(i).getNodeID() == null
+                                        || responseLimitVector.getHighWaterMark().get(i).getNodeID().trim().equalsIgnoreCase("")) {
                                         throw new FatalErrorException(new ErrorMessage("errors.replication.limitVectorNoNode"));
                                 }
                         }
@@ -111,8 +115,37 @@ public class ValidateReplication extends ValidateUDDIApi {
                 return false;
         }
 
-        public void validateSetReplicationNodes(ReplicationConfiguration replicationConfiguration) throws DispositionReportFaultMessage {
-                
+        public void validateSetReplicationNodes(ReplicationConfiguration replicationConfiguration, EntityManager em) throws DispositionReportFaultMessage {
+                if (replicationConfiguration == null) {
+                        throw new InvalidValueException(new ErrorMessage("errors.replication.configNull"));
+
+                }
+                if (replicationConfiguration.getCommunicationGraph() != null) {
+                        for (String s : replicationConfiguration.getCommunicationGraph().getNode()) {
+                                Node find = em.find(org.apache.juddi.model.Node.class, s);
+                                if (find == null) {
+                                        throw new InvalidValueException(new ErrorMessage("errors.replication.configNodeNotFound"));
+                                }
+                        }
+                        for (Edge s : replicationConfiguration.getCommunicationGraph().getEdge()) {
+                                Node find = em.find(org.apache.juddi.model.Node.class, s.getMessageReceiver());
+                                if (find == null) {
+                                        throw new InvalidValueException(new ErrorMessage("errors.replication.configNodeNotFound"));
+                                }
+                                find = null;
+                                find = em.find(org.apache.juddi.model.Node.class, s.getMessageSender());
+                                if (find == null) {
+                                        throw new InvalidValueException(new ErrorMessage("errors.replication.configNodeNotFound"));
+                                }
+                                for (String id : s.getMessageReceiverAlternate()) {
+                                        find = em.find(org.apache.juddi.model.Node.class, id);
+                                        if (find == null) {
+                                                throw new InvalidValueException(new ErrorMessage("errors.replication.configNodeNotFound"));
+                                        }
+                                }
+
+                        }
+                }
         }
 
 }

http://git-wip-us.apache.org/repos/asf/juddi/blob/a975954b/juddi-core/src/main/resources/messages.properties
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/resources/messages.properties b/juddi-core/src/main/resources/messages.properties
index 9665589..0a23c78 100644
--- a/juddi-core/src/main/resources/messages.properties
+++ b/juddi-core/src/main/resources/messages.properties
@@ -293,4 +293,4 @@ errors.replication.limitVectorNull=The high water mark vector limit specified Or
 errors.replication.limitVectorNoNode=No node name was specified
 errors.replication.configNodeNotFound=No specified node name is not currently registered as a node. Use the jUDDI Service API to register it. Node id: 
 errors.replication.configNull=No replication config was present in the message
-errors.deleteNode.InReplicationConfig=The node to be deleted is currently referenced in the replication configuration. You must revise the configuration before deleting the node, 
\ No newline at end of file
+errors.deleteNode.InReplicationConfig=The node to be deleted is currently referenced in the replication configuration. You must revise the configuration before deleting the node, 

http://git-wip-us.apache.org/repos/asf/juddi/blob/a975954b/juddi-core/src/test/java/org/apache/juddi/api/impl/API_160_ReplicationTest.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/test/java/org/apache/juddi/api/impl/API_160_ReplicationTest.java b/juddi-core/src/test/java/org/apache/juddi/api/impl/API_160_ReplicationTest.java
index d1719c2..f64512f 100644
--- a/juddi-core/src/test/java/org/apache/juddi/api/impl/API_160_ReplicationTest.java
+++ b/juddi-core/src/test/java/org/apache/juddi/api/impl/API_160_ReplicationTest.java
@@ -322,6 +322,26 @@ public class API_160_ReplicationTest {
                 Assert.assertNotNull(replicationNodes.getMaximumTimeToSyncRegistry());
                 Assert.assertNotNull(replicationNodes.getTimeOfConfigurationUpdate());
                 Assert.assertNotNull(replicationNodes.getSerialNumber());
+                long firstcommit = replicationNodes.getSerialNumber();
+                
+                
+                
+                 r = new ReplicationConfiguration();
+                r.setCommunicationGraph(new CommunicationGraph());
+              //  r.getCommunicationGraph().getEdge().add(new CommunicationGraph.Edge());
+                r.getCommunicationGraph().getNode().add("test_node");
+
+                 setReplicationNodes = juddi.setReplicationNodes(authInfoRoot, r);
+
+                 replicationNodes = juddi.getReplicationNodes(authInfoRoot);
+                Assert.assertNotNull(replicationNodes.getCommunicationGraph());
+                Assert.assertNotNull(replicationNodes.getCommunicationGraph().getNode());
+                Assert.assertEquals("test_node", replicationNodes.getCommunicationGraph().getNode().get(0));
+                Assert.assertNotNull(replicationNodes.getMaximumTimeToGetChanges());
+                Assert.assertNotNull(replicationNodes.getMaximumTimeToSyncRegistry());
+                Assert.assertNotNull(replicationNodes.getTimeOfConfigurationUpdate());
+                Assert.assertNotNull(replicationNodes.getSerialNumber());
+                Assert.assertTrue(firstcommit < replicationNodes.getSerialNumber());
 
         }
 }

http://git-wip-us.apache.org/repos/asf/juddi/blob/a975954b/juddi-core/src/test/resources/META-INF/persistence.xml
----------------------------------------------------------------------
diff --git a/juddi-core/src/test/resources/META-INF/persistence.xml b/juddi-core/src/test/resources/META-INF/persistence.xml
index afb2de7..adc4a7e 100644
--- a/juddi-core/src/test/resources/META-INF/persistence.xml
+++ b/juddi-core/src/test/resources/META-INF/persistence.xml
@@ -1,111 +1,101 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<persistence xmlns="http://java.sun.com/xml/ns/persistence" 
-             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-             xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" 
-             version="1.0">
-  <persistence-unit name="juddiDatabase" transaction-type="RESOURCE_LOCAL">
-    <provider>org.hibernate.ejb.HibernatePersistence</provider>
-    
-    <!-- entity classes -->
-    <class>org.apache.juddi.model.Address</class>
-    <class>org.apache.juddi.model.AddressLine</class>
-    <class>org.apache.juddi.model.AuthToken</class>
-    <class>org.apache.juddi.model.BindingCategoryBag</class>
-    <class>org.apache.juddi.model.BindingDescr</class>
-    <class>org.apache.juddi.model.BindingTemplate</class>
-    <class>org.apache.juddi.model.BusinessCategoryBag</class>
-    <class>org.apache.juddi.model.BusinessDescr</class>
-    <class>org.apache.juddi.model.BusinessEntity</class>
-    <class>org.apache.juddi.model.BusinessIdentifier</class>
-    <class>org.apache.juddi.model.BusinessName</class>
-    <class>org.apache.juddi.model.BusinessService</class>
-    <class>org.apache.juddi.model.CanonicalizationMethod</class>
-    <class>org.apache.juddi.model.CategoryBag</class>
-    <class>org.apache.juddi.model.Clerk</class>
-    <class>org.apache.juddi.model.ClientSubscriptionInfo</class>
-    <class>org.apache.juddi.model.Contact</class>
-    <class>org.apache.juddi.model.ContactDescr</class>
-    <class>org.apache.juddi.model.DiscoveryUrl</class>
-    <class>org.apache.juddi.model.Email</class>
-    <class>org.apache.juddi.model.InstanceDetailsDescr</class>
-    <class>org.apache.juddi.model.InstanceDetailsDocDescr</class>
-    <class>org.apache.juddi.model.KeyedReference</class>
-    <class>org.apache.juddi.model.KeyedReferenceGroup</class>
-    <class>org.apache.juddi.model.KeyDataValue</class>
-    <class>org.apache.juddi.model.KeyInfo</class>
-    <class>org.apache.juddi.model.Node</class>
-    <class>org.apache.juddi.model.ObjectType</class>
-    <class>org.apache.juddi.model.ObjectTypeContent</class>
-    <class>org.apache.juddi.model.OverviewDoc</class>
-    <class>org.apache.juddi.model.OverviewDocDescr</class>
-    <class>org.apache.juddi.model.PersonName</class>
-    <class>org.apache.juddi.model.Phone</class>
-    <class>org.apache.juddi.model.Publisher</class>
-    <class>org.apache.juddi.model.PublisherAssertion</class>
-    <class>org.apache.juddi.model.PublisherAssertionId</class>
-    <class>org.apache.juddi.model.Reference</class>
-    <class>org.apache.juddi.model.ServiceCategoryBag</class>
-    <class>org.apache.juddi.model.ServiceDescr</class>
-    <class>org.apache.juddi.model.ServiceName</class>
-    <class>org.apache.juddi.model.ServiceProjection</class>
-    <class>org.apache.juddi.model.ServiceProjectionId</class>
-    <class>org.apache.juddi.model.Signature</class>
-    <class>org.apache.juddi.model.SignatureMethod</class>
-    <class>org.apache.juddi.model.SignatureTransform</class>
-    <class>org.apache.juddi.model.SignatureTransformDataValue</class>
-    <class>org.apache.juddi.model.SignatureValue</class>
-    <class>org.apache.juddi.model.SignedInfo</class>
-    <class>org.apache.juddi.model.Subscription</class>
-    <class>org.apache.juddi.model.SubscriptionChunkToken</class>
-    <class>org.apache.juddi.model.SubscriptionMatch</class>
-    <class>org.apache.juddi.model.TempKey</class>
-	<class>org.apache.juddi.model.TempKeyPK</class>
-    <class>org.apache.juddi.model.Tmodel</class>
-    <class>org.apache.juddi.model.TmodelCategoryBag</class>
-    <class>org.apache.juddi.model.TmodelDescr</class>
-    <class>org.apache.juddi.model.TmodelIdentifier</class>
-    <class>org.apache.juddi.model.TmodelInstanceInfo</class>
-    <class>org.apache.juddi.model.TmodelInstanceInfoDescr</class>
-    <class>org.apache.juddi.model.TransferToken</class>
-    <class>org.apache.juddi.model.TransferTokenKey</class>
-    <class>org.apache.juddi.model.UddiEntity</class>
-    <class>org.apache.juddi.model.UddiEntityPublisher</class>
-	<class>org.apache.juddi.model.ValueSetValues</class>
-
-	<class>org.apache.juddi.model.ChangeRecord</class>
-	<class>org.apache.juddi.model.CommunicationGraph</class>
-	<class>org.apache.juddi.model.Operator</class>
-	<class>org.apache.juddi.model.ReplicationConfiguration</class>
-	<class>org.apache.juddi.model.Edge</class>
-	<class>org.apache.juddi.model.ControlMessage</class>
-	<class>org.apache.juddi.model.ReplicationMessage</class>
-    
-    <properties>
-      <property name="hibernate.archive.autodetection" value="class"/>
-      <property name="hibernate.hbm2ddl.auto" value="update"/>
-      <property name="hibernate.show_sql" value="false"/>
-
-      <!-- derby connection properties -->
-      <property name="hibernate.dialect" value="org.hibernate.dialect.DerbyDialect"/>
-      <property name="hibernate.connection.driver_class" value="org.apache.derby.jdbc.EmbeddedDriver"/>
-      <property name="hibernate.connection.url" value="jdbc:derby:memory:juddi-derby-test-db;create=true"/>
-      <property name="hibernate.connection.username" value=""/>
-      <property name="hibernate.connection.password" value=""/>
-
- 	  <!--  mysql connection properties 
-
-      <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect" />
-      <property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver" />
-      <property name="hibernate.connection.username" value="juddiv3" />
-      <property name="hibernate.connection.password" value="" />
-      <property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306/juddiv3" />
--->
-      
-      <!-- connection pool properties -->
-      <property name="hibernate.dbcp.maxActive" value="100"/>
-      <property name="hibernate.dbcp.maxIdle" value="30"/>
-      <property name="hibernate.dbcp.maxWait" value="10000"/>
-      
-    </properties>
-  </persistence-unit>
-</persistence>
+<?xml version="1.0" encoding="UTF-8"?>
+<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
+  <persistence-unit name="juddiDatabase" transaction-type="RESOURCE_LOCAL">
+    <provider>org.hibernate.ejb.HibernatePersistence</provider>
+    <!-- entity classes -->
+    <class>org.apache.juddi.model.Address</class>
+    <class>org.apache.juddi.model.AddressLine</class>
+    <class>org.apache.juddi.model.AuthToken</class>
+    <class>org.apache.juddi.model.BindingCategoryBag</class>
+    <class>org.apache.juddi.model.BindingDescr</class>
+    <class>org.apache.juddi.model.BindingTemplate</class>
+    <class>org.apache.juddi.model.BusinessCategoryBag</class>
+    <class>org.apache.juddi.model.BusinessDescr</class>
+    <class>org.apache.juddi.model.BusinessEntity</class>
+    <class>org.apache.juddi.model.BusinessIdentifier</class>
+    <class>org.apache.juddi.model.BusinessName</class>
+    <class>org.apache.juddi.model.BusinessService</class>
+    <class>org.apache.juddi.model.CanonicalizationMethod</class>
+    <class>org.apache.juddi.model.CategoryBag</class>
+    <class>org.apache.juddi.model.Clerk</class>
+    <class>org.apache.juddi.model.ClientSubscriptionInfo</class>
+    <class>org.apache.juddi.model.Contact</class>
+    <class>org.apache.juddi.model.ContactDescr</class>
+    <class>org.apache.juddi.model.DiscoveryUrl</class>
+    <class>org.apache.juddi.model.Email</class>
+    <class>org.apache.juddi.model.InstanceDetailsDescr</class>
+    <class>org.apache.juddi.model.InstanceDetailsDocDescr</class>
+    <class>org.apache.juddi.model.KeyedReference</class>
+    <class>org.apache.juddi.model.KeyedReferenceGroup</class>
+    <class>org.apache.juddi.model.KeyDataValue</class>
+    <class>org.apache.juddi.model.KeyInfo</class>
+    <class>org.apache.juddi.model.Node</class>
+    <class>org.apache.juddi.model.ObjectType</class>
+    <class>org.apache.juddi.model.ObjectTypeContent</class>
+    <class>org.apache.juddi.model.OverviewDoc</class>
+    <class>org.apache.juddi.model.OverviewDocDescr</class>
+    <class>org.apache.juddi.model.PersonName</class>
+    <class>org.apache.juddi.model.Phone</class>
+    <class>org.apache.juddi.model.Publisher</class>
+    <class>org.apache.juddi.model.PublisherAssertion</class>
+    <class>org.apache.juddi.model.PublisherAssertionId</class>
+    <class>org.apache.juddi.model.Reference</class>
+    <class>org.apache.juddi.model.ServiceCategoryBag</class>
+    <class>org.apache.juddi.model.ServiceDescr</class>
+    <class>org.apache.juddi.model.ServiceName</class>
+    <class>org.apache.juddi.model.ServiceProjection</class>
+    <class>org.apache.juddi.model.ServiceProjectionId</class>
+    <class>org.apache.juddi.model.Signature</class>
+    <class>org.apache.juddi.model.SignatureMethod</class>
+    <class>org.apache.juddi.model.SignatureTransform</class>
+    <class>org.apache.juddi.model.SignatureTransformDataValue</class>
+    <class>org.apache.juddi.model.SignatureValue</class>
+    <class>org.apache.juddi.model.SignedInfo</class>
+    <class>org.apache.juddi.model.Subscription</class>
+    <class>org.apache.juddi.model.SubscriptionChunkToken</class>
+    <class>org.apache.juddi.model.SubscriptionMatch</class>
+    <class>org.apache.juddi.model.TempKey</class>
+    <class>org.apache.juddi.model.TempKeyPK</class>
+    <class>org.apache.juddi.model.Tmodel</class>
+    <class>org.apache.juddi.model.TmodelCategoryBag</class>
+    <class>org.apache.juddi.model.TmodelDescr</class>
+    <class>org.apache.juddi.model.TmodelIdentifier</class>
+    <class>org.apache.juddi.model.TmodelInstanceInfo</class>
+    <class>org.apache.juddi.model.TmodelInstanceInfoDescr</class>
+    <class>org.apache.juddi.model.TransferToken</class>
+    <class>org.apache.juddi.model.TransferTokenKey</class>
+    <class>org.apache.juddi.model.UddiEntity</class>
+    <class>org.apache.juddi.model.UddiEntityPublisher</class>
+    <class>org.apache.juddi.model.ValueSetValues</class>
+    <class>org.apache.juddi.model.ChangeRecord</class>
+    <class>org.apache.juddi.model.CommunicationGraph</class>
+    <class>org.apache.juddi.model.Operator</class>
+    <class>org.apache.juddi.model.ReplicationConfiguration</class>
+    <class>org.apache.juddi.model.Edge</class>
+    <class>org.apache.juddi.model.ControlMessage</class>
+    <properties>
+      <property name="hibernate.archive.autodetection" value="class"/>
+      <property name="hibernate.hbm2ddl.auto" value="update"/>
+      <property name="hibernate.show_sql" value="false"/>
+      <!-- derby connection properties -->
+      <property name="hibernate.dialect" value="org.hibernate.dialect.DerbyDialect"/>
+      <property name="hibernate.connection.driver_class" value="org.apache.derby.jdbc.EmbeddedDriver"/>
+      <property name="hibernate.connection.url" value="jdbc:derby:memory:juddi-derby-test-db;create=true"/>
+      <property name="hibernate.connection.username" value=""/>
+      <property name="hibernate.connection.password" value=""/>
+      <!--  mysql connection properties 
+
+      <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect" />
+      <property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver" />
+      <property name="hibernate.connection.username" value="juddiv3" />
+      <property name="hibernate.connection.password" value="" />
+      <property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306/juddiv3" />
+-->
+      <!-- connection pool properties -->
+      <!--<property name = "hibernate.show_sql" value = "true" />-->
+      <property name="hibernate.dbcp.maxActive" value="100"/>
+      <property name="hibernate.dbcp.maxIdle" value="30"/>
+      <property name="hibernate.dbcp.maxWait" value="10000"/>
+    </properties>
+  </persistence-unit>
+</persistence>


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


[9/9] juddi git commit: JUDDI-891 done

Posted by al...@apache.org.
JUDDI-891 done


Project: http://git-wip-us.apache.org/repos/asf/juddi/repo
Commit: http://git-wip-us.apache.org/repos/asf/juddi/commit/20d9dff5
Tree: http://git-wip-us.apache.org/repos/asf/juddi/tree/20d9dff5
Diff: http://git-wip-us.apache.org/repos/asf/juddi/diff/20d9dff5

Branch: refs/heads/JUDDI-241
Commit: 20d9dff566b3a79bcfafbdf4b6f72728f85cbbd6
Parents: 22a846d
Author: Alex <al...@apache.org>
Authored: Mon Nov 24 22:13:29 2014 -0500
Committer: Alex <al...@apache.org>
Committed: Mon Nov 24 22:13:29 2014 -0500

----------------------------------------------------------------------
 .../juddi_install_data/root_BusinessEntity.xml  | 28 ++++++++++----------
 .../impl/API_150_ValueSetValidationTest.java    |  6 ++---
 .../api/impl/rest/UDDIInquiryJAXRSTest.java     |  2 +-
 .../src/main/webapp/WEB-INF/classes/juddiv3.xml |  2 +-
 4 files changed, 19 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/juddi/blob/20d9dff5/juddi-core/src/main/resources/juddi_install_data/root_BusinessEntity.xml
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/resources/juddi_install_data/root_BusinessEntity.xml b/juddi-core/src/main/resources/juddi_install_data/root_BusinessEntity.xml
index 2682dc5..74cdbb6 100644
--- a/juddi-core/src/main/resources/juddi_install_data/root_BusinessEntity.xml
+++ b/juddi-core/src/main/resources/juddi_install_data/root_BusinessEntity.xml
@@ -38,7 +38,7 @@
   
 See below for other fields that you may want to edit...
 -->
-<businessEntity xmlns="urn:uddi-org:api_v3" xmlns:xml="http://www.w3.org/XML/1998/namespace" businessKey="uddi:juddi.apache.org:businesses-asf">
+<businessEntity xmlns="urn:uddi-org:api_v3" xmlns:xml="http://www.w3.org/XML/1998/namespace" businessKey="uddi:juddi.apache.org:node1">
      <!-- Change the name field to represent the name of your registry -->
      <name xml:lang="en">An Apache jUDDI Node</name>
      <!-- Change the description field to provided a brief description of your registry -->
@@ -54,7 +54,7 @@ See below for other fields that you may want to edit...
           <!-- As mentioned above, you may want to provide user-defined keys for these (and the services/bindingTemplates below.  Services that you
           don't intend to support should be removed entirely -->
           <!-- inquiry v3 -->
-          <businessService serviceKey="uddi:juddi.apache.org:services-inquiry" businessKey="uddi:juddi.apache.org:businesses-asf">
+          <businessService serviceKey="uddi:juddi.apache.org:services-inquiry" businessKey="uddi:juddi.apache.org:node1">
                <name xml:lang="en">UDDI Inquiry Service</name>
                <description xml:lang="en">Web Service supporting UDDI Inquiry API</description>
                <bindingTemplates>
@@ -124,7 +124,7 @@ See below for other fields that you may want to edit...
                </categoryBag>
           </businessService>
           <!-- inquiry v2 -->
-          <businessService serviceKey="uddi:juddi.apache.org:services-inquiryv2" businessKey="uddi:juddi.apache.org:businesses-asf">
+          <businessService serviceKey="uddi:juddi.apache.org:services-inquiryv2" businessKey="uddi:juddi.apache.org:node1">
                <name xml:lang="en">UDDIv2 Inquiry Service</name>
                <description xml:lang="en">Web Service supporting UDDIv2 Inquiry API</description>
                <bindingTemplates>
@@ -165,7 +165,7 @@ See below for other fields that you may want to edit...
                </categoryBag>
           </businessService>
           <!-- inquiry v3 REST -->
-          <businessService serviceKey="uddi:juddi.apache.org:services-inquiry-rest" businessKey="uddi:juddi.apache.org:businesses-asf">
+          <businessService serviceKey="uddi:juddi.apache.org:services-inquiry-rest" businessKey="uddi:juddi.apache.org:node1">
                <name xml:lang="en">UDDI Inquiry REST Service</name>
                <description xml:lang="en">Web Service supporting UDDI Inquiry API via HTTP GET</description>
                <bindingTemplates>
@@ -200,7 +200,7 @@ See below for other fields that you may want to edit...
                </categoryBag>
           </businessService>
           <!-- publish v3 -->
-          <businessService serviceKey="uddi:juddi.apache.org:services-publish" businessKey="uddi:juddi.apache.org:businesses-asf">
+          <businessService serviceKey="uddi:juddi.apache.org:services-publish" businessKey="uddi:juddi.apache.org:node1">
                <name xml:lang="en">UDDI Publish Service</name>
                <description xml:lang="en">Web Service supporting UDDI Publish API</description>
                <bindingTemplates>
@@ -265,7 +265,7 @@ See below for other fields that you may want to edit...
           </businessService>
  
           <!-- publish v2 -->
-          <businessService serviceKey="uddi:juddi.apache.org:services-publishv2" businessKey="uddi:juddi.apache.org:businesses-asf">
+          <businessService serviceKey="uddi:juddi.apache.org:services-publishv2" businessKey="uddi:juddi.apache.org:node1">
                <name xml:lang="en">UDDIv2 Publish Service</name>
                <description xml:lang="en">Web Service supporting UDDIv2 Publish API</description>
                <bindingTemplates>
@@ -302,7 +302,7 @@ See below for other fields that you may want to edit...
  
           <!-- security v3 -->
 
-          <businessService serviceKey="uddi:juddi.apache.org:services-security" businessKey="uddi:juddi.apache.org:businesses-asf">
+          <businessService serviceKey="uddi:juddi.apache.org:services-security" businessKey="uddi:juddi.apache.org:node1">
                <name xml:lang="en">UDDI Security Service</name>
                <description xml:lang="en">Web Service supporting UDDI Security API</description>
                <bindingTemplates>
@@ -342,7 +342,7 @@ See below for other fields that you may want to edit...
                </categoryBag>
           </businessService>
           <!-- custody v3 -->
-          <businessService serviceKey="uddi:juddi.apache.org:services-custodytransfer" businessKey="uddi:juddi.apache.org:businesses-asf">
+          <businessService serviceKey="uddi:juddi.apache.org:services-custodytransfer" businessKey="uddi:juddi.apache.org:node1">
                <name xml:lang="en">UDDI Custody and Ownership Transfer Service</name>
                <description xml:lang="en">Web Service supporting UDDI Custody and Ownership Transfer API</description>
                <bindingTemplates>
@@ -411,7 +411,7 @@ See below for other fields that you may want to edit...
           </businessService>
                 
           <!-- subscription v3 -->
-          <businessService serviceKey="uddi:juddi.apache.org:services-subscription" businessKey="uddi:juddi.apache.org:businesses-asf">
+          <businessService serviceKey="uddi:juddi.apache.org:services-subscription" businessKey="uddi:juddi.apache.org:node1">
                <name xml:lang="en">UDDI Subscription Service</name>
                <description xml:lang="en">Web Service supporting UDDI Subscription API</description>
                <bindingTemplates>
@@ -477,7 +477,7 @@ See below for other fields that you may want to edit...
                </categoryBag>
           </businessService>
           <!-- subscription listener v3 -->
-          <businessService serviceKey="uddi:juddi.apache.org:services-subscriptionlistener" businessKey="uddi:juddi.apache.org:businesses-asf">
+          <businessService serviceKey="uddi:juddi.apache.org:services-subscriptionlistener" businessKey="uddi:juddi.apache.org:node1">
                <name xml:lang="en">UDDI Subscription Listener Service</name>
                <description xml:lang="en">Web Service supporting UDDI Subscription Listener API</description>
                <bindingTemplates>
@@ -520,7 +520,7 @@ See below for other fields that you may want to edit...
           </businessService>
 	
 
-          <businessService serviceKey="uddi:juddi.apache.org:services-valueset" businessKey="uddi:juddi.apache.org:businesses-asf">
+          <businessService serviceKey="uddi:juddi.apache.org:services-valueset" businessKey="uddi:juddi.apache.org:node1">
                <name xml:lang="en">UDDI Value Set API Service</name>
                <description xml:lang="en">Web Service supporting UDDI Value Set Validation service. This service provides tModel value validation and is
                     configured using the jUDDI Publisher Service</description>
@@ -562,7 +562,7 @@ See below for other fields that you may want to edit...
           </businessService>
 	
 	
-          <businessService serviceKey="uddi:juddi.apache.org:services-valueset-cache" businessKey="uddi:juddi.apache.org:businesses-asf">
+          <businessService serviceKey="uddi:juddi.apache.org:services-valueset-cache" businessKey="uddi:juddi.apache.org:node1">
                <name xml:lang="en">UDDI Value Set Caching API Service</name>
                <description xml:lang="en">Web Service supporting UDDI Value Set Caching service. This service provides tModel value validation and is
                     configured using the jUDDI Publisher Service</description>
@@ -601,7 +601,7 @@ See below for other fields that you may want to edit...
 	
 
 
-          <businessService serviceKey="uddi:juddi.apache.org:replication" businessKey="uddi:juddi.apache.org:businesses-asf">
+          <businessService serviceKey="uddi:juddi.apache.org:replication" businessKey="uddi:juddi.apache.org:node1">
                <name xml:lang="en">UDDI Replication API Version 3</name>
                <description xml:lang="en">UDDI Replication API Version 3</description>
                <bindingTemplates>
@@ -625,7 +625,7 @@ See below for other fields that you may want to edit...
 	
                 
           <!-- juddi api service -->
-          <businessService serviceKey="uddi:juddi.apache.org:services-publisher" businessKey="uddi:juddi.apache.org:businesses-asf">
+          <businessService serviceKey="uddi:juddi.apache.org:services-publisher" businessKey="uddi:juddi.apache.org:node1">
                <name xml:lang="en">jUDDI Publisher Service</name>
                <description xml:lang="en">Web Service supporting jUDDI specific API</description>
                <bindingTemplates>

http://git-wip-us.apache.org/repos/asf/juddi/blob/20d9dff5/juddi-core/src/test/java/org/apache/juddi/api/impl/API_150_ValueSetValidationTest.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/test/java/org/apache/juddi/api/impl/API_150_ValueSetValidationTest.java b/juddi-core/src/test/java/org/apache/juddi/api/impl/API_150_ValueSetValidationTest.java
index b797aaa..2e63c35 100644
--- a/juddi-core/src/test/java/org/apache/juddi/api/impl/API_150_ValueSetValidationTest.java
+++ b/juddi-core/src/test/java/org/apache/juddi/api/impl/API_150_ValueSetValidationTest.java
@@ -104,7 +104,7 @@ public class API_150_ValueSetValidationTest {
                         Assert.fail("Could not obtain authInfo token.");
                 }
         }
-        final static String VSV_KEY = "uddi:juddi.apache.org:businesses-asf";
+        static String VSV_KEY = "uddi:juddi.apache.org:node1";
         //VIA InVM transport
         final static String VSV_BT_KEY = "uddi:juddi.apache.org:servicebindings-valueset-cp";
         //VIA JAXWS Transport "uddi:juddi.apache.org:servicebindings-valueset-ws";
@@ -341,7 +341,7 @@ public class API_150_ValueSetValidationTest {
                 tm.setCategoryBag(new CategoryBag());
                 tm.setName(new Name("My Custom validated key", "en"));
                 tm.getDescription().add(new Description("valid values include 'one', 'two', 'three'", "en"));
-                tm.getCategoryBag().getKeyedReference().add(new KeyedReference(UDDIConstants.OWNING_BUSINESS, "", "uddi:juddi.apache.org:businesses-asf"));
+                tm.getCategoryBag().getKeyedReference().add(new KeyedReference(UDDIConstants.OWNING_BUSINESS, "",VSV_KEY));
                 SaveTModel stm = new SaveTModel();
                 stm.setAuthInfo(authInfoJoe);
                 stm.getTModel().add(tm);
@@ -632,7 +632,7 @@ public class API_150_ValueSetValidationTest {
                 tm.setName(new Name("My new tmodel", "en"));
                 tm.getDescription().add(new Description("valid values include 'one', 'two', 'three'", "en"));
                 tm.setCategoryBag(new CategoryBag());
-                tm.getCategoryBag().getKeyedReference().add(new KeyedReference(UDDIConstants.IS_REPLACED_BY, "", "uddi:juddi.apache.org:businesses-asf"));
+                tm.getCategoryBag().getKeyedReference().add(new KeyedReference(UDDIConstants.IS_REPLACED_BY, "",VSV_KEY));
                 SaveTModel stm = new SaveTModel();
                 stm.setAuthInfo(authInfoJoe);
                 stm.getTModel().add(tm);

http://git-wip-us.apache.org/repos/asf/juddi/blob/20d9dff5/juddi-rest-cxf/src/test/java/org/apache/juddi/api/impl/rest/UDDIInquiryJAXRSTest.java
----------------------------------------------------------------------
diff --git a/juddi-rest-cxf/src/test/java/org/apache/juddi/api/impl/rest/UDDIInquiryJAXRSTest.java b/juddi-rest-cxf/src/test/java/org/apache/juddi/api/impl/rest/UDDIInquiryJAXRSTest.java
index 61d066a..c62d288 100644
--- a/juddi-rest-cxf/src/test/java/org/apache/juddi/api/impl/rest/UDDIInquiryJAXRSTest.java
+++ b/juddi-rest-cxf/src/test/java/org/apache/juddi/api/impl/rest/UDDIInquiryJAXRSTest.java
@@ -56,7 +56,7 @@ import org.uddi.sub_v3.KeyBag;
 public class UDDIInquiryJAXRSTest extends Assert {
 
         private final static String ENDPOINT_ADDRESS = "http://localhost:8080/rest";
-        private final static String JUDDI_BIZ = "uddi:juddi.apache.org:businesses-asf";
+        private final static String JUDDI_BIZ ="uddi:juddi.apache.org:node1";
         private final static String JUDDI_SVC = "uddi:juddi.apache.org:services-inquiry";
         private final static String JUDDI_BT = "uddi:juddi.apache.org:servicebindings-inquiry-ws";
         private final static String JUDDI_TMODEL = "uddi:uddi.org:transport:smtp";

http://git-wip-us.apache.org/repos/asf/juddi/blob/20d9dff5/juddiv3-war/src/main/webapp/WEB-INF/classes/juddiv3.xml
----------------------------------------------------------------------
diff --git a/juddiv3-war/src/main/webapp/WEB-INF/classes/juddiv3.xml b/juddiv3-war/src/main/webapp/WEB-INF/classes/juddiv3.xml
index 788fdf1..f7c5555 100644
--- a/juddiv3-war/src/main/webapp/WEB-INF/classes/juddiv3.xml
+++ b/juddiv3-war/src/main/webapp/WEB-INF/classes/juddiv3.xml
@@ -26,7 +26,7 @@
 			<!-- 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>
+			<businessId>uddi:juddi.apache.org:node1</businessId>
 			<partition>uddi:juddi.apache.org</partition>
 		</root>
 		<seed>


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


[6/9] juddi git commit: JUDDI-241 get/set replication cfg now works for all sub elements. notify changes works, however getChangeRecords fails when called from within the tomcat container.

Posted by al...@apache.org.
http://git-wip-us.apache.org/repos/asf/juddi/blob/22a846dd/juddi-core/src/main/java/org/apache/juddi/replication/ReplicationNotifier.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/replication/ReplicationNotifier.java b/juddi-core/src/main/java/org/apache/juddi/replication/ReplicationNotifier.java
index e2e11ca..132c530 100644
--- a/juddi-core/src/main/java/org/apache/juddi/replication/ReplicationNotifier.java
+++ b/juddi-core/src/main/java/org/apache/juddi/replication/ReplicationNotifier.java
@@ -16,6 +16,7 @@
  */
 package org.apache.juddi.replication;
 
+import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Queue;
@@ -25,6 +26,7 @@ import java.util.concurrent.ConcurrentLinkedQueue;
 import javax.persistence.EntityManager;
 import javax.persistence.EntityTransaction;
 import javax.persistence.Query;
+import javax.xml.bind.JAXB;
 import javax.xml.ws.BindingProvider;
 import org.apache.commons.configuration.ConfigurationException;
 import org.apache.commons.logging.Log;
@@ -41,6 +43,7 @@ import org.uddi.repl_v3.ChangeRecordIDType;
 import org.uddi.repl_v3.CommunicationGraph;
 import org.uddi.repl_v3.HighWaterMarkVectorType;
 import org.uddi.repl_v3.NotifyChangeRecordsAvailable;
+import org.uddi.repl_v3.Operator;
 import org.uddi.v3_service.UDDIReplicationPortType;
 
 /**
@@ -104,6 +107,7 @@ public class ReplicationNotifier extends TimerTask {
                         tx = em.getTransaction();
                         tx.begin();
 
+                        
                         em.persist(j);
                         tx.commit();
                 } catch (Exception ex) {
@@ -111,6 +115,7 @@ public class ReplicationNotifier extends TimerTask {
                         if (tx != null && tx.isActive()) {
                                 tx.rollback();
                         }
+                        JAXB.marshal(MappingModelToApi.mapChangeRecord(j), System.out);
                 } finally {
                         em.close();
                 }
@@ -121,7 +126,7 @@ public class ReplicationNotifier extends TimerTask {
                 //TODO figure out what this statement means 7.5.3
                 /**
                  * In the absence of a communicationGraph element from the
-                 * Replication Configuration Structure, all nodes listed in the
+                 * Replication Configuration Structure (although it's mandatory in the xsd), all nodes listed in the
                  * node element MAY send any and all messages to any other node
                  * of the registry.
                  */
@@ -130,37 +135,60 @@ public class ReplicationNotifier extends TimerTask {
                         return;
 
                 }
+                List<String> destinationUrls = new ArrayList<String>();
+
+                for (Operator o:repcfg.getOperator())
+                {
+                        //no need to tell myself about a change at myself
+                        if (!o.getOperatorNodeID().equalsIgnoreCase(node))
+                                 destinationUrls.add(o.getSoapReplicationURL());
+                }
+                /*
+                Iterator<String> iterator = repcfg.getCommunicationGraph().getNode().iterator();
+                while (iterator.hasNext()) {
+                        String next = iterator.next();
+                        
+                        Node destinationNode = getNode(next);
+                        if (destinationNode == null) {
+                                log.warn(next + " node was not found, cannot deliver replication messages");
+                        } else {
+                                destinationUrls.add(destinationNode.getReplicationUrl());
+                        }
+                }
                 Iterator<CommunicationGraph.Edge> it = repcfg.getCommunicationGraph().getEdge().iterator();
 
                 while (it.hasNext()) {
                         //send each change set to the replication node in the graph
 
-                        UDDIReplicationPortType x = new UDDIService().getUDDIReplicationPort();
+                        
                         CommunicationGraph.Edge next = it.next();
                         //next.getMessageReceiver(); //Node ID
-                        Node destinationNode = getNode(next.getMessageSender());
+                        Node destinationNode = getNode(next.getMessageReceiver());
                         if (destinationNode == null) {
-                                log.warn(next.getMessageSender() + " node was not found, cannot deliver replication messages");
+                                log.warn(next.getMessageReceiver() + " node was not found, cannot deliver replication messages");
                         } else {
-                                //TODO the spec talks about control messages, should we even support it? seems pointless
-                                ((BindingProvider) x).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, destinationNode.getReplicationUrl());
-                                NotifyChangeRecordsAvailable req = new NotifyChangeRecordsAvailable();
-
-                                req.setNotifyingNode(node);
-                                HighWaterMarkVectorType highWaterMarkVectorType = new HighWaterMarkVectorType();
-                              
-                                highWaterMarkVectorType.getHighWaterMark().add(new ChangeRecordIDType(node, j.getId()));
-                                req.setChangesAvailable(highWaterMarkVectorType);
-
-                                try {
-                                        x.notifyChangeRecordsAvailable(req);
-                                        log.info("Successfully sent change record available message to " + destinationNode.getName());
-                                } catch (Exception ex) {
-                                        log.warn("Unable to send change notification to " + destinationNode.getName(), ex);
-                                }
+                                destinationUrls.add(destinationNode.getReplicationUrl());
                         }
-                }
+                }*/
+                for (String s : destinationUrls) {
+                        //TODO the spec talks about control messages, should we even support it? seems pointless
+                        UDDIReplicationPortType x = new UDDIService().getUDDIReplicationPort();
+                        ((BindingProvider) x).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, s);
+                        NotifyChangeRecordsAvailable req = new NotifyChangeRecordsAvailable();
+
+                        req.setNotifyingNode(node);
+                        HighWaterMarkVectorType highWaterMarkVectorType = new HighWaterMarkVectorType();
 
+                        highWaterMarkVectorType.getHighWaterMark().add(new ChangeRecordIDType(node, j.getId()));
+                        req.setChangesAvailable(highWaterMarkVectorType);
+
+                        try {
+                                x.notifyChangeRecordsAvailable(req);
+                                log.info("Successfully sent change record available message to " + s);
+                        } catch (Exception ex) {
+                                log.warn("Unable to send change notification to " + s, ex);
+                        }
+                }
         }
 
         public synchronized void run() {
@@ -193,19 +221,19 @@ public class ReplicationNotifier extends TimerTask {
                 try {
                         tx = em.getTransaction();
                         tx.begin();
-                        Query q = em.createQuery("SELECT item FROM ReplicationConfiguration item");
+                        Query q = em.createQuery("SELECT item FROM ReplicationConfiguration item order by item.serialNumber DESC");
                         q.setMaxResults(1);
-                        List<ReplicationConfiguration> results = (List<ReplicationConfiguration>) q.getResultList();
+                        ReplicationConfiguration results = (ReplicationConfiguration) q.getSingleResult();
                         //   ReplicationConfiguration find = em.find(ReplicationConfiguration.class, null);
-                        if (results != null && !results.isEmpty()) {
-                                MappingModelToApi.mapReplicationConfiguration(results.get(0), item);
-                        } else {
-                                item = null;
+                        if (results != null) {
+                                MappingModelToApi.mapReplicationConfiguration(results, item);
                         }
+
                         tx.commit();
                         return item;
                 } catch (Exception ex) {
-                        log.error("error", ex);
+                        //log.error("error", ex);
+                        //no config available
                         if (tx != null && tx.isActive()) {
                                 tx.rollback();
                         }

http://git-wip-us.apache.org/repos/asf/juddi/blob/22a846dd/juddi-core/src/main/java/org/apache/juddi/validation/ValidateNode.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/validation/ValidateNode.java b/juddi-core/src/main/java/org/apache/juddi/validation/ValidateNode.java
index 07fe653..573f39b 100644
--- a/juddi-core/src/main/java/org/apache/juddi/validation/ValidateNode.java
+++ b/juddi-core/src/main/java/org/apache/juddi/validation/ValidateNode.java
@@ -87,7 +87,7 @@ public class ValidateNode extends ValidateUDDIApi {
                         throw new ValueNotAllowedException(new ErrorMessage("errors.node.NoPUB"));
                 }
                 if (node.getSubscriptionListenerUrl() == null || node.getSubscriptionListenerUrl().length() == 0 || node.getSubscriptionListenerUrl().length() > 255) {
-                        throw new ValueNotAllowedException(new ErrorMessage("errors.node.NoSUBL"));
+                //        throw new ValueNotAllowedException(new ErrorMessage("errors.node.NoSUBL"));
                 }
                 if (node.getReplicationUrl() == null || node.getReplicationUrl().length() == 0 || node.getReplicationUrl().length() > 255) {
                         //throw new ValueNotAllowedException(new ErrorMessage("errors.node.NoSUBL"));
@@ -96,6 +96,9 @@ public class ValidateNode extends ValidateUDDIApi {
                 if (node.getSubscriptionUrl() == null || node.getSubscriptionUrl().length() == 0 || node.getSubscriptionUrl().length() > 255) {
                         throw new ValueNotAllowedException(new ErrorMessage("errors.node.NoSUB"));
                 }
+                if (node.getSecurityUrl()== null || node.getSecurityUrl().length() == 0 || node.getSecurityUrl().length() > 255) {
+                        throw new ValueNotAllowedException(new ErrorMessage("errors.node.NoSec"));
+                }
                 if (node.getProxyTransport() == null || node.getProxyTransport().length() == 0 || node.getProxyTransport().length() > 255) {
                         throw new ValueNotAllowedException(new ErrorMessage("errors.node.NoProxy"));
                 } else {

http://git-wip-us.apache.org/repos/asf/juddi/blob/22a846dd/juddi-core/src/main/java/org/apache/juddi/validation/ValidateReplication.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/validation/ValidateReplication.java b/juddi-core/src/main/java/org/apache/juddi/validation/ValidateReplication.java
index 6ede348..97da3ff 100644
--- a/juddi-core/src/main/java/org/apache/juddi/validation/ValidateReplication.java
+++ b/juddi-core/src/main/java/org/apache/juddi/validation/ValidateReplication.java
@@ -17,6 +17,7 @@
 package org.apache.juddi.validation;
 
 import java.math.BigInteger;
+import java.util.List;
 import javax.persistence.EntityManager;
 import javax.xml.ws.WebServiceContext;
 import org.apache.juddi.model.Node;
@@ -28,6 +29,7 @@ import org.apache.juddi.v3.error.ValueNotAllowedException;
 import org.uddi.repl_v3.CommunicationGraph.Edge;
 import org.uddi.repl_v3.HighWaterMarkVectorType;
 import org.uddi.repl_v3.NotifyChangeRecordsAvailable;
+import org.uddi.repl_v3.Operator;
 import org.uddi.repl_v3.ReplicationConfiguration;
 import org.uddi.v3_service.DispositionReportFaultMessage;
 
@@ -115,31 +117,46 @@ public class ValidateReplication extends ValidateUDDIApi {
                 return false;
         }
 
-        public void validateSetReplicationNodes(ReplicationConfiguration replicationConfiguration, EntityManager em) throws DispositionReportFaultMessage {
+        public void validateSetReplicationNodes(ReplicationConfiguration replicationConfiguration, EntityManager em, String thisnode) throws DispositionReportFaultMessage {
                 if (replicationConfiguration == null) {
                         throw new InvalidValueException(new ErrorMessage("errors.replication.configNull"));
 
                 }
+                if (replicationConfiguration.getCommunicationGraph() == null) {
+                        throw new InvalidValueException(new ErrorMessage("errors.replication.configNull"));
+                }
+                if (replicationConfiguration.getRegistryContact() == null) {
+                        throw new InvalidValueException(new ErrorMessage("errors.replication.contactNull"));
+                }
+                if (replicationConfiguration.getRegistryContact().getContact() == null) {
+                        throw new InvalidValueException(new ErrorMessage("errors.replication.contactNull"));
+                }
+                if (replicationConfiguration.getRegistryContact().getContact().getPersonName().get(0) == null) {
+                        throw new InvalidValueException(new ErrorMessage("errors.replication.contactNull"));
+                }
+
                 if (replicationConfiguration.getCommunicationGraph() != null) {
                         for (String s : replicationConfiguration.getCommunicationGraph().getNode()) {
-                                Node find = em.find(org.apache.juddi.model.Node.class, s);
-                                if (find == null) {
+                                if (!Contains(replicationConfiguration.getOperator(), s)) {
                                         throw new InvalidValueException(new ErrorMessage("errors.replication.configNodeNotFound"));
                                 }
                         }
                         for (Edge s : replicationConfiguration.getCommunicationGraph().getEdge()) {
-                                Node find = em.find(org.apache.juddi.model.Node.class, s.getMessageReceiver());
-                                if (find == null) {
+                                //TODO revisit this for correctness
+                                //Node find = null;
+                                //if (!thisnode.equalsIgnoreCase(s.getMessageReceiver())) {
+                                if (!Contains(replicationConfiguration.getOperator(), s.getMessageReceiver())) {
                                         throw new InvalidValueException(new ErrorMessage("errors.replication.configNodeNotFound"));
+                                        //}
                                 }
-                                find = null;
-                                find = em.find(org.apache.juddi.model.Node.class, s.getMessageSender());
-                                if (find == null) {
+                                //find = null;
+                                //if (!thisnode.equalsIgnoreCase(s.getMessageSender())) {
+                                if (!Contains(replicationConfiguration.getOperator(), s.getMessageSender())) {
                                         throw new InvalidValueException(new ErrorMessage("errors.replication.configNodeNotFound"));
+                                        //}
                                 }
                                 for (String id : s.getMessageReceiverAlternate()) {
-                                        find = em.find(org.apache.juddi.model.Node.class, id);
-                                        if (find == null) {
+                                        if (!Contains(replicationConfiguration.getOperator(), id)) {
                                                 throw new InvalidValueException(new ErrorMessage("errors.replication.configNodeNotFound"));
                                         }
                                 }
@@ -148,4 +165,16 @@ public class ValidateReplication extends ValidateUDDIApi {
                 }
         }
 
+        private boolean Contains(List<Operator> operator, String s) {
+                if (operator == null) {
+                        return false;
+                }
+                for (Operator o : operator) {
+                        if (o.getOperatorNodeID().equalsIgnoreCase(s)) {
+                                return true;
+                        }
+                }
+                return false;
+        }
+
 }

http://git-wip-us.apache.org/repos/asf/juddi/blob/22a846dd/juddi-core/src/main/resources/messages.properties
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/resources/messages.properties b/juddi-core/src/main/resources/messages.properties
index 0a23c78..95d98ce 100644
--- a/juddi-core/src/main/resources/messages.properties
+++ b/juddi-core/src/main/resources/messages.properties
@@ -243,6 +243,7 @@ errors.node.NoPUB=A publish url was not specified
 errors.node.NoIN=A inquiry url was not specified
 errors.node.NoSUBL=A subscription listener url was not specified
 errors.node.NoSUB=A subscription url was not specified
+errors.node.NoSec=A security url was not specified
 errors.node.NoProxy=A transport proxy class must be specified. If you're not sure, use 'org.apache.juddi.v3.client.transport.JAXWSTransport'
 errors.node.illegalProxyTransport=The transport proxy class is invalid. If you're not sure, use 'org.apache.juddi.v3.client.transport.JAXWSTransport'
 errors.node.NoRMIData=When using org.apache.juddi.v3.client.transport.RMITransport the factory settings must be specified
@@ -291,6 +292,7 @@ errors.replication.bothLimitsSpecified=responseLimitCount or responseLimitVector
 errors.replication.negativeLimit=The specified response limit is either 0 or a negative number.
 errors.replication.limitVectorNull=The high water mark vector limit specified OriginatingUSN is null or invalid
 errors.replication.limitVectorNoNode=No node name was specified
-errors.replication.configNodeNotFound=No specified node name is not currently registered as a node. Use the jUDDI Service API to register it. Node id: 
+errors.replication.configNodeNotFound=No specified node name is not currently listed as a Operator. Add it to the list and try again. Id:
 errors.replication.configNull=No replication config was present in the message
+errors.replication.contactNull=No replication contact was present in the message
 errors.deleteNode.InReplicationConfig=The node to be deleted is currently referenced in the replication configuration. You must revise the configuration before deleting the node, 

http://git-wip-us.apache.org/repos/asf/juddi/blob/22a846dd/juddi-core/src/test/java/org/apache/juddi/api/impl/API_160_ReplicationTest.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/test/java/org/apache/juddi/api/impl/API_160_ReplicationTest.java b/juddi-core/src/test/java/org/apache/juddi/api/impl/API_160_ReplicationTest.java
index f64512f..98bdb0b 100644
--- a/juddi-core/src/test/java/org/apache/juddi/api/impl/API_160_ReplicationTest.java
+++ b/juddi-core/src/test/java/org/apache/juddi/api/impl/API_160_ReplicationTest.java
@@ -19,6 +19,7 @@ import java.math.BigInteger;
 import java.rmi.RemoteException;
 import java.util.List;
 import java.util.UUID;
+import javax.xml.bind.JAXB;
 import org.apache.commons.configuration.ConfigurationException;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -40,12 +41,16 @@ import org.junit.AfterClass;
 import org.junit.Assert;
 import org.junit.BeforeClass;
 import org.junit.Test;
+import org.uddi.api_v3.Contact;
 import org.uddi.api_v3.DispositionReport;
+import org.uddi.api_v3.PersonName;
 import org.uddi.repl_v3.ChangeRecord;
 import org.uddi.repl_v3.ChangeRecordIDType;
 import org.uddi.repl_v3.CommunicationGraph;
 import org.uddi.repl_v3.DoPing;
 import org.uddi.repl_v3.HighWaterMarkVectorType;
+import org.uddi.repl_v3.Operator;
+import org.uddi.repl_v3.OperatorStatusType;
 import org.uddi.repl_v3.ReplicationConfiguration;
 import org.uddi.v3_service.DispositionReportFaultMessage;
 import org.uddi.v3_service.UDDIReplicationPortType;
@@ -126,8 +131,8 @@ public class API_160_ReplicationTest {
         }
 
         /**
-         * add a clerk and node, delete the clerk, then check that the node is still there
-         * it should have been deleted
+         * add a clerk and node, delete the clerk, then check that the node is
+         * still there it should have been deleted
          *
          * @throws Exception
          */
@@ -177,13 +182,13 @@ public class API_160_ReplicationTest {
                 //TODO revise cascade deletes on nodes and clerks
                 Assert.fail("node unexpectedly deleted");
         }
-        
-        
+
         /**
          * add clerk + node, try to delete the node
-         * @throws Exception 
+         *
+         * @throws Exception
          */
-         @Test
+        @Test
         public void testAddClerkNodeThenDelete2() throws Exception {
                 SaveClerk sc = new SaveClerk();
                 sc.setAuthInfo(authInfoRoot);
@@ -210,8 +215,7 @@ public class API_160_ReplicationTest {
 
                 juddi.deleteNode(new DeleteNode(authInfoRoot, c.getNode().getName()));
                 //this should success
-                
-                
+
                 //the clerk should be gone too
                 ClerkList allNodes = juddi.getAllClerks(authInfoRoot);
                 boolean found = false;
@@ -227,10 +231,10 @@ public class API_160_ReplicationTest {
                 NodeList allNodes1 = juddi.getAllNodes(authInfoRoot);
                 for (int i = 0; i < allNodes1.getNode().size(); i++) {
                         if (allNodes1.getNode().get(i).getName().equals(c.getNode().getName())) {
-                                 Assert.fail("node is still there!");
+                                Assert.fail("node is still there!");
                         }
                 }
-                
+
         }
 
         @Test
@@ -264,14 +268,12 @@ public class API_160_ReplicationTest {
                 juddi.saveNode(saveNode);
 
                 juddi.saveClerk(sc);
-                
+
                 //success
-                
-                
                 //delete it
-                juddi.deleteClerk(new DeleteClerk(authInfoRoot,c.getName()));
-                System.out.println(c.getName()+" deleted");
-                
+                juddi.deleteClerk(new DeleteClerk(authInfoRoot, c.getName()));
+                System.out.println(c.getName() + " deleted");
+
                 juddi.deleteNode(new DeleteNode(authInfoRoot, c.getNode().getName()));
                 //confirm it's gone
                 NodeList allNodes = juddi.getAllNodes(authInfoRoot);
@@ -288,30 +290,23 @@ public class API_160_ReplicationTest {
         @Test
         public void setReplicationConfig() throws Exception {
 
-                Node node = new Node();
-                node.setName("test_node");
-                node.setClientName("test_client");
-                node.setProxyTransport(org.apache.juddi.v3.client.transport.JAXWSTransport.class.getCanonicalName());
-                node.setCustodyTransferUrl("http://localhost");
-                node.setDescription("http://localhost");
-                node.setInquiryUrl("http://localhost");
-                node.setPublishUrl("http://localhost");
-                node.setReplicationUrl("http://localhost");
-                node.setSecurityUrl("http://localhost");
-                node.setSubscriptionListenerUrl("http://localhost");
-                node.setSubscriptionUrl("http://localhost");
-
-                SaveNode saveNode = new SaveNode();
-                saveNode.setAuthInfo(authInfoRoot);
-                saveNode.getNode().add(node);
-
-                juddi.saveNode(saveNode);
+               
 
                 ReplicationConfiguration r = new ReplicationConfiguration();
+                Operator op = new Operator();
+                op.setOperatorNodeID("test_node");
+                op.setSoapReplicationURL("http://localhost");
+                op.setOperatorStatus(OperatorStatusType.NORMAL);
+                
+                r.getOperator().add(op);
                 r.setCommunicationGraph(new CommunicationGraph());
-              //  r.getCommunicationGraph().getEdge().add(new CommunicationGraph.Edge());
+                r.setRegistryContact(new ReplicationConfiguration.RegistryContact());
+                r.getRegistryContact().setContact(new Contact());
+                r.getRegistryContact().getContact().getPersonName().add(new PersonName("test", null));
+                //  r.getCommunicationGraph().getEdge().add(new CommunicationGraph.Edge());
                 r.getCommunicationGraph().getNode().add("test_node");
 
+                JAXB.marshal(r, System.out);
                 DispositionReport setReplicationNodes = juddi.setReplicationNodes(authInfoRoot, r);
 
                 ReplicationConfiguration replicationNodes = juddi.getReplicationNodes(authInfoRoot);
@@ -323,17 +318,20 @@ public class API_160_ReplicationTest {
                 Assert.assertNotNull(replicationNodes.getTimeOfConfigurationUpdate());
                 Assert.assertNotNull(replicationNodes.getSerialNumber());
                 long firstcommit = replicationNodes.getSerialNumber();
-                
-                
-                
-                 r = new ReplicationConfiguration();
+
+                r = new ReplicationConfiguration();
+                r.getOperator().add(op);
                 r.setCommunicationGraph(new CommunicationGraph());
-              //  r.getCommunicationGraph().getEdge().add(new CommunicationGraph.Edge());
+                r.setRegistryContact(new ReplicationConfiguration.RegistryContact());
+                r.getRegistryContact().setContact(new Contact());
+                r.getRegistryContact().getContact().getPersonName().add(new PersonName("test", null));
+                //  r.getCommunicationGraph().getEdge().add(new CommunicationGraph.Edge());
                 r.getCommunicationGraph().getNode().add("test_node");
 
-                 setReplicationNodes = juddi.setReplicationNodes(authInfoRoot, r);
+                JAXB.marshal(r, System.out);
+                setReplicationNodes = juddi.setReplicationNodes(authInfoRoot, r);
 
-                 replicationNodes = juddi.getReplicationNodes(authInfoRoot);
+                replicationNodes = juddi.getReplicationNodes(authInfoRoot);
                 Assert.assertNotNull(replicationNodes.getCommunicationGraph());
                 Assert.assertNotNull(replicationNodes.getCommunicationGraph().getNode());
                 Assert.assertEquals("test_node", replicationNodes.getCommunicationGraph().getNode().get(0));
@@ -344,4 +342,60 @@ public class API_160_ReplicationTest {
                 Assert.assertTrue(firstcommit < replicationNodes.getSerialNumber());
 
         }
+
+        @Test
+        public void setReplicationConfig2() throws Exception {
+
+                
+
+                ReplicationConfiguration r = new ReplicationConfiguration();
+                Operator op = new Operator();
+                op.setOperatorNodeID("test_node");
+                op.setSoapReplicationURL("http://localhost");
+                op.setOperatorStatus(OperatorStatusType.NORMAL);
+                
+                r.getOperator().add(op);
+                r.setCommunicationGraph(new CommunicationGraph());
+                r.setRegistryContact(new ReplicationConfiguration.RegistryContact());
+                r.getRegistryContact().setContact(new Contact());
+                r.getRegistryContact().getContact().getPersonName().add(new PersonName("test", null));
+                //  r.getCommunicationGraph().getEdge().add(new CommunicationGraph.Edge());
+                r.getCommunicationGraph().getNode().add("test_node");
+                r.getCommunicationGraph().getControlledMessage().add("doPing");
+                r.getCommunicationGraph().getEdge().add(new CommunicationGraph.Edge());
+                r.getCommunicationGraph().getEdge().get(0).setMessageReceiver("test_node");
+                r.getCommunicationGraph().getEdge().get(0).setMessageSender("test_node");
+                r.getCommunicationGraph().getEdge().get(0).getMessage().add("doPing");
+                r.getCommunicationGraph().getEdge().get(0).getMessageReceiverAlternate().add("test_node");
+                
+                DispositionReport setReplicationNodes = juddi.setReplicationNodes(authInfoRoot, r);
+
+                ReplicationConfiguration replicationNodes = juddi.getReplicationNodes(authInfoRoot);
+                Assert.assertNotNull(replicationNodes.getCommunicationGraph());
+                Assert.assertNotNull(replicationNodes.getCommunicationGraph().getNode());
+                Assert.assertEquals("test_node", replicationNodes.getCommunicationGraph().getNode().get(0));
+                Assert.assertNotNull(replicationNodes.getMaximumTimeToGetChanges());
+                Assert.assertNotNull(replicationNodes.getMaximumTimeToSyncRegistry());
+                Assert.assertNotNull(replicationNodes.getTimeOfConfigurationUpdate());
+                Assert.assertNotNull(replicationNodes.getSerialNumber());
+
+        }
+
+        //TODO edges can be listed only once and must be unique
+        //TODO In the absence of a communicationGraph element from the Replication Configuration Structure, all nodes listed in the node element MAY send any and all messages to any other node of the registry.
+        //implies that communicationGraph may be null or empty ,despite the xsd
+        @Test
+        public void getReplicationConfigMandatoryItems() throws Exception {
+
+                ReplicationConfiguration replicationNodes = juddi.getReplicationNodes(authInfoRoot);
+                Assert.assertNotNull(replicationNodes);
+                Assert.assertNotNull(replicationNodes.getCommunicationGraph());
+                Assert.assertNotNull(replicationNodes.getTimeOfConfigurationUpdate());
+                Assert.assertNotNull(replicationNodes.getMaximumTimeToGetChanges());
+                Assert.assertNotNull(replicationNodes.getMaximumTimeToSyncRegistry());
+                Assert.assertNotNull(replicationNodes.getRegistryContact());
+                Assert.assertNotNull(replicationNodes.getRegistryContact().getContact());
+                Assert.assertNotNull(replicationNodes.getRegistryContact().getContact().getPersonName().get(0));
+
+        }
 }

http://git-wip-us.apache.org/repos/asf/juddi/blob/22a846dd/juddi-core/src/test/java/org/apache/juddi/api/runtime/CLIServerTest.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/test/java/org/apache/juddi/api/runtime/CLIServerTest.java b/juddi-core/src/test/java/org/apache/juddi/api/runtime/CLIServerTest.java
new file mode 100644
index 0000000..4c172b9
--- /dev/null
+++ b/juddi-core/src/test/java/org/apache/juddi/api/runtime/CLIServerTest.java
@@ -0,0 +1,119 @@
+/*
+ * Copyright 2014 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+package org.apache.juddi.api.runtime;
+
+import java.math.BigInteger;
+import java.util.Random;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Endpoint;
+import junit.framework.Assert;
+import org.apache.commons.configuration.ConfigurationException;
+import org.apache.juddi.v3.client.JUDDIApiService;
+import org.apache.juddi.v3_service.JUDDIApiPortType;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.uddi.repl_v3.HighWaterMarkVectorType;
+import org.uddi.repl_v3.ReplicationConfiguration;
+import org.uddi.v3_service.UDDIReplicationPortType;
+import org.apache.juddi.v3.client.UDDIService;
+import org.uddi.api_v3.Contact;
+import org.uddi.api_v3.PersonName;
+import org.uddi.repl_v3.CommunicationGraph;
+import org.uddi.repl_v3.DoPing;
+
+/**
+ *
+ * @author alex
+ */
+public class CLIServerTest {
+
+        @AfterClass
+        public static void stopManager() throws ConfigurationException {
+                replication.stop();
+                replication = null;
+                juddiapi.stop();
+                juddiapi = null;
+        }
+
+        static Endpoint replication = null;
+        static Endpoint juddiapi = null;
+        static String replUrl = null;
+        static String juddiUrl = null;
+        static boolean sink = false;
+     static  replicantImpl repl= new replicantImpl();
+      static  juddiTestimpl jude= new juddiTestimpl();
+
+        @BeforeClass
+        public static void startManager() throws Exception {
+               
+                Random r = new Random(System.currentTimeMillis());
+                replUrl = "http://localhost:" + (7000 + r.nextInt(1000)) + "/repl";
+                replication = Endpoint.publish(replUrl, repl);
+
+                juddiUrl = "http://localhost:" + (7000 + r.nextInt(1000)) + "/juddi";
+                juddiapi = Endpoint.publish(juddiUrl, jude);
+                System.out.println("Endpoint up at " + replUrl);
+                System.out.println("Endpoint up at " + juddiUrl);
+        }
+
+        @Test
+        public void testGetReplicationConfig() throws Exception {
+
+                JUDDIApiPortType juddiApiService = new JUDDIApiService().getJUDDIApiImplPort();
+                ((BindingProvider) juddiApiService).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, juddiUrl);
+                juddiApiService.getReplicationNodes(null);
+                Assert.assertTrue(sink);
+                sink = false;
+        }
+        
+        @Test
+        public void testSetReplicationConfig() throws Exception {
+
+                JUDDIApiPortType juddiApiService = new JUDDIApiService().getJUDDIApiImplPort();
+                ((BindingProvider) juddiApiService).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, juddiUrl);
+                ReplicationConfiguration replicationConfiguration = new ReplicationConfiguration();
+                replicationConfiguration.setCommunicationGraph(new CommunicationGraph());
+                replicationConfiguration.setRegistryContact(new ReplicationConfiguration.RegistryContact());
+                replicationConfiguration.getRegistryContact().setContact(new Contact());
+                        replicationConfiguration.getRegistryContact().getContact().getPersonName().add(new PersonName("name", null));
+
+                juddiApiService.setReplicationNodes(null, replicationConfiguration);
+                Assert.assertTrue(sink);
+                sink = false;
+        }
+        
+         @Test
+        public void testReplicationGetChanges() throws Exception {
+
+                UDDIReplicationPortType juddiApiService = new UDDIService().getUDDIReplicationPort();
+                ((BindingProvider) juddiApiService).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, replUrl);
+                juddiApiService.getChangeRecords(null, new HighWaterMarkVectorType(), BigInteger.ONE, new HighWaterMarkVectorType());
+                Assert.assertTrue(sink);
+                sink = false;
+        }
+ @Test
+        public void testReplicationPing() throws Exception {
+
+                 UDDIReplicationPortType juddiApiService = new UDDIService().getUDDIReplicationPort();
+                ((BindingProvider) juddiApiService).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, replUrl);
+                juddiApiService.doPing(new DoPing());//null, new HighWaterMarkVectorType(), BigInteger.ONE, new HighWaterMarkVectorType());
+                Assert.assertTrue(sink);
+                sink = false;
+        }
+
+
+}

http://git-wip-us.apache.org/repos/asf/juddi/blob/22a846dd/juddi-core/src/test/java/org/apache/juddi/api/runtime/juddiTestimpl.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/test/java/org/apache/juddi/api/runtime/juddiTestimpl.java b/juddi-core/src/test/java/org/apache/juddi/api/runtime/juddiTestimpl.java
new file mode 100644
index 0000000..c127137
--- /dev/null
+++ b/juddi-core/src/test/java/org/apache/juddi/api/runtime/juddiTestimpl.java
@@ -0,0 +1,188 @@
+/*
+ * Copyright 2014 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+package org.apache.juddi.api.runtime;
+
+import java.rmi.RemoteException;
+import java.util.List;
+import javax.jws.WebService;
+import javax.xml.ws.Holder;
+import org.apache.juddi.api_v3.AdminSaveBusinessWrapper;
+import org.apache.juddi.api_v3.AdminSaveTModelWrapper;
+import org.apache.juddi.api_v3.ClerkDetail;
+import org.apache.juddi.api_v3.ClerkList;
+import org.apache.juddi.api_v3.ClientSubscriptionInfoDetail;
+import org.apache.juddi.api_v3.DeleteClerk;
+import org.apache.juddi.api_v3.DeleteClientSubscriptionInfo;
+import org.apache.juddi.api_v3.DeleteNode;
+import org.apache.juddi.api_v3.DeletePublisher;
+import org.apache.juddi.api_v3.GetAllPublisherDetail;
+import org.apache.juddi.api_v3.GetPublisherDetail;
+import org.apache.juddi.api_v3.NodeDetail;
+import org.apache.juddi.api_v3.NodeList;
+import org.apache.juddi.api_v3.PublisherDetail;
+import org.apache.juddi.api_v3.SaveClerk;
+import org.apache.juddi.api_v3.SaveClientSubscriptionInfo;
+import org.apache.juddi.api_v3.SaveNode;
+import org.apache.juddi.api_v3.SavePublisher;
+import org.apache.juddi.api_v3.SubscriptionWrapper;
+import org.apache.juddi.api_v3.SyncSubscription;
+import org.apache.juddi.api_v3.SyncSubscriptionDetail;
+import org.apache.juddi.v3_service.JUDDIApiPortType;
+import org.uddi.api_v3.Contact;
+import org.uddi.api_v3.DeleteTModel;
+import org.uddi.api_v3.DispositionReport;
+import org.uddi.api_v3.PersonName;
+import org.uddi.repl_v3.CommunicationGraph;
+import org.uddi.repl_v3.ReplicationConfiguration;
+import org.uddi.sub_v3.Subscription;
+import org.uddi.v3_service.DispositionReportFaultMessage;
+
+/**
+ *
+ * @author alex
+ */
+
+@WebService(serviceName = "JUDDIApiService",
+        endpointInterface = "org.apache.juddi.v3_service.JUDDIApiPortType",
+        targetNamespace = "urn:juddi-apache-org:v3_service")
+public class juddiTestimpl implements JUDDIApiPortType {
+      
+
+        @Override
+        public PublisherDetail getPublisherDetail(GetPublisherDetail parameters) throws DispositionReportFaultMessage, RemoteException {
+                CLIServerTest.sink = true;
+                return null;
+        }
+
+        @Override
+        public void deleteClientSubscriptionInfo(DeleteClientSubscriptionInfo body) throws DispositionReportFaultMessage, RemoteException {
+                CLIServerTest.sink = true;
+        }
+
+        @Override
+        public PublisherDetail getAllPublisherDetail(GetAllPublisherDetail body) throws DispositionReportFaultMessage, RemoteException {
+                CLIServerTest.sink = true;
+                return null;
+        }
+
+        @Override
+        public ClerkDetail saveClerk(SaveClerk body) throws DispositionReportFaultMessage, RemoteException {
+                CLIServerTest.sink = true;
+                return null;
+        }
+
+        @Override
+        public void deletePublisher(DeletePublisher body) throws DispositionReportFaultMessage, RemoteException {
+                throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+        }
+
+        @Override
+        public NodeDetail saveNode(SaveNode body) throws DispositionReportFaultMessage, RemoteException {
+                CLIServerTest.sink = true;
+                return null;
+        }
+
+        @Override
+        public PublisherDetail savePublisher(SavePublisher body) throws DispositionReportFaultMessage, RemoteException {
+                CLIServerTest.sink = true;
+                return null;
+        }
+
+        @Override
+        public void adminDeleteTModel(DeleteTModel body) throws DispositionReportFaultMessage, RemoteException {
+                throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+        }
+
+        @Override
+        public ClientSubscriptionInfoDetail saveClientSubscriptionInfo(SaveClientSubscriptionInfo body) throws DispositionReportFaultMessage, RemoteException {
+                CLIServerTest.sink = true;
+                return null;
+        }
+
+        @Override
+        public SyncSubscriptionDetail invokeSyncSubscription(SyncSubscription syncSubscription) throws DispositionReportFaultMessage, RemoteException {
+                CLIServerTest.sink = true;
+                return null;
+        }
+
+        @Override
+        public NodeList getAllNodes(String authInfo) throws DispositionReportFaultMessage, RemoteException {
+                CLIServerTest.sink = true;
+                return null;
+        }
+
+        @Override
+        public ClerkList getAllClerks(String authInfo) throws DispositionReportFaultMessage, RemoteException {
+                CLIServerTest.sink = true;
+                return null;
+        }
+
+        @Override
+        public void deleteNode(DeleteNode body) throws DispositionReportFaultMessage, RemoteException {
+                throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+        }
+
+        @Override
+        public void deleteClerk(DeleteClerk request) throws DispositionReportFaultMessage, RemoteException {
+                throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+        }
+
+        @Override
+        public DispositionReport adminSaveBusiness(String authInfo, List<AdminSaveBusinessWrapper> values) throws DispositionReportFaultMessage, RemoteException {
+                throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+        }
+
+        @Override
+        public DispositionReport adminSaveTModel(String authInfo, List<AdminSaveTModelWrapper> values) throws DispositionReportFaultMessage, RemoteException {
+                throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+        }
+
+        @Override
+        public ReplicationConfiguration getReplicationNodes(String authInfo) throws DispositionReportFaultMessage, RemoteException {
+                CLIServerTest.sink = true;
+                ReplicationConfiguration replicationConfiguration = new ReplicationConfiguration();
+                replicationConfiguration.setCommunicationGraph(new CommunicationGraph());
+                replicationConfiguration.setRegistryContact(new ReplicationConfiguration.RegistryContact());
+                replicationConfiguration.getRegistryContact().setContact(new Contact());
+                        replicationConfiguration.getRegistryContact().getContact().getPersonName().add(new PersonName("name", null));
+
+                        
+                return replicationConfiguration;
+        }
+
+        @Override
+        public DispositionReport setReplicationNodes(String authInfo, ReplicationConfiguration replicationConfiguration) throws DispositionReportFaultMessage, RemoteException {
+                CLIServerTest.sink = true;
+                return null;
+        }
+
+        @Override
+        public List<SubscriptionWrapper> getAllClientSubscriptionInfo(String authInfo) throws DispositionReportFaultMessage, RemoteException {
+                CLIServerTest.sink = true;
+                return null;
+        }
+
+        @Override
+        public void adminDeleteSubscription(String authInfo, List<String> subscriptionKey) throws DispositionReportFaultMessage, RemoteException {
+                CLIServerTest.sink = true;
+        }
+
+        @Override
+        public void adminSaveSubscription(String authInfo, String publisherOrUsername, Holder<List<Subscription>> subscriptions) throws DispositionReportFaultMessage {
+                CLIServerTest.sink = true;
+        }
+        
+}

http://git-wip-us.apache.org/repos/asf/juddi/blob/22a846dd/juddi-core/src/test/java/org/apache/juddi/api/runtime/replicantImpl.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/test/java/org/apache/juddi/api/runtime/replicantImpl.java b/juddi-core/src/test/java/org/apache/juddi/api/runtime/replicantImpl.java
new file mode 100644
index 0000000..f984747
--- /dev/null
+++ b/juddi-core/src/test/java/org/apache/juddi/api/runtime/replicantImpl.java
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2014 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+package org.apache.juddi.api.runtime;
+
+import java.math.BigInteger;
+import java.rmi.RemoteException;
+import java.util.List;
+import javax.jws.WebService;
+import org.uddi.repl_v3.ChangeRecord;
+import org.uddi.repl_v3.ChangeRecordIDType;
+import org.uddi.repl_v3.DoPing;
+import org.uddi.repl_v3.HighWaterMarkVectorType;
+import org.uddi.repl_v3.NotifyChangeRecordsAvailable;
+import org.uddi.repl_v3.TransferCustody;
+import org.uddi.v3_service.DispositionReportFaultMessage;
+import org.uddi.v3_service.UDDIReplicationPortType;
+
+/**
+ *
+ * @author alex
+ */
+@WebService(serviceName = "UDDI_Replication_PortType", targetNamespace = "urn:uddi-org:repl_v3_portType",
+        endpointInterface = "org.uddi.v3_service.UDDIReplicationPortType")
+              public class replicantImpl implements UDDIReplicationPortType {
+      
+        public replicantImpl(){
+        }
+
+        @Override
+        public List<ChangeRecord> getChangeRecords(String requestingNode, HighWaterMarkVectorType changesAlreadySeen, BigInteger responseLimitCount, HighWaterMarkVectorType responseLimitVector) throws DispositionReportFaultMessage, RemoteException {
+                CLIServerTest.sink = true;
+                return null;
+        }
+
+        @Override
+        public void notifyChangeRecordsAvailable(NotifyChangeRecordsAvailable body) throws DispositionReportFaultMessage, RemoteException {
+                CLIServerTest.sink = true;
+        }
+
+        @Override
+        public String doPing(DoPing body) throws DispositionReportFaultMessage, RemoteException {
+                CLIServerTest.sink = true;
+                return null;
+        }
+
+        @Override
+        public List<ChangeRecordIDType> getHighWaterMarks() throws DispositionReportFaultMessage, RemoteException {
+                CLIServerTest.sink = true;
+                return null;
+        }
+
+        @Override
+        public void transferCustody(TransferCustody body) throws DispositionReportFaultMessage, RemoteException {
+                CLIServerTest.sink = true;
+        }
+        
+}

http://git-wip-us.apache.org/repos/asf/juddi/blob/22a846dd/juddi-core/src/test/java/org/apache/juddi/replication/ReplicationNotifierTest.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/test/java/org/apache/juddi/replication/ReplicationNotifierTest.java b/juddi-core/src/test/java/org/apache/juddi/replication/ReplicationNotifierTest.java
index 0931f76..a348134 100644
--- a/juddi-core/src/test/java/org/apache/juddi/replication/ReplicationNotifierTest.java
+++ b/juddi-core/src/test/java/org/apache/juddi/replication/ReplicationNotifierTest.java
@@ -22,14 +22,9 @@ import org.apache.commons.logging.LogFactory;
 import org.apache.juddi.Registry;
 import org.apache.juddi.api.impl.API_141_JIRATest;
 import org.apache.juddi.api.impl.UDDIReplicationImpl;
-import org.apache.juddi.model.ChangeRecord;
 import org.junit.AfterClass;
 import org.junit.Test;
-import static org.junit.Assert.*;
 import org.junit.BeforeClass;
-import org.uddi.api_v3.BusinessEntity;
-import org.uddi.api_v3.Name;
-import org.uddi.api_v3.SaveBusiness;
 import org.uddi.v3_service.UDDIReplicationPortType;
 
 /**

http://git-wip-us.apache.org/repos/asf/juddi/blob/22a846dd/juddi-core/src/test/resources/META-INF/persistence.xml
----------------------------------------------------------------------
diff --git a/juddi-core/src/test/resources/META-INF/persistence.xml b/juddi-core/src/test/resources/META-INF/persistence.xml
index adc4a7e..105b67d 100644
--- a/juddi-core/src/test/resources/META-INF/persistence.xml
+++ b/juddi-core/src/test/resources/META-INF/persistence.xml
@@ -73,6 +73,9 @@
     <class>org.apache.juddi.model.ReplicationConfiguration</class>
     <class>org.apache.juddi.model.Edge</class>
     <class>org.apache.juddi.model.ControlMessage</class>
+    <class>org.apache.juddi.model.ReplicationConfigurationNode</class>
+    <class>org.apache.juddi.model.EdgeReceiverAlternate</class>
+    
     <properties>
       <property name="hibernate.archive.autodetection" value="class"/>
       <property name="hibernate.hbm2ddl.auto" value="update"/>

http://git-wip-us.apache.org/repos/asf/juddi/blob/22a846dd/juddi-core/src/test/resources/META-INF/uddi.xml
----------------------------------------------------------------------
diff --git a/juddi-core/src/test/resources/META-INF/uddi.xml b/juddi-core/src/test/resources/META-INF/uddi.xml
index 633da90..f2e993a 100644
--- a/juddi-core/src/test/resources/META-INF/uddi.xml
+++ b/juddi-core/src/test/resources/META-INF/uddi.xml
@@ -27,6 +27,30 @@
                                 <subscriptionListenerUrl>org.apache.juddi.api.impl.UDDISubscriptionListenerImpl</subscriptionListenerUrl>
                                 <juddiApiUrl>org.apache.juddi.api.impl.JUDDIApiImpl</juddiApiUrl>
                         </node>
+                        <node>
+                                <!-- required 'default' node -->
+                                <name>jaxws</name> 
+                                <description>e</description>
+                                <properties>
+                                        <property name="serverName" value="localhost" />
+                                        <property name="serverPort" value="8080" />
+                                        <!-- for UDDI nodes that use HTTP u/p, using the following 
+                                        <property name="basicAuthUsername" value="root" />
+                                        <property name="basicAuthPassword" value="password" />
+                                        <property name="basicAuthPasswordIsEncrypted" value="false" />
+                                        <property name="basicAuthPasswordCryptoProvider" value="org.apache.juddi.v3.client.crypto.AES128Cryptor (an example)" />-->
+                                </properties>
+                                <!-- In VM Transport Settings -->
+                                <proxyTransport>org.apache.juddi.v3.client.transport.JAXWSTransport�</proxyTransport>
+                                <custodyTransferUrl>org.apache.juddi.api.impl.UDDICustodyTransferImpl</custodyTransferUrl>
+                                <inquiryUrl>org.apache.juddi.api.impl.UDDIInquiryImpl</inquiryUrl>
+                                <inquiryRESTUrl>http://${serverName}:${serverPort}/juddiv3/services/inquiryRest</inquiryRESTUrl>
+                                <publishUrl>org.apache.juddi.api.impl.UDDIPublicationImpl</publishUrl>
+                                <securityUrl>org.apache.juddi.api.impl.UDDISecurityImpl</securityUrl>
+                                <subscriptionUrl>org.apache.juddi.api.impl.UDDISubscriptionImpl</subscriptionUrl>
+                                <subscriptionListenerUrl>org.apache.juddi.api.impl.UDDISubscriptionListenerImpl</subscriptionListenerUrl>
+                                <juddiApiUrl>org.apache.juddi.api.impl.JUDDIApiImpl</juddiApiUrl>
+                        </node>
                 </nodes>
                 <clerks registerOnStartup="false">
                         <clerk name="joe" node="default" publisher="joepublisher" password="joepublisher" isPasswordEncrypted="false" cryptoProvider="">

http://git-wip-us.apache.org/repos/asf/juddi/blob/22a846dd/juddi-examples/hello-world-embedded/src/main/resources/META-INF/persistence.xml
----------------------------------------------------------------------
diff --git a/juddi-examples/hello-world-embedded/src/main/resources/META-INF/persistence.xml b/juddi-examples/hello-world-embedded/src/main/resources/META-INF/persistence.xml
index aa08feb..225f6b2 100644
--- a/juddi-examples/hello-world-embedded/src/main/resources/META-INF/persistence.xml
+++ b/juddi-examples/hello-world-embedded/src/main/resources/META-INF/persistence.xml
@@ -78,7 +78,8 @@
 	<class>org.apache.juddi.model.ReplicationConfiguration</class>
 	<class>org.apache.juddi.model.Edge</class>
 	<class>org.apache.juddi.model.ControlMessage</class>
-	<class>org.apache.juddi.model.ReplicationMessage</class>
+	<class>org.apache.juddi.model.ReplicationConfigurationNode</class>
+    <class>org.apache.juddi.model.EdgeReceiverAlternate</class>
 
     
     <properties>

http://git-wip-us.apache.org/repos/asf/juddi/blob/22a846dd/juddi-examples/more-uddi-samples/src/main/java/org/apache/juddi/samples/EntryPoint.java
----------------------------------------------------------------------
diff --git a/juddi-examples/more-uddi-samples/src/main/java/org/apache/juddi/samples/EntryPoint.java b/juddi-examples/more-uddi-samples/src/main/java/org/apache/juddi/samples/EntryPoint.java
index 2f9f032..3d0dacd 100644
--- a/juddi-examples/more-uddi-samples/src/main/java/org/apache/juddi/samples/EntryPoint.java
+++ b/juddi-examples/more-uddi-samples/src/main/java/org/apache/juddi/samples/EntryPoint.java
@@ -17,6 +17,7 @@ package org.apache.juddi.samples;
 
 import java.util.List;
 import org.apache.juddi.api_v3.Node;
+import static org.apache.juddi.samples.JuddiAdminService.clerkManager;
 import org.apache.juddi.v3.client.config.UDDIClient;
 import org.apache.juddi.v3.client.config.UDDINode;
 import org.apache.juddi.v3.client.transport.Transport;
@@ -73,6 +74,7 @@ public class EntryPoint {
                         System.out.println("35) View all registered nodes for this client");
                         System.out.println("36) UnRegister a node on a jUDDI server");
                         System.out.println("37) Fetch the replication config from a jUDDI server");
+                        System.out.println("38) Set the replication config on a remote jUDDI server");
 
                         System.out.println("q) quit");
                         System.out.print("Selection: ");
@@ -93,7 +95,17 @@ public class EntryPoint {
                 if (input.equals("1")) {
                         UDDISecurityPortType security = null;
                         UDDIClient clerkManager = new UDDIClient("META-INF/simple-publish-uddi.xml");
-                        Transport transport = clerkManager.getTransport();
+                        List<Node> uddiNodeList = clerkManager.getClientConfig().getUDDINodeList();
+                        System.out.println();
+                        System.out.println("Select a node (from *this config)");
+                        for (int i = 0; i < uddiNodeList.size(); i++) {
+                                System.out.print(i + 1);
+                                System.out.println(") " + uddiNodeList.get(i).getName() + uddiNodeList.get(i).getDescription());
+                        }
+                        System.out.println("Node #: ");
+                        int index = Integer.parseInt(System.console().readLine()) - 1;
+                        String node = uddiNodeList.get(index).getName();
+                        Transport transport = clerkManager.getTransport(node);
                         security = transport.getUDDISecurityService();
                         System.out.print("username: ");
                         String uname = System.console().readLine();
@@ -297,8 +309,11 @@ public class EntryPoint {
 
                         System.out.print("Change ID to fetch: ");
                         String id = (System.console().readLine());
+                        
+                        System.out.print("Node id of something in the replication graph: ");
+                        String src = (System.console().readLine());
 
-                        new UddiReplication().GetChangeRecords(key2, Long.parseLong(id));
+                        new UddiReplication().GetChangeRecords(key2, Long.parseLong(id),src);
 
                 }
                 if (input.equals("30")) {
@@ -316,6 +331,7 @@ public class EntryPoint {
                         UDDINode node = new UDDINode();
                         System.out.print("Name (must be unique: ");
                         node.setClientName(System.console().readLine());
+                        node.setName(node.getClientName());
                         System.out.print("Description: ");
                         node.setDescription(System.console().readLine());
 
@@ -338,9 +354,13 @@ public class EntryPoint {
                         node.setSecurityUrl(System.console().readLine());
                         System.out.print("Subscription URL: ");
                         node.setSubscriptionUrl(System.console().readLine());
+
+                        System.out.print("Subscription Listener URL: ");
+                        node.setSubscriptionListenerUrl(System.console().readLine());
+
                         System.out.print("Transport (defaults to JAXWS): ");
                         node.setProxyTransport(System.console().readLine());
-                        if (node.getProxyTransport() == null) {
+                        if (node.getProxyTransport() == null || node.getProxyTransport().trim().equalsIgnoreCase("")) {
                                 node.setProxyTransport(org.apache.juddi.v3.client.transport.JAXWSTransport.class.getCanonicalName());
                         }
                         System.out.print("Factory Initial (optional): ");
@@ -354,38 +374,37 @@ public class EntryPoint {
                         clerkManager.getClientConfig().saveConfig();
                         System.out.println("Saved.");
                 }
-                if (input.equals("32")) {
+                if (input.equals("33")) {
 
                         //System.out.println("32) Register a *this node to a jUDDI server");
                         UDDIClient clerkManager = new UDDIClient("META-INF/simple-publish-uddi.xml");
                         List<Node> uddiNodeList = clerkManager.getClientConfig().getUDDINodeList();
                         System.out.println();
-                        
+
                         System.out.println("Locally defined nodes:");
                         for (int i = 0; i < uddiNodeList.size(); i++) {
                                 System.out.println("________________________________________________________________________________");
-                                System.out.println(i + ") Node name: " + uddiNodeList.get(i).getName());
-                                System.out.println(i + ") Node description: " + uddiNodeList.get(i).getDescription());
-                                System.out.println(i + ") Transport: " + uddiNodeList.get(i).getProxyTransport());
-                                System.out.println(i + ") jUDDI URL: " + uddiNodeList.get(i).getJuddiApiUrl());
+                                System.out.println((i + 1) + ") Node name: " + uddiNodeList.get(i).getName());
+                                System.out.println((i + 1) + ") Node description: " + uddiNodeList.get(i).getDescription());
+                                System.out.println((i + 1) + ") Transport: " + uddiNodeList.get(i).getProxyTransport());
+                                System.out.println((i + 1) + ") jUDDI URL: " + uddiNodeList.get(i).getJuddiApiUrl());
                         }
-                        System.out.println("Local Node to publish to remote jUDDI instance: ");
-                        int index=Integer.parseInt(System.console().readLine());
-                        
-                        System.out.println("Pick a node (remote jUDDI instance) to publish the selected node information to");
+                        System.out.println("Local Source Node: ");
+                        int index = Integer.parseInt(System.console().readLine()) - 1;
+
+                        System.out.println("Remote Destination(s):");
                         for (int i = 0; i < uddiNodeList.size(); i++) {
                                 System.out.println("________________________________________________________________________________");
-                                System.out.println(i + ") Node name: " + uddiNodeList.get(i).getName());
-                                System.out.println(i + ") Node description: " + uddiNodeList.get(i).getDescription());
-                                System.out.println(i + ") Transport: " + uddiNodeList.get(i).getProxyTransport());
-                                System.out.println(i + ") jUDDI URL: " + uddiNodeList.get(i).getJuddiApiUrl());
+                                System.out.println((i + 1) + ") Node name: " + uddiNodeList.get(i).getName());
+                                System.out.println((i + 1) + ") Node description: " + uddiNodeList.get(i).getDescription());
+                                System.out.println((i + 1) + ") Transport: " + uddiNodeList.get(i).getProxyTransport());
+                                System.out.println((i + 1) + ") jUDDI URL: " + uddiNodeList.get(i).getJuddiApiUrl());
                         }
-                        System.out.println("Node to publish to remote jUDDI instance: ");
-                        int index2=Integer.parseInt(System.console().readLine());
-                        
-                        
-                        new JuddiAdminService().registerLocalNodeToRemoteNode(authtoken, uddiNodeList.get(index), uddiNodeList.get(index2)); 
-                        
+                        System.out.println("Remote Destination Node to publish to: ");
+                        int index2 = Integer.parseInt(System.console().readLine()) - 1;
+
+                        new JuddiAdminService().registerLocalNodeToRemoteNode(authtoken, uddiNodeList.get(index), uddiNodeList.get(index2));
+
                 }
                 if (input.equals("34")) {
 
@@ -412,9 +431,31 @@ public class EntryPoint {
                         new JuddiAdminService().viewRemoveRemoteNode(authtoken);
                         //System.out.println("35) UnRegister a node on a jUDDI server");
                 }
-                if (input.equals("37")){
+                if (input.equals("37")) {
                         new JuddiAdminService().viewReplicationConfig(authtoken);
                 }
+                if (input.equals("38")) {
+                        new JuddiAdminService().setReplicationConfig(authtoken);
+                }
+                if (input.equals("magic")) {
+                        //secret menu, setups up replication between juddi8080 and 9080 and adds a record or two on 8080
+                        UDDISecurityPortType security = null;
+                        UDDIClient clerkManager = new UDDIClient("META-INF/simple-publish-uddi.xml");
+                        
+                        Transport transport = clerkManager.getTransport("default");
+                        security = transport.getUDDISecurityService();
+                       
+                        String uname = "root";
+                       
+                        GetAuthToken getAuthTokenRoot = new GetAuthToken();
+                        getAuthTokenRoot.setUserID(uname);
+                        getAuthTokenRoot.setCred("root");
+                        authtoken = security.getAuthToken(getAuthTokenRoot).getAuthInfo();
+                        System.out.println("Success!");
+                        new JuddiAdminService().autoMagic();
+
+                        new UddiCreatebulk().publishBusiness(authtoken, 1, 1);
+                }
 
         }
 }

http://git-wip-us.apache.org/repos/asf/juddi/blob/22a846dd/juddi-examples/more-uddi-samples/src/main/java/org/apache/juddi/samples/JuddiAdminService.java
----------------------------------------------------------------------
diff --git a/juddi-examples/more-uddi-samples/src/main/java/org/apache/juddi/samples/JuddiAdminService.java b/juddi-examples/more-uddi-samples/src/main/java/org/apache/juddi/samples/JuddiAdminService.java
index f87c637..9cf086f 100644
--- a/juddi-examples/more-uddi-samples/src/main/java/org/apache/juddi/samples/JuddiAdminService.java
+++ b/juddi-examples/more-uddi-samples/src/main/java/org/apache/juddi/samples/JuddiAdminService.java
@@ -15,6 +15,7 @@
  */
 package org.apache.juddi.samples;
 
+import java.math.BigInteger;
 import java.rmi.RemoteException;
 import java.util.List;
 import javax.xml.bind.JAXB;
@@ -33,9 +34,16 @@ import org.apache.juddi.v3.client.transport.Transport;
 import org.apache.juddi.v3.client.transport.TransportException;
 import org.apache.juddi.v3_service.JUDDIApiPortType;
 import org.uddi.api_v3.AuthToken;
+import org.uddi.api_v3.Contact;
+import org.uddi.api_v3.Description;
 import org.uddi.api_v3.DispositionReport;
+import org.uddi.api_v3.Email;
 import org.uddi.api_v3.GetAuthToken;
+import org.uddi.api_v3.PersonName;
+import org.uddi.api_v3.Phone;
 import org.uddi.repl_v3.CommunicationGraph;
+import org.uddi.repl_v3.Operator;
+import org.uddi.repl_v3.OperatorStatusType;
 import org.uddi.repl_v3.ReplicationConfiguration;
 import org.uddi.v3_service.UDDIPublicationPortType;
 import org.uddi.v3_service.UDDISecurityPortType;
@@ -157,6 +165,16 @@ public class JuddiAdminService {
 
                 Transport transport = clerkManager.getTransport(publishTo.getName());
 
+                UDDISecurityPortType security2 = transport.getUDDISecurityService();
+                System.out.print("username: ");
+                String uname = System.console().readLine();
+                char passwordArray[] = System.console().readPassword("password: ");
+                GetAuthToken getAuthTokenRoot = new GetAuthToken();
+                getAuthTokenRoot.setUserID(uname);
+                getAuthTokenRoot.setCred(new String(passwordArray));
+                authtoken = security2.getAuthToken(getAuthTokenRoot).getAuthInfo();
+                System.out.println("Success!");
+
                 JUDDIApiPortType juddiApiService = transport.getJUDDIApiService();
                 SaveNode sn = new SaveNode();
                 sn.setAuthInfo(authtoken);
@@ -202,9 +220,17 @@ public class JuddiAdminService {
                 Transport transport = clerkManager.getTransport(node);
 
                 JUDDIApiPortType juddiApiService = transport.getJUDDIApiService();
+                System.out.println("fetching...");
+                //NodeList allNodes = juddiApiService.getAllNodes(authtoken);
+                ReplicationConfiguration replicationNodes = null;
+                try {
+                        replicationNodes = juddiApiService.getReplicationNodes(authtoken);
+                } catch (Exception ex) {
+                        System.out.println("Error getting replication config");
+                        ex.printStackTrace();
+                        replicationNodes = new ReplicationConfiguration();
 
-                ReplicationConfiguration replicationNodes = juddiApiService.getReplicationNodes(authtoken);
-
+                }
                 String input = "";
                 while (!"d".equalsIgnoreCase(input) && !"q".equalsIgnoreCase(input)) {
                         System.out.println("Current Config:");
@@ -216,11 +242,33 @@ public class JuddiAdminService {
                         System.out.println("5) Set Registry Contact");
                         System.out.println("6) Add Operator info");
                         System.out.println("7) Remove Operator info");
+                        System.out.println("d) Done, save changes");
+                        System.out.println("q) Quit and abandon changes");
+
                         input = System.console().readLine();
                         if (input.equalsIgnoreCase("1")) {
                                 menu_RemoveReplicationNode(replicationNodes);
                         } else if (input.equalsIgnoreCase("2")) {
                                 menu_AddReplicationNode(replicationNodes, juddiApiService, authtoken);
+                        } else if (input.equalsIgnoreCase("d")) {
+                                if (replicationNodes.getCommunicationGraph() == null) {
+                                        replicationNodes.setCommunicationGraph(new CommunicationGraph());
+                                }
+                                if (replicationNodes.getRegistryContact() == null) {
+                                        replicationNodes.setRegistryContact(new ReplicationConfiguration.RegistryContact());
+                                }
+                                if (replicationNodes.getRegistryContact().getContact() == null) {
+                                        replicationNodes.getRegistryContact().setContact(new Contact());
+                                        replicationNodes.getRegistryContact().getContact().getPersonName().add(new PersonName("unknown", null));
+                                }
+
+                                replicationNodes.setSerialNumber(0L);
+                                replicationNodes.setTimeOfConfigurationUpdate("");
+                                replicationNodes.setMaximumTimeToGetChanges(BigInteger.ONE);
+                                replicationNodes.setMaximumTimeToSyncRegistry(BigInteger.ONE);
+
+                                JAXB.marshal(replicationNodes, System.out);
+                                juddiApiService.setReplicationNodes(authtoken, replicationNodes);
                         }
 
                 }
@@ -286,19 +334,184 @@ public class JuddiAdminService {
 
         private void menu_AddReplicationNode(ReplicationConfiguration replicationNodes, JUDDIApiPortType juddiApiService, String authtoken) throws Exception {
 
-                NodeList allNodes = juddiApiService.getAllNodes(authtoken);
-                if (allNodes == null || allNodes.getNode().isEmpty()) {
-                        System.out.println("No nodes registered!");
-                } else {
-                        for (int i = 0; i < allNodes.getNode().size(); i++) {
-                                System.out.println((i + 1) + ") Name :" + allNodes.getNode().get(i).getName());
-                                System.out.println((i + 1) + ") Replication :" + allNodes.getNode().get(i).getReplicationUrl());
+                if (replicationNodes.getCommunicationGraph() == null) {
+                        replicationNodes.setCommunicationGraph(new CommunicationGraph());
+                }
+
+                Operator op = new Operator();
+                System.out.println("The Operator Node id should be the UDDI Node ID of the new node to replicate with. It should also match the root business key in"
+                        + " the new registry.");
+                System.out.print("Operator Node id: ");
+                op.setOperatorNodeID(System.console().readLine().trim());
+
+                System.out.print("Replication URL: ");
+                op.setSoapReplicationURL(System.console().readLine().trim());
+                op.setOperatorStatus(OperatorStatusType.NEW);
+                System.out.println("The replication node requires at least one point of contact");
+                System.out.print("Number of contacts: ");
+                int index = Integer.parseInt(System.console().readLine());
+                for (int i = 0; i < index; i++) {
+                        System.out.println("_______________________");
+                        System.out.println("Info for contact # " + (i + 1));
+                        op.getContact().add(getContactInfo());
+                }
+                System.out.println("_______________________");
+                System.out.println("Current Operator:");
+                System.out.println("_______________________");
+                JAXB.marshal(op, System.out);
+
+                System.out.print("Confirm adding? (y/n) :");
+                if (System.console().readLine().trim().equalsIgnoreCase("y")) {
+                        replicationNodes.getOperator().add(op);
+                        replicationNodes.getCommunicationGraph().getNode().add(op.getOperatorNodeID());
+
+                }
+        }
 
+        private Contact getContactInfo() {
+                Contact c = new Contact();
+                System.out.print("Use Type (i.e. primary): ");
+                c.setUseType(System.console().readLine().trim());
+                if (c.getUseType().trim().equalsIgnoreCase("")) {
+                        c.setUseType("primary");
+                }
+
+                c.getPersonName().add(getPersonName());
+
+                while (true) {
+                        System.out.println("Thus far:");
+                        JAXB.marshal(c, System.out);
+                        System.out.println("Options:");
+                        System.out.println("\t1) Add PersonName");
+                        System.out.println("\t2) Add Email address");
+                        System.out.println("\t3) Add Phone number");
+                        System.out.println("\t4) Add Description");
+                        System.out.println("\t<enter> Finish and return");
+
+                        System.out.print("> ");
+                        String input = System.console().readLine();
+                        if (input.trim().equalsIgnoreCase("")) {
+                                break;
+                        } else if (input.trim().equalsIgnoreCase("1")) {
+                                c.getPersonName().add(getPersonName());
+                        } else if (input.trim().equalsIgnoreCase("2")) {
+                                c.getEmail().add(getEmail());
+                        } else if (input.trim().equalsIgnoreCase("3")) {
+                                c.getPhone().add(getPhoneNumber());
+                        } else if (input.trim().equalsIgnoreCase("4")) {
+                                c.getDescription().add(getDescription());
                         }
-                        System.out.println("Node #: ");
-                        int index = Integer.parseInt(System.console().readLine()) - 1;
-                        replicationNodes.getCommunicationGraph().getNode().add(allNodes.getNode().get(index).getName());
                 }
+                return c;
+        }
+
+        private PersonName getPersonName() {
+                PersonName pn = new PersonName();
+                System.out.print("Name: ");
+                pn.setValue(System.console().readLine().trim());
+                System.out.print("Language (en): ");
+                pn.setLang(System.console().readLine().trim());
+                if (pn.getLang().equalsIgnoreCase("")) {
+                        pn.setLang("en");
+                }
+
+                return pn;
+        }
+
+        private Email getEmail() {
+                Email pn = new Email();
+                System.out.print("Email address Value: ");
+
+                pn.setValue(System.console().readLine().trim());
+                System.out.print("Use type (i.e. primary): ");
+                pn.setUseType(System.console().readLine().trim());
+                return pn;
+        }
+
+        private Phone getPhoneNumber() {
+
+                Phone pn = new Phone();
+                System.out.print("Phone Value: ");
+
+                pn.setValue(System.console().readLine().trim());
+                System.out.print("Use type (i.e. primary): ");
+                pn.setUseType(System.console().readLine().trim());
+                return pn;
+        }
+
+        private Description getDescription() {
+                Description pn = new Description();
+                System.out.print("Value: ");
+
+                pn.setValue(System.console().readLine().trim());
+                System.out.print("Language (en): ");
+                pn.setLang(System.console().readLine().trim());
+                if (pn.getLang().equalsIgnoreCase("")) {
+                        pn.setLang("en");
+                }
+                return pn;
+        }
+
+        void autoMagic() throws Exception {
+
+                List<Node> uddiNodeList = clerkManager.getClientConfig().getUDDINodeList();
+
+                Transport transport = clerkManager.getTransport("default");
+                String authtoken = transport.getUDDISecurityService().getAuthToken(new GetAuthToken("root", "root")).getAuthInfo();
+
+                JUDDIApiPortType juddiApiService = transport.getJUDDIApiService();
+                System.out.println("fetching...");
+
+                ReplicationConfiguration replicationNodes = null;
+                try {
+                        replicationNodes = juddiApiService.getReplicationNodes(authtoken);
+                } catch (Exception ex) {
+                        System.out.println("Error getting replication config");
+                        ex.printStackTrace();
+                        replicationNodes = new ReplicationConfiguration();
+
+                }
+                if (replicationNodes.getCommunicationGraph() == null) {
+                        replicationNodes.setCommunicationGraph(new CommunicationGraph());
+                }
+                Operator op = new Operator();
+                op.setOperatorNodeID("uddi:juddi.apache.org:node1");
+                op.setSoapReplicationURL("http://localhost:8080/juddiv3/services/replication");
+                op.setOperatorStatus(OperatorStatusType.NORMAL);
+                op.getContact().add(new Contact());
+                op.getContact().get(0).getPersonName().add(new PersonName("bob", "en"));
+                op.getContact().get(0).setUseType("admin");
+                replicationNodes.getOperator().add(op);
+
+                op = new Operator();
+                op.setOperatorNodeID("uddi:another.juddi.apache.org:node2");
+                op.setSoapReplicationURL("http://localhost:9080/juddiv3/services/replication");
+                op.setOperatorStatus(OperatorStatusType.NORMAL);
+                op.getContact().add(new Contact());
+                op.getContact().get(0).getPersonName().add(new PersonName("mary", "en"));
+                op.getContact().get(0).setUseType("admin");
+                replicationNodes.getOperator().add(op);
+                replicationNodes.getCommunicationGraph().getNode().add("uddi:another.juddi.apache.org:node2");
+                replicationNodes.getCommunicationGraph().getNode().add("uddi:juddi.apache.org:node1");
+                replicationNodes.setSerialNumber(0L);
+                replicationNodes.setTimeOfConfigurationUpdate("");
+                replicationNodes.setMaximumTimeToGetChanges(BigInteger.ONE);
+                replicationNodes.setMaximumTimeToSyncRegistry(BigInteger.ONE);
+
+                if (replicationNodes.getRegistryContact().getContact() == null) {
+                        replicationNodes.getRegistryContact().setContact(new Contact());
+                        replicationNodes.getRegistryContact().getContact().getPersonName().add(new PersonName("unknown", null));
+                }
+
+                JAXB.marshal(replicationNodes, System.out);
+                juddiApiService.setReplicationNodes(authtoken, replicationNodes);
+                
+                transport = clerkManager.getTransport("uddi:another.juddi.apache.org:node2");
+                 authtoken = transport.getUDDISecurityService().getAuthToken(new GetAuthToken("root", "root")).getAuthInfo();
+
+                juddiApiService = transport.getJUDDIApiService();
+                juddiApiService.setReplicationNodes(authtoken, replicationNodes);
+             
 
         }
 }

http://git-wip-us.apache.org/repos/asf/juddi/blob/22a846dd/juddi-examples/more-uddi-samples/src/main/java/org/apache/juddi/samples/UddiReplication.java
----------------------------------------------------------------------
diff --git a/juddi-examples/more-uddi-samples/src/main/java/org/apache/juddi/samples/UddiReplication.java b/juddi-examples/more-uddi-samples/src/main/java/org/apache/juddi/samples/UddiReplication.java
index 4878202..2e62348 100644
--- a/juddi-examples/more-uddi-samples/src/main/java/org/apache/juddi/samples/UddiReplication.java
+++ b/juddi-examples/more-uddi-samples/src/main/java/org/apache/juddi/samples/UddiReplication.java
@@ -67,7 +67,7 @@ class UddiReplication {
                 }
         }
 
-        void GetChangeRecords(String key2, Long record) {
+        void GetChangeRecords(String key2, Long record, String sourcenode) {
                 try {
                         UDDIReplicationPortType uddiReplicationPort = new UDDIService().getUDDIReplicationPort();
                         HighWaterMarkVectorType highWaterMarkVectorType = new HighWaterMarkVectorType();
@@ -75,7 +75,7 @@ class UddiReplication {
                         
                         highWaterMarkVectorType.getHighWaterMark().add(new ChangeRecordIDType(DoPing(key2), record));
                         ((BindingProvider) uddiReplicationPort).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, key2);
-                        List<ChangeRecord> changeRecords = uddiReplicationPort.getChangeRecords("random", null, BigInteger.valueOf(100), highWaterMarkVectorType);
+                        List<ChangeRecord> changeRecords = uddiReplicationPort.getChangeRecords(sourcenode, highWaterMarkVectorType, BigInteger.valueOf(100), null);
                         System.out.println("Success...." + changeRecords.size() + " records returned");
                         System.out.println("Node, USN, type");
                         for (int i = 0; i < changeRecords.size(); i++) {

http://git-wip-us.apache.org/repos/asf/juddi/blob/22a846dd/juddi-examples/more-uddi-samples/src/main/resources/META-INF/simple-publish-uddi.xml
----------------------------------------------------------------------
diff --git a/juddi-examples/more-uddi-samples/src/main/resources/META-INF/simple-publish-uddi.xml b/juddi-examples/more-uddi-samples/src/main/resources/META-INF/simple-publish-uddi.xml
index 1f8be39..c78a3d0 100644
--- a/juddi-examples/more-uddi-samples/src/main/resources/META-INF/simple-publish-uddi.xml
+++ b/juddi-examples/more-uddi-samples/src/main/resources/META-INF/simple-publish-uddi.xml
@@ -4,7 +4,7 @@
         <reloadDelay>5000</reloadDelay>
         <client name="example-client">
                 <nodes>
-                        <node>
+                        <node isHomeJUDDI="true">
                                 <!-- required 'default' node -->
                                 <name>default</name> 
                                 <properties>
@@ -28,6 +28,31 @@
                                 <subscriptionListenerUrl>http://${serverName}:${serverPort}/juddiv3/services/subscription-listener</subscriptionListenerUrl>
                                 <juddiApiUrl>http://${serverName}:${serverPort}/juddiv3/services/juddi-api</juddiApiUrl>
                         </node>
+                        <node>
+                                <!-- required 'default' node -->
+                                <name>uddi:another.juddi.apache.org:node2</name> 
+                                <properties>
+                                        <property name="serverName" value="localhost"/>
+                                        <property name="serverPort" value="9080"/>
+                                        <!-- for UDDI nodes that use HTTP u/p, using the following 
+                                        <property name="basicAuthUsername" value="root" />
+                                        <property name="basicAuthPassword" value="password" />
+                                        <property name="basicAuthPasswordIsEncrypted" value="false" />
+                                        <property name="basicAuthPasswordCryptoProvider" value="org.apache.juddi.v3.client.crypto.AES128Cryptor (an example)" />-->
+                                </properties>
+                                <description>juddi node on 9080</description>
+                                <!-- JAX-WS Transport -->
+                                <proxyTransport>org.apache.juddi.v3.client.transport.JAXWSTransport</proxyTransport>
+                                <custodyTransferUrl>http://${serverName}:${serverPort}/juddiv3/services/custody-transfer</custodyTransferUrl>
+                                <inquiryUrl>http://${serverName}:${serverPort}/juddiv3/services/inquiry</inquiryUrl>
+                                <inquiryRESTUrl>http://${serverName}:${serverPort}/juddiv3/services/inquiryRest</inquiryRESTUrl>
+                                <publishUrl>http://${serverName}:${serverPort}/juddiv3/services/publish</publishUrl>
+                                <securityUrl>http://${serverName}:${serverPort}/juddiv3/services/security</securityUrl>
+                                <subscriptionUrl>http://${serverName}:${serverPort}/juddiv3/services/subscription</subscriptionUrl>
+                                <subscriptionListenerUrl>http://${serverName}:${serverPort}/juddiv3/services/subscription-listener</subscriptionListenerUrl>
+                                <juddiApiUrl>http://${serverName}:${serverPort}/juddiv3/services/juddi-api</juddiApiUrl>
+                                <replicationUrl>http://${serverName}:${serverPort}/juddiv3/services/replication</replicationUrl>
+                        </node>
                 </nodes>
                 <clerks registerOnStartup="false">
                         <clerk name="default" node="default" publisher="uddi" password="uddi"  isPasswordEncrypted="false" cryptoProvider=""/>

http://git-wip-us.apache.org/repos/asf/juddi/blob/22a846dd/juddi-rest-cxf/src/test/resources/META-INF/persistence.xml
----------------------------------------------------------------------
diff --git a/juddi-rest-cxf/src/test/resources/META-INF/persistence.xml b/juddi-rest-cxf/src/test/resources/META-INF/persistence.xml
index afb2de7..36f93b9 100644
--- a/juddi-rest-cxf/src/test/resources/META-INF/persistence.xml
+++ b/juddi-rest-cxf/src/test/resources/META-INF/persistence.xml
@@ -78,7 +78,8 @@
 	<class>org.apache.juddi.model.ReplicationConfiguration</class>
 	<class>org.apache.juddi.model.Edge</class>
 	<class>org.apache.juddi.model.ControlMessage</class>
-	<class>org.apache.juddi.model.ReplicationMessage</class>
+	<class>org.apache.juddi.model.ReplicationConfigurationNode</class>
+    <class>org.apache.juddi.model.EdgeReceiverAlternate</class>
     
     <properties>
       <property name="hibernate.archive.autodetection" value="class"/>


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


[2/9] juddi git commit: JUDDI-241 save/delete Node and clerk functioning

Posted by al...@apache.org.
JUDDI-241 save/delete Node and clerk functioning


Project: http://git-wip-us.apache.org/repos/asf/juddi/repo
Commit: http://git-wip-us.apache.org/repos/asf/juddi/commit/7aa78f62
Tree: http://git-wip-us.apache.org/repos/asf/juddi/tree/7aa78f62
Diff: http://git-wip-us.apache.org/repos/asf/juddi/diff/7aa78f62

Branch: refs/heads/JUDDI-241
Commit: 7aa78f62cc66ff3484d105e293b361345a939b86
Parents: 455149a
Author: Alex <al...@apache.org>
Authored: Sat Nov 15 13:16:09 2014 -0500
Committer: Alex <al...@apache.org>
Committed: Sat Nov 15 13:16:09 2014 -0500

----------------------------------------------------------------------
 .../org/apache/juddi/api/impl/JUDDIApiImpl.java |   53 +-
 .../juddi/api/impl/UDDIReplicationImpl.java     | 1023 +++++++++---------
 .../api/impl/UDDISubscriptionListenerImpl.java  |    2 +-
 .../apache/juddi/mapping/MappingApiToModel.java |    2 +-
 .../apache/juddi/mapping/MappingModelToApi.java |   13 +-
 .../main/java/org/apache/juddi/model/Clerk.java |   18 +-
 .../main/java/org/apache/juddi/model/Node.java  |   12 +-
 .../juddi/validation/ValidatePublish.java       |   19 +-
 .../src/main/resources/messages.properties      |    5 +-
 .../juddi/api/impl/API_160_ReplicationTest.java |   77 +-
 .../uddi/repl_v3/ReplicationConfiguration.java  |    6 +
 11 files changed, 673 insertions(+), 557 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/juddi/blob/7aa78f62/juddi-core/src/main/java/org/apache/juddi/api/impl/JUDDIApiImpl.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/api/impl/JUDDIApiImpl.java b/juddi-core/src/main/java/org/apache/juddi/api/impl/JUDDIApiImpl.java
index a4ef416..1f7ca77 100644
--- a/juddi-core/src/main/java/org/apache/juddi/api/impl/JUDDIApiImpl.java
+++ b/juddi-core/src/main/java/org/apache/juddi/api/impl/JUDDIApiImpl.java
@@ -17,6 +17,7 @@
 package org.apache.juddi.api.impl;
 
 import java.io.StringWriter;
+import java.math.BigInteger;
 import java.rmi.RemoteException;
 import java.util.ArrayList;
 import java.util.Date;
@@ -558,7 +559,7 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
 
                                 org.apache.juddi.api_v3.ClientSubscriptionInfo apiClientSubscriptionInfo = new org.apache.juddi.api_v3.ClientSubscriptionInfo();
 
-                                MappingModelToApi.mapClientSubscriptionInfo(modelClientSubscriptionInfo, apiClientSubscriptionInfo);
+                                MappingModelToApi.mapClientSubscriptionInfo(modelClientSubscriptionInfo, apiClientSubscriptionInfo,em);
 
                                 result.getClientSubscriptionInfo().add(apiClientSubscriptionInfo);
                         }
@@ -621,7 +622,7 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
 
                                 org.apache.juddi.api_v3.ClientSubscriptionInfo apiClientSubscriptionInfo = new org.apache.juddi.api_v3.ClientSubscriptionInfo();
 
-                                MappingModelToApi.mapClientSubscriptionInfo(modelClientSubscriptionInfo, apiClientSubscriptionInfo);
+                                MappingModelToApi.mapClientSubscriptionInfo(modelClientSubscriptionInfo, apiClientSubscriptionInfo,em);
 
                                 result.getClientSubscriptionInfo().add(apiClientSubscriptionInfo);
                         }
@@ -655,6 +656,7 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
          * @return ClerkDetail
          * @throws DispositionReportFaultMessage
          */
+        @Override
         public ClerkDetail saveClerk(SaveClerk body)
              throws DispositionReportFaultMessage {
                 long startTime = System.currentTimeMillis();
@@ -675,14 +677,16 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
                                 org.apache.juddi.model.Clerk modelClerk = new org.apache.juddi.model.Clerk();
 
                                 MappingApiToModel.mapClerk(apiClerk, modelClerk);
-                                org.apache.juddi.model.Node node = em.find(org.apache.juddi.model.Node.class, apiClerk.getNode().getName());
-                                if (node==null)
+                                org.apache.juddi.model.Node node2 = em.find(org.apache.juddi.model.Node.class, apiClerk.getNode().getName());
+                                if (node2==null)
                                 {
                                         //it doesn't exist yet
-                                        node = new Node();
+                                        node2 = new Node();
+                                        MappingApiToModel.mapNode(apiClerk.getNode(), node2);
+                                        em.persist(node2);
                                 }
-                                MappingApiToModel.mapNode(apiClerk.getNode(), node);
-                                modelClerk.setNode(node);
+                                
+                                modelClerk.setNode(node2.getName());
                                 Object existingUddiEntity = em.find(modelClerk.getClass(), modelClerk.getClerkName());
                                 if (existingUddiEntity != null) {
                                         
@@ -690,7 +694,7 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
                                 } else {
                                         em.persist(modelClerk);
                                 }
-
+                
                                 result.getClerk().add(apiClerk);
                         }
 
@@ -811,7 +815,7 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
                                         throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.SubscripKeyNotFound", subscriptionKey));
                                 }
                                 org.apache.juddi.api_v3.ClientSubscriptionInfo apiClientSubscriptionInfo = new org.apache.juddi.api_v3.ClientSubscriptionInfo();
-                                MappingModelToApi.mapClientSubscriptionInfo(modelClientSubscriptionInfo, apiClientSubscriptionInfo);
+                                MappingModelToApi.mapClientSubscriptionInfo(modelClientSubscriptionInfo, apiClientSubscriptionInfo,em);
                                 clientSubscriptionInfoMap.put(apiClientSubscriptionInfo.getSubscriptionKey(), apiClientSubscriptionInfo);
                         }
 
@@ -947,7 +951,7 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
                         List<org.apache.juddi.model.Clerk> resultList = qry.getResultList();
                         for (int i = 0; i < resultList.size(); i++) {
                                 Clerk api = new Clerk();
-                                MappingModelToApi.mapClerk(resultList.get(i), api);
+                                MappingModelToApi.mapClerk(resultList.get(i), api,em);
                                 ret.getClerk().add(api);
 
                         }
@@ -980,18 +984,25 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
                 EntityTransaction tx = em.getTransaction();
                 try {
                         tx.begin();
-
+                        //TODO if the given node is in the replication config, prevent deletion
                         UddiEntityPublisher publisher = this.getEntityPublisher(em, req.getAuthInfo());
-                        new ValidatePublish(publisher).validateDeleteNode(em, req);
+                        new ValidatePublish(publisher).validateDeleteNode(em, req, getReplicationNodes(req.getAuthInfo()));
 
                         org.apache.juddi.model.Node existingUddiEntity = em.find(org.apache.juddi.model.Node.class, req.getNodeID());
-                        if (existingUddiEntity
-                             != null) {
-
-                                //TODO cascade delete all clerks tied to this node, confirm that it works
-                                em.remove(existingUddiEntity);
-                                found = true;
+                        if (existingUddiEntity != null) {
+
+                            
+                                //cascade delete all clerks tied to this node, confirm that it works
+                              
+                            Query createQuery = em.createQuery("delete from Clerk c where c.node = :nodename");
+                            createQuery.setParameter("nodename", req.getNodeID());
+                            createQuery.executeUpdate();
+                             
+                               em.remove(existingUddiEntity);
+                                found=true;
                         }
+                        else 
+                            throw new InvalidKeyPassedException(new ErrorMessage("errors.deleteNode.NotFound"));
 
                         tx.commit();
                         long procTime = System.currentTimeMillis() - startTime;
@@ -1012,7 +1023,7 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
 
                 if (!found) {
 
-                        throw new InvalidKeyPassedException(new ErrorMessage("errors.deleteNode.NotFound"));
+                        throw new InvalidKeyPassedException(new ErrorMessage("errors.deleteNode.NotFound", req.getNodeID()));
                 }
         }
 
@@ -1306,7 +1317,7 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
                         }
 
                         StringBuilder sql = new StringBuilder();
-                        sql.append("select c from ReplicationConfiguration c order by c.SerialNumber desc");
+                        sql.append("select c from ReplicationConfiguration c order by c.serialNumber desc");
                         sql.toString();
                         Query qry = em.createQuery(sql.toString());
                         qry.setMaxResults(1);
@@ -1329,6 +1340,8 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
                         em.close();
                 }
 
+                r.setMaximumTimeToGetChanges(BigInteger.ONE);
+                r.setMaximumTimeToSyncRegistry(BigInteger.ONE);
                 return r;
         }
 

http://git-wip-us.apache.org/repos/asf/juddi/blob/7aa78f62/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIReplicationImpl.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIReplicationImpl.java b/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIReplicationImpl.java
index e2fe3fd..15ed7a8 100644
--- a/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIReplicationImpl.java
+++ b/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIReplicationImpl.java
@@ -78,562 +78,559 @@ import org.uddi.v3_service.UDDIReplicationPortType;
  * @author <a href="mailto:alexoree@apache.org">Alex O'Ree<a/>
  */
 public class UDDIReplicationImpl extends AuthenticatedService implements UDDIReplicationPortType {
-
-        private UDDIServiceCounter serviceCounter;
-
-        private static PullTimerTask timer = null;
-        private long startBuffer = 20000l;//AppConfig.getConfiguration().getLong(Property.JUDDI_NOTIFICATION_START_BUFFER, 20000l); // 20s startup delay default 
-        private long interval = 300000l;// AppConfig.getConfiguration().getLong(Property.JUDDI_NOTIFICATION_INTERVAL, 300000l); //5 min default
-
-        private static UDDIPublicationImpl pub = null;
-
-        public UDDIReplicationImpl() {
-                super();
-                if (pub == null) {
-                        pub = new UDDIPublicationImpl();
-                }
-                serviceCounter = ServiceCounterLifecycleResource.getServiceCounter(UDDIReplicationImpl.class);
-                Init();
-                try {
-                        startBuffer = AppConfig.getConfiguration().getLong(Property.JUDDI_NOTIFICATION_START_BUFFER, 20000l); // 20s startup delay default 
-                        interval = AppConfig.getConfiguration().getLong(Property.JUDDI_NOTIFICATION_INTERVAL, 300000l); //5 min default
-                } catch (ConfigurationException ex) {
-                        logger.fatal(ex);
-                }
-
+    
+    private UDDIServiceCounter serviceCounter;
+    
+    private static PullTimerTask timer = null;
+    private long startBuffer = 20000l;//AppConfig.getConfiguration().getLong(Property.JUDDI_NOTIFICATION_START_BUFFER, 20000l); // 20s startup delay default 
+    private long interval = 300000l;// AppConfig.getConfiguration().getLong(Property.JUDDI_NOTIFICATION_INTERVAL, 300000l); //5 min default
+
+    private static UDDIPublicationImpl pub = null;
+    
+    public UDDIReplicationImpl() {
+        super();
+        if (pub == null) {
+            pub = new UDDIPublicationImpl();
         }
-
-        private synchronized void Init() {
-                if (queue == null) {
-                        queue = new ConcurrentLinkedDeque<NotifyChangeRecordsAvailable>();
-                }
-                timer = new PullTimerTask();
-
+        serviceCounter = ServiceCounterLifecycleResource.getServiceCounter(UDDIReplicationImpl.class);
+        Init();
+        try {
+            startBuffer = AppConfig.getConfiguration().getLong(Property.JUDDI_NOTIFICATION_START_BUFFER, 20000l); // 20s startup delay default 
+            interval = AppConfig.getConfiguration().getLong(Property.JUDDI_NOTIFICATION_INTERVAL, 300000l); //5 min default
+        } catch (ConfigurationException ex) {
+            logger.fatal(ex);
         }
-
-        private boolean Excluded(HighWaterMarkVectorType changesAlreadySeen, ChangeRecord r) {
-                if (changesAlreadySeen != null) {
-                        for (int i = 0; i < changesAlreadySeen.getHighWaterMark().size(); i++) {
-                                if (changesAlreadySeen.getHighWaterMark().get(i).getNodeID().equals(r.getChangeID().getNodeID())
-                                     && changesAlreadySeen.getHighWaterMark().get(i).getOriginatingUSN().equals(r.getChangeID().getOriginatingUSN())) {
-                                        return true;
-                                }
-                        }
-                }
-                return false;
+        
+    }
+    
+    private synchronized void Init() {
+        if (queue == null) {
+            queue = new ConcurrentLinkedDeque<NotifyChangeRecordsAvailable>();
         }
-
-        private class PullTimerTask extends TimerTask {
-
-                private Timer timer = null;
-
-                public PullTimerTask() {
-                        super();
-                        timer = new Timer(true);
-                        timer.scheduleAtFixedRate(this, startBuffer, interval);
+        timer = new PullTimerTask();
+        
+    }
+    
+    private boolean Excluded(HighWaterMarkVectorType changesAlreadySeen, ChangeRecord r) {
+        if (changesAlreadySeen != null) {
+            for (int i = 0; i < changesAlreadySeen.getHighWaterMark().size(); i++) {
+                if (changesAlreadySeen.getHighWaterMark().get(i).getNodeID().equals(r.getChangeID().getNodeID())
+                        && changesAlreadySeen.getHighWaterMark().get(i).getOriginatingUSN().equals(r.getChangeID().getOriginatingUSN())) {
+                    return true;
                 }
-
-                @Override
-                public void run() {
-
-                        //ok someone told me there's a change available
-                        while (!queue.isEmpty()) {
-                                NotifyChangeRecordsAvailable poll = queue.poll();
-                                if (poll != null) {
-                                        UDDIReplicationPortType replicationClient = getReplicationClient(poll.getNotifyingNode());
-                                        try {
-                                                //ok now get all the changes
-                                                List<ChangeRecord> records
-                                                     = replicationClient.getChangeRecords(node,
-                                                          null, null, poll.getChangesAvailable());
-                                                //ok now we need to persist the change records
-                                                for (int i = 0; i < records.size(); i++) {
-                                                        PersistChangeRecord(records.get(i));
-                                                }
-                                        } catch (Exception ex) {
-                                                logger.equals(ex);
-                                        }
-                                }
+            }
+        }
+        return false;
+    }
+    
+    private class PullTimerTask extends TimerTask {
+        
+        private Timer timer = null;
+        
+        public PullTimerTask() {
+            super();
+            timer = new Timer(true);
+            timer.scheduleAtFixedRate(this, startBuffer, interval);
+        }
+        
+        @Override
+        public void run() {
+
+            //ok someone told me there's a change available
+            while (!queue.isEmpty()) {
+                NotifyChangeRecordsAvailable poll = queue.poll();
+                if (poll != null) {
+                    UDDIReplicationPortType replicationClient = getReplicationClient(poll.getNotifyingNode());
+                    try {
+                        //ok now get all the changes
+                        List<ChangeRecord> records
+                                = replicationClient.getChangeRecords(node,
+                                        null, null, poll.getChangesAvailable());
+                        //ok now we need to persist the change records
+                        for (int i = 0; i < records.size(); i++) {
+                            PersistChangeRecord(records.get(i));
                         }
+                    } catch (Exception ex) {
+                        logger.equals(ex);
+                    }
                 }
+            }
+        }
+        
+        @Override
+        public boolean cancel() {
+            timer.cancel();
+            return super.cancel();
+        }
 
-                @Override
-                public boolean cancel() {
-                        timer.cancel();
-                        return super.cancel();
-                }
-
-                /**
-                 * someone told me there's a change available, we retrieved it
-                 * and are processing the changes locally
-                 *
-                 * @param rec
-                 */
-                private void PersistChangeRecord(ChangeRecord rec) {
-                        if (rec == null) {
-                                return;
-                        }
-                        EntityManager em = PersistenceManager.getEntityManager();
-                        EntityTransaction tx = em.getTransaction();
+        /**
+         * someone told me there's a change available, we retrieved it and are
+         * processing the changes locally
+         *
+         * @param rec
+         */
+        private void PersistChangeRecord(ChangeRecord rec) {
+            if (rec == null) {
+                return;
+            }
+            EntityManager em = PersistenceManager.getEntityManager();
+            EntityTransaction tx = em.getTransaction();
+            /**
+             * In nodes that support pre-bundled replication responses, the
+             * recipient of the get_changeRecords message MAY return more change
+             * records than requested by the caller. In this scenario, the
+             * caller MUST also be prepared to deal with such redundant changes
+             * where a USN is less than the USN specified in the
+             * changesAlreadySeen highWaterMarkVector.
+             */
+            try {
+                tx.begin();
+                //the change record rec must also be persisted!!
+                em.persist(MappingApiToModel.mapChangeRecord(rec));
+                //<editor-fold defaultstate="collapsed" desc="delete a record">
+
+                if (rec.getChangeRecordDelete() != null) {
+                    if (rec.getChangeRecordDelete() != null && rec.getChangeRecordDelete().getBindingKey() != null && !"".equalsIgnoreCase(rec.getChangeRecordDelete().getBindingKey())) {
+                        //delete a binding template
+                        pub.deleteBinding(rec.getChangeRecordDelete().getBindingKey(), em);
+                    }
+                    if (rec.getChangeRecordDelete() != null && rec.getChangeRecordDelete().getBusinessKey() != null && !"".equalsIgnoreCase(rec.getChangeRecordDelete().getBusinessKey())) {
+                        //delete a business 
+                        pub.deleteBusiness(rec.getChangeRecordDelete().getBusinessKey(), em);
+                    }
+                    if (rec.getChangeRecordDelete() != null && rec.getChangeRecordDelete().getServiceKey() != null && !"".equalsIgnoreCase(rec.getChangeRecordDelete().getServiceKey())) {
+                        //delete a service 
+                        pub.deleteService(rec.getChangeRecordDelete().getServiceKey(), em);
+                    }
+                    if (rec.getChangeRecordDelete() != null && rec.getChangeRecordDelete().getTModelKey() != null && !"".equalsIgnoreCase(rec.getChangeRecordDelete().getTModelKey())) {
+                        //delete a tmodel 
                         /**
-                         * In nodes that support pre-bundled replication
-                         * responses, the recipient of the get_changeRecords
-                         * message MAY return more change records than requested
-                         * by the caller. In this scenario, the caller MUST also
-                         * be prepared to deal with such redundant changes where
-                         * a USN is less than the USN specified in the
-                         * changesAlreadySeen highWaterMarkVector.
+                         * The changeRecordDelete for a tModel does not
+                         * correspond to any API described in this specification
+                         * and should only appear in the replication stream as
+                         * the result of an administrative function to
+                         * permanently remove a tModel.
                          */
-                        try {
-                                tx.begin();
-                                //the change record rec must also be persisted!!
-                                em.persist(MappingApiToModel.mapChangeRecord(rec));
-                                //<editor-fold defaultstate="collapsed" desc="delete a record">
-
-                                if (rec.getChangeRecordDelete() != null) {
-                                        if (rec.getChangeRecordDelete() != null && rec.getChangeRecordDelete().getBindingKey() != null && !"".equalsIgnoreCase(rec.getChangeRecordDelete().getBindingKey())) {
-                                                //delete a binding template
-                                                pub.deleteBinding(rec.getChangeRecordDelete().getBindingKey(), em);
-                                        }
-                                        if (rec.getChangeRecordDelete() != null && rec.getChangeRecordDelete().getBusinessKey() != null && !"".equalsIgnoreCase(rec.getChangeRecordDelete().getBusinessKey())) {
-                                                //delete a business 
-                                                pub.deleteBusiness(rec.getChangeRecordDelete().getBusinessKey(), em);
-                                        }
-                                        if (rec.getChangeRecordDelete() != null && rec.getChangeRecordDelete().getServiceKey() != null && !"".equalsIgnoreCase(rec.getChangeRecordDelete().getServiceKey())) {
-                                                //delete a service 
-                                                pub.deleteService(rec.getChangeRecordDelete().getServiceKey(), em);
-                                        }
-                                        if (rec.getChangeRecordDelete() != null && rec.getChangeRecordDelete().getTModelKey() != null && !"".equalsIgnoreCase(rec.getChangeRecordDelete().getTModelKey())) {
-                                                //delete a tmodel 
-                                                /**
-                                                 * The changeRecordDelete for a
-                                                 * tModel does not correspond to
-                                                 * any API described in this
-                                                 * specification and should only
-                                                 * appear in the replication
-                                                 * stream as the result of an
-                                                 * administrative function to
-                                                 * permanently remove a tModel.
-                                                 */
-                                                pub.deleteTModel(rec.getChangeRecordDelete().getTModelKey(), em);
-                                        }
-                                }
-                                if (rec.getChangeRecordDeleteAssertion() != null && rec.getChangeRecordDeleteAssertion().getPublisherAssertion() != null) {
-                                        //delete a pa template                            
-                                        pub.deletePublisherAssertion(rec.getChangeRecordDeleteAssertion().getPublisherAssertion(), em);
-                                }
+                        pub.deleteTModel(rec.getChangeRecordDelete().getTModelKey(), em);
+                    }
+                }
+                if (rec.getChangeRecordDeleteAssertion() != null && rec.getChangeRecordDeleteAssertion().getPublisherAssertion() != null) {
+                    //delete a pa template                            
+                    pub.deletePublisherAssertion(rec.getChangeRecordDeleteAssertion().getPublisherAssertion(), em);
+                }
 
 //</editor-fold>
-                                //<editor-fold defaultstate="collapsed" desc="New Data">
-                                if (rec.getChangeRecordNewData() != null) {
-
-                                        if (rec.getChangeRecordNewData().getOperationalInfo().getNodeID() == null) {
-                                                throw new Exception("Inbound replication data is missiong node id!");
-                                        }
-
-                                        //The operationalInfo element MUST contain the operational information associated with the indicated new data.
-                                        if (rec.getChangeRecordNewData().getOperationalInfo() == null) {
-                                                logger.warn("Inbound replication data does not have the required OperationalInfo element and is NOT spec compliant. Data will be ignored");
-                                        } else {
-                                                if (rec.getChangeRecordNewData().getBindingTemplate() != null) {
+                //<editor-fold defaultstate="collapsed" desc="New Data">
+                if (rec.getChangeRecordNewData() != null) {
+                    
+                    if (rec.getChangeRecordNewData().getOperationalInfo().getNodeID() == null) {
+                        throw new Exception("Inbound replication data is missiong node id!");
+                    }
+
+                    //The operationalInfo element MUST contain the operational information associated with the indicated new data.
+                    if (rec.getChangeRecordNewData().getOperationalInfo() == null) {
+                        logger.warn("Inbound replication data does not have the required OperationalInfo element and is NOT spec compliant. Data will be ignored");
+                    } else {
+                        if (rec.getChangeRecordNewData().getBindingTemplate() != null) {
                                                         //fetch the binding template if it exists already
-                                                        //if it exists, 
-                                                        //      confirm the owning node, it shouldn't be the local node id, if it is, throw
-                                                        //      the owning node should be the same as it was before
-
-                                                        BusinessService model = em.find(org.apache.juddi.model.BusinessService.class, rec.getChangeRecordNewData().getBindingTemplate().getServiceKey());
-                                                        if (model == null) {
-                                                                logger.error("Replication error, attempting to insert a binding where the service doesn't exist yet");
-                                                        } else {
-                                                                ValidateNodeIdMatches(model.getNodeId(), rec.getChangeRecordNewData().getOperationalInfo());
-
-                                                                org.apache.juddi.model.BindingTemplate modelT = new org.apache.juddi.model.BindingTemplate();
-                                                                MappingApiToModel.mapBindingTemplate(rec.getChangeRecordNewData().getBindingTemplate(), modelT, model);
-                                                                MappingApiToModel.mapOperationalInfo(model, rec.getChangeRecordNewData().getOperationalInfo());
-                                                                em.persist(model);
-                                                        }
-
-                                                } else if (rec.getChangeRecordNewData().getBusinessEntity() != null) {
-
-                                                        BusinessEntity model = em.find(org.apache.juddi.model.BusinessEntity.class, rec.getChangeRecordNewData().getBusinessEntity().getBusinessKey());
-                                                        if (model == null) {
-                                                                model = new BusinessEntity();
-                                                        } else {
-                                                                ValidateNodeIdMatches(model.getNodeId(), rec.getChangeRecordNewData().getOperationalInfo());
-                                                        }
-                                                        MappingApiToModel.mapBusinessEntity(rec.getChangeRecordNewData().getBusinessEntity(), model);
-                                                        MappingApiToModel.mapOperationalInfo(model, rec.getChangeRecordNewData().getOperationalInfo());
-
-                                                        em.persist(model);
-
-                                                }
-                                                if (rec.getChangeRecordNewData().getBusinessService() != null) {
-                                                        BusinessEntity find = em.find(org.apache.juddi.model.BusinessEntity.class, rec.getChangeRecordNewData().getBusinessService().getBusinessKey());
-                                                        if (find == null) {
-                                                                logger.error("Replication error, attempting to insert a service where the business doesn't exist yet");
-                                                        } else {
-                                                                org.apache.juddi.model.BusinessService model = new org.apache.juddi.model.BusinessService();
-                                                                MappingApiToModel.mapBusinessService(rec.getChangeRecordNewData().getBusinessService(), model, find);
-                                                                MappingApiToModel.mapOperationalInfo(model, rec.getChangeRecordNewData().getOperationalInfo());
-
-                                                                em.persist(model);
-                                                        }
-
-                                                } else if (rec.getChangeRecordNewData().getTModel() != null) {
-                                                        Tmodel model = new Tmodel();
-                                                        MappingApiToModel.mapTModel(rec.getChangeRecordNewData().getTModel(), model);
-
-                                                        MappingApiToModel.mapOperationalInfo(model, rec.getChangeRecordNewData().getOperationalInfo());
-
-                                                        em.persist(model);
-                                                }
-
-                                        }
-
-                                }
+                            //if it exists, 
+                            //      confirm the owning node, it shouldn't be the local node id, if it is, throw
+                            //      the owning node should be the same as it was before
+
+                            BusinessService model = em.find(org.apache.juddi.model.BusinessService.class, rec.getChangeRecordNewData().getBindingTemplate().getServiceKey());
+                            if (model == null) {
+                                logger.error("Replication error, attempting to insert a binding where the service doesn't exist yet");
+                            } else {
+                                ValidateNodeIdMatches(model.getNodeId(), rec.getChangeRecordNewData().getOperationalInfo());
+                                
+                                org.apache.juddi.model.BindingTemplate modelT = new org.apache.juddi.model.BindingTemplate();
+                                MappingApiToModel.mapBindingTemplate(rec.getChangeRecordNewData().getBindingTemplate(), modelT, model);
+                                MappingApiToModel.mapOperationalInfo(model, rec.getChangeRecordNewData().getOperationalInfo());
+                                em.persist(model);
+                            }
+                            
+                        } else if (rec.getChangeRecordNewData().getBusinessEntity() != null) {
+                            
+                            BusinessEntity model = em.find(org.apache.juddi.model.BusinessEntity.class, rec.getChangeRecordNewData().getBusinessEntity().getBusinessKey());
+                            if (model == null) {
+                                model = new BusinessEntity();
+                            } else {
+                                ValidateNodeIdMatches(model.getNodeId(), rec.getChangeRecordNewData().getOperationalInfo());
+                            }
+                            MappingApiToModel.mapBusinessEntity(rec.getChangeRecordNewData().getBusinessEntity(), model);
+                            MappingApiToModel.mapOperationalInfo(model, rec.getChangeRecordNewData().getOperationalInfo());
+                            
+                            em.persist(model);
+                            
+                        }
+                        if (rec.getChangeRecordNewData().getBusinessService() != null) {
+                            BusinessEntity find = em.find(org.apache.juddi.model.BusinessEntity.class, rec.getChangeRecordNewData().getBusinessService().getBusinessKey());
+                            if (find == null) {
+                                logger.error("Replication error, attempting to insert a service where the business doesn't exist yet");
+                            } else {
+                                org.apache.juddi.model.BusinessService model = new org.apache.juddi.model.BusinessService();
+                                MappingApiToModel.mapBusinessService(rec.getChangeRecordNewData().getBusinessService(), model, find);
+                                MappingApiToModel.mapOperationalInfo(model, rec.getChangeRecordNewData().getOperationalInfo());
+                                
+                                em.persist(model);
+                            }
+                            
+                        } else if (rec.getChangeRecordNewData().getTModel() != null) {
+                            Tmodel model = new Tmodel();
+                            MappingApiToModel.mapTModel(rec.getChangeRecordNewData().getTModel(), model);
+                            
+                            MappingApiToModel.mapOperationalInfo(model, rec.getChangeRecordNewData().getOperationalInfo());
+                            
+                            em.persist(model);
+                        }
+                        
+                    }
+                    
+                }
 //</editor-fold>
 
                                 // changeRecordNull no action needed
-                                // changeRecordHide tmodel only
-                                //<editor-fold defaultstate="collapsed" desc="hide tmodel">
-                                if (rec.getChangeRecordHide() != null) {
-                                        /*
-                                         A changeRecordHide element corresponds to the behavior of hiding a tModel described in the delete_tModel in the Publish API section of this Specification.  A tModel listed in a changeRecordHide should be marked as hidden, so that it is not returned in response to a find_tModel API call.
+                // changeRecordHide tmodel only
+                //<editor-fold defaultstate="collapsed" desc="hide tmodel">
+                if (rec.getChangeRecordHide() != null) {
+                    /*
+                     A changeRecordHide element corresponds to the behavior of hiding a tModel described in the delete_tModel in the Publish API section of this Specification.  A tModel listed in a changeRecordHide should be marked as hidden, so that it is not returned in response to a find_tModel API call.
                                         
-                                         The changeRecordHide MUST contain a modified timestamp to allow multi-node registries to calculate consistent modifiedIncludingChildren timestamps as described in Section 3.8 operationalInfo Structure.
-                                         */
-                                        String key = rec.getChangeRecordHide().getTModelKey();
-                                        org.apache.juddi.model.Tmodel existing = em.find(org.apache.juddi.model.Tmodel.class, key);
-                                        if (existing == null) {
-                                                logger.error("Unexpected delete/hide tmodel message received for non existing key " + key);
-                                        } else {
-                                                existing.setDeleted(true);
-                                                existing.setModified(rec.getChangeRecordHide().getModified().toGregorianCalendar().getTime());
-                                                existing.setModifiedIncludingChildren(rec.getChangeRecordHide().getModified().toGregorianCalendar().getTime());
-                                                em.persist(existing);
-                                        }
-                                }
+                     The changeRecordHide MUST contain a modified timestamp to allow multi-node registries to calculate consistent modifiedIncludingChildren timestamps as described in Section 3.8 operationalInfo Structure.
+                     */
+                    String key = rec.getChangeRecordHide().getTModelKey();
+                    org.apache.juddi.model.Tmodel existing = em.find(org.apache.juddi.model.Tmodel.class, key);
+                    if (existing == null) {
+                        logger.error("Unexpected delete/hide tmodel message received for non existing key " + key);
+                    } else {
+                        existing.setDeleted(true);
+                        existing.setModified(rec.getChangeRecordHide().getModified().toGregorianCalendar().getTime());
+                        existing.setModifiedIncludingChildren(rec.getChangeRecordHide().getModified().toGregorianCalendar().getTime());
+                        em.persist(existing);
+                    }
+                }
 //</editor-fold>
 
-                                //<editor-fold defaultstate="collapsed" desc="changeRecordPublisherAssertion">
-                                if (rec.getChangeRecordPublisherAssertion() != null) {
+                //<editor-fold defaultstate="collapsed" desc="changeRecordPublisherAssertion">
+                if (rec.getChangeRecordPublisherAssertion() != null) {
 //TODO implement
-                                }
+                }
 //</editor-fold>
 
-                                tx.commit();
-
-                        } catch (Exception drfm) {
-                                logger.warn(drfm);
-                        } finally {
-                                if (tx.isActive()) {
-                                        tx.rollback();
-                                }
-                                em.close();
-                        }
+                tx.commit();
+                
+            } catch (Exception drfm) {
+                logger.warn(drfm);
+            } finally {
+                if (tx.isActive()) {
+                    tx.rollback();
                 }
-
+                em.close();
+            }
         }
-
-        private static void ValidateNodeIdMatches(String nodeId, OperationalInfo operationalInfo) throws Exception {
-                if (nodeId == null || operationalInfo == null) {
-                        throw new Exception("either the local node ID is null or the inbound replication data's node id is null");
-                }
-                if (!nodeId.equals(operationalInfo.getNodeID())) {
-                        throw new Exception("node id mismatch!");
-                }
+        
+    }
+    
+    private static void ValidateNodeIdMatches(String nodeId, OperationalInfo operationalInfo) throws Exception {
+        if (nodeId == null || operationalInfo == null) {
+            throw new Exception("either the local node ID is null or the inbound replication data's node id is null");
         }
-
-        private synchronized UDDIReplicationPortType getReplicationClient(String node) {
-                if (cache.containsKey(node)) {
-                        return cache.get(node);
-                }
-                UDDIService svc = new UDDIService();
-                UDDIReplicationPortType replicationClient = svc.getUDDIReplicationPort();
-                EntityManager em = PersistenceManager.getEntityManager();
-                EntityTransaction tx = em.getTransaction();
-                try {
-                        Node find = em.find(org.apache.juddi.model.Node.class, node);
-                        ((BindingProvider) replicationClient).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, find.getReplicationUrl());
-                        cache.put(node, replicationClient);
-                        return replicationClient;
-                } catch (Exception ex) {
-                        logger.fatal("Node not found!" + node, ex);
-                } finally {
-                        if (tx.isActive()) {
-                                tx.rollback();
-                        }
-                        em.close();
-                }
-                em.close();
-                return null;
-
+        if (!nodeId.equals(operationalInfo.getNodeID())) {
+            throw new Exception("node id mismatch!");
+        }
+    }
+    
+    private synchronized UDDIReplicationPortType getReplicationClient(String node) {
+        if (cache.containsKey(node)) {
+            return cache.get(node);
         }
-        private Map<String, UDDIReplicationPortType> cache = new HashMap<String, UDDIReplicationPortType>();
+        UDDIService svc = new UDDIService();
+        UDDIReplicationPortType replicationClient = svc.getUDDIReplicationPort();
+        EntityManager em = PersistenceManager.getEntityManager();
+        EntityTransaction tx = em.getTransaction();
+        try {
+            Node find = em.find(org.apache.juddi.model.Node.class, node);
+            ((BindingProvider) replicationClient).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, find.getReplicationUrl());
+            cache.put(node, replicationClient);
+            return replicationClient;
+        } catch (Exception ex) {
+            logger.fatal("Node not found!" + node, ex);
+        } finally {
+            if (tx.isActive()) {
+                tx.rollback();
+            }
+            em.close();
+        }
+        em.close();
+        return null;
+        
+    }
+    private Map<String, UDDIReplicationPortType> cache = new HashMap<String, UDDIReplicationPortType>();
+
+    /**
+     * @since 3.3
+     * @param body
+     * @return
+     * @throws DispositionReportFaultMessage
+     */
+    public String doPing(DoPing body) throws DispositionReportFaultMessage {
+        long startTime = System.currentTimeMillis();
+        long procTime = System.currentTimeMillis() - startTime;
+        serviceCounter.update(ReplicationQuery.DO_PING, QueryStatus.SUCCESS, procTime);
+        
+        return node;
+        
+    }
+    
+    @Override
+    public List<ChangeRecord> getChangeRecords(String requestingNode,
+            HighWaterMarkVectorType changesAlreadySeen,
+            BigInteger responseLimitCount,
+            HighWaterMarkVectorType responseLimitVector)
+            throws DispositionReportFaultMessage {
+        long startTime = System.currentTimeMillis();
+        
+        new ValidateReplication(null).validateGetChangeRecords(requestingNode, changesAlreadySeen, responseLimitCount, responseLimitVector, FetchEdges(), ctx);
+
+        //TODO should we validate that "requestingNode" is in the replication config?
+        List<ChangeRecord> ret = new ArrayList<ChangeRecord>();
+        EntityManager em = PersistenceManager.getEntityManager();
+        EntityTransaction tx = em.getTransaction();
 
         /**
-         * @since 3.3
-         * @param body
-         * @return
-         * @throws DispositionReportFaultMessage
+         * More specifically, the recipient determines the particular change
+         * records that are returned by comparing the originating USNs in the
+         * caller’s high water mark vector with the originating USNs of each of
+         * the changes the recipient has seen from others or generated by
+         * itself. The recipient SHOULD only return change records that have
+         * originating USNs that are greater than those listed in the
+         * changesAlreadySeen highWaterMarkVector and less than the limit
+         * required by either the responseLimitCount or the responseLimitVector.
+         *
+         *
+         * Part of the message is a high water mark vector that contains for
+         * each node of the registry the originating USN of the most recent
+         * change record that has been successfully processed by the invocating
+         * node
          */
-        public String doPing(DoPing body) throws DispositionReportFaultMessage {
-                long startTime = System.currentTimeMillis();
-                long procTime = System.currentTimeMillis() - startTime;
-                serviceCounter.update(ReplicationQuery.DO_PING, QueryStatus.SUCCESS, procTime);
-
-                return node;
-
+        int maxrecords = 100;
+        if (responseLimitCount != null) {
+            maxrecords = responseLimitCount.intValue();
         }
-
-        @Override
-        public List<ChangeRecord> getChangeRecords(String requestingNode,
-             HighWaterMarkVectorType changesAlreadySeen,
-             BigInteger responseLimitCount,
-             HighWaterMarkVectorType responseLimitVector)
-             throws DispositionReportFaultMessage {
-                long startTime = System.currentTimeMillis();
-
-                new ValidateReplication(null).validateGetChangeRecords(requestingNode, changesAlreadySeen, responseLimitCount, responseLimitVector, FetchEdges(), ctx);
-
-                //TODO should we validate that "requestingNode" is in the replication config?
-                List<ChangeRecord> ret = new ArrayList<ChangeRecord>();
-                EntityManager em = PersistenceManager.getEntityManager();
-                EntityTransaction tx = em.getTransaction();
-
-                /**
-                 * More specifically, the recipient determines the particular
-                 * change records that are returned by comparing the originating
-                 * USNs in the caller’s high water mark vector with the
-                 * originating USNs of each of the changes the recipient has
-                 * seen from others or generated by itself. The recipient SHOULD
-                 * only return change records that have originating USNs that
-                 * are greater than those listed in the changesAlreadySeen
-                 * highWaterMarkVector and less than the limit required by
-                 * either the responseLimitCount or the responseLimitVector.
-                 *
-                 *
-                 * Part of the message is a high water mark vector that contains
-                 * for each node of the registry the originating USN of the most
-                 * recent change record that has been successfully processed by
-                 * the invocating node
-                 */
-                int maxrecords = 100;
-                if (responseLimitCount != null) {
-                        maxrecords = responseLimitCount.intValue();
-                }
-                try {
-                        tx.begin();
-                        Long firstrecord = 1L;
-                        Long lastrecord = null;
-
-                        if (changesAlreadySeen != null) {
+        try {
+            tx.begin();
+            Long firstrecord = 1L;
+            Long lastrecord = null;
+            
+            if (changesAlreadySeen != null) {
                                 //this is basically a lower limit (i.e. the newest record that was processed by the requestor
-                                //therefore we want the oldest record stored locally to return to the requestor for processing
-                                for (int i = 0; i < changesAlreadySeen.getHighWaterMark().size(); i++) {
-                                        if (responseLimitVector.getHighWaterMark().get(i).getNodeID().equals(node)) {
-                                                firstrecord = changesAlreadySeen.getHighWaterMark().get(i).getOriginatingUSN() + 1;
-                                        }
-                                }
-                        }
-                        if (responseLimitVector != null) {
+                //therefore we want the oldest record stored locally to return to the requestor for processing
+                for (int i = 0; i < changesAlreadySeen.getHighWaterMark().size(); i++) {
+                    if (responseLimitVector.getHighWaterMark().get(i).getNodeID().equals(node)) {
+                        firstrecord = changesAlreadySeen.getHighWaterMark().get(i).getOriginatingUSN() + 1;
+                    }
+                }
+            }
+            if (responseLimitVector != null) {
                                 //using responseLimitVector, indicating for each node in the graph the first change originating there that he does not wish to be returned.
-                                //upper limit basically
-                                for (int i = 0; i < responseLimitVector.getHighWaterMark().size(); i++) {
-                                        if (responseLimitVector.getHighWaterMark().get(i).getNodeID().equals(node)) {
-                                                lastrecord = responseLimitVector.getHighWaterMark().get(i).getOriginatingUSN();
-                                        }
-                                }
-                        }
-
-                        Query createQuery = null;
-                        if (lastrecord != null) {
-                                createQuery = em.createQuery("select e from ChangeRecord e where (e.id > :inbound and e.nodeID = :node and e.id < :lastrecord) OR (e.originatingUSN > :inbound and e.nodeID != :node and e.originatingUSN < :lastrecord) order by e.id ASC");
-                                createQuery.setParameter("lastrecord", lastrecord);
-                        } else {
-                                createQuery = em.createQuery("select e from ChangeRecord e where (e.id > :inbound and e.nodeID = :node) OR (e.originatingUSN > :inbound and e.nodeID != :node) order by e.id ASC");
-                        }
-                        createQuery.setMaxResults(maxrecords);
-                        createQuery.setParameter("inbound", firstrecord);
-                        createQuery.setParameter("node", node);
-
-                        List<org.apache.juddi.model.ChangeRecord> records = (List<org.apache.juddi.model.ChangeRecord>) (org.apache.juddi.model.ChangeRecord) createQuery.getResultList();
-                        for (int i = 0; i < records.size(); i++) {
-                                ChangeRecord r = MappingModelToApi.mapChangeRecord(records.get(i));
-                                if (!Excluded(changesAlreadySeen, r)) {
-                                        ret.add(r);
-                                }
-
-                        }
-
-                        tx.rollback();
-                        long procTime = System.currentTimeMillis() - startTime;
-                        serviceCounter.update(ReplicationQuery.GET_CHANGERECORDS,
-                             QueryStatus.SUCCESS, procTime);
-
-                } catch (Exception ex) {
-                        logger.fatal("Error, this node is: " + node, ex);
-                        throw new FatalErrorException(new ErrorMessage("E_fatalError", ex.getMessage()));
-
-                } finally {
-                        if (tx.isActive()) {
-                                tx.rollback();
-                        }
-                        em.close();
+                //upper limit basically
+                for (int i = 0; i < responseLimitVector.getHighWaterMark().size(); i++) {
+                    if (responseLimitVector.getHighWaterMark().get(i).getNodeID().equals(node)) {
+                        lastrecord = responseLimitVector.getHighWaterMark().get(i).getOriginatingUSN();
+                    }
+                }
+            }
+            
+            Query createQuery = null;
+            if (lastrecord != null) {
+                createQuery = em.createQuery("select e from ChangeRecord e where (e.id > :inbound and e.nodeID = :node and e.id < :lastrecord) OR (e.originatingUSN > :inbound and e.nodeID != :node and e.originatingUSN < :lastrecord) order by e.id ASC");
+                createQuery.setParameter("lastrecord", lastrecord);
+            } else {
+                createQuery = em.createQuery("select e from ChangeRecord e where (e.id > :inbound and e.nodeID = :node) OR (e.originatingUSN > :inbound and e.nodeID != :node) order by e.id ASC");
+            }
+            createQuery.setMaxResults(maxrecords);
+            createQuery.setParameter("inbound", firstrecord);
+            createQuery.setParameter("node", node);
+            
+            List<org.apache.juddi.model.ChangeRecord> records = (List<org.apache.juddi.model.ChangeRecord>) (org.apache.juddi.model.ChangeRecord) createQuery.getResultList();
+            for (int i = 0; i < records.size(); i++) {
+                ChangeRecord r = MappingModelToApi.mapChangeRecord(records.get(i));
+                if (!Excluded(changesAlreadySeen, r)) {
+                    ret.add(r);
                 }
-                return ret;
+                
+            }
+            
+            tx.rollback();
+            long procTime = System.currentTimeMillis() - startTime;
+            serviceCounter.update(ReplicationQuery.GET_CHANGERECORDS,
+                    QueryStatus.SUCCESS, procTime);
+            
+        } catch (Exception ex) {
+            logger.fatal("Error, this node is: " + node, ex);
+            throw new FatalErrorException(new ErrorMessage("E_fatalError", ex.getMessage()));
+            
+        } finally {
+            if (tx.isActive()) {
+                tx.rollback();
+            }
+            em.close();
         }
-
-        /**
-         * This UDDI API message provides a means to obtain a list of
-         * highWaterMark element containing the highest known USN for all nodes
-         * in the replication graph. If there is no graph, we just return the
-         * local bits
-         *
-         * @return
-         * @throws DispositionReportFaultMessage
-         */
-        @Override
-        public List<ChangeRecordIDType> getHighWaterMarks()
-             throws DispositionReportFaultMessage {
-                long startTime = System.currentTimeMillis();
-
-                List<ChangeRecordIDType> ret = new ArrayList<ChangeRecordIDType>();
-
-                //fetch from database the highest known watermark
-                ReplicationConfiguration FetchEdges = FetchEdges();
-
-                EntityManager em = PersistenceManager.getEntityManager();
-                EntityTransaction tx = em.getTransaction();
-                try {
-                        tx.begin();
-                        if (FetchEdges != null) {
-                                Iterator<String> it = FetchEdges.getCommunicationGraph().getNode().iterator();
-                                while (it.hasNext()) {
-                                        String nextNode = it.next();
-                                        if (!nextNode.equals(node)) {
-
-                                                Long id = (Long) em.createQuery("select e.originatingUSN from ChangeRecord e where e.nodeID = :node order by e.originatingUSN desc").setParameter("node", nextNode).setMaxResults(1).getSingleResult();
-                                                if (id == null) {
-                                                        id = 0L;
-                                                        //per the spec
-                                                }
-                                                ChangeRecordIDType x = new ChangeRecordIDType(nextNode, id);
-                                                ret.add(x);
-                                        }
-                                }
+        return ret;
+    }
+
+    /**
+     * This UDDI API message provides a means to obtain a list of highWaterMark
+     * element containing the highest known USN for all nodes in the replication
+     * graph. If there is no graph, we just return the local bits
+     *
+     * @return
+     * @throws DispositionReportFaultMessage
+     */
+    @Override
+    public List<ChangeRecordIDType> getHighWaterMarks()
+            throws DispositionReportFaultMessage {
+        long startTime = System.currentTimeMillis();
+        
+        List<ChangeRecordIDType> ret = new ArrayList<ChangeRecordIDType>();
+
+        //fetch from database the highest known watermark
+        ReplicationConfiguration FetchEdges = FetchEdges();
+        
+        EntityManager em = PersistenceManager.getEntityManager();
+        EntityTransaction tx = em.getTransaction();
+        try {
+            tx.begin();
+            if (FetchEdges != null) {
+                Iterator<String> it = FetchEdges.getCommunicationGraph().getNode().iterator();
+                while (it.hasNext()) {
+                    String nextNode = it.next();
+                    if (!nextNode.equals(node)) {
+                        
+                        Long id = 0L;
+                        try {
+                            id = (Long) em.createQuery("select e.originatingUSN from ChangeRecord e where e.nodeID = :node order by e.originatingUSN desc").setParameter("node", nextNode).setMaxResults(1).getSingleResult();
+                        } catch (Exception ex) {
+                            logger.debug(ex);
                         }
-                        //dont forget this node
-                        Long id = (Long) em.createQuery("select (e.id) from ChangeRecord e where e.nodeID = :node  order by e.id desc").setParameter("node", node).setMaxResults(1).getSingleResult();
                         if (id == null) {
-                                id = 0L;
+                            id = 0L;
+                            //per the spec
                         }
-                        ChangeRecordIDType x = new ChangeRecordIDType();
-                        x.setNodeID(node);
-                        x.setOriginatingUSN(id);
+                        ChangeRecordIDType x = new ChangeRecordIDType(nextNode, id);
+                        
                         ret.add(x);
-
-                        tx.rollback();
-                        long procTime = System.currentTimeMillis() - startTime;
-                        serviceCounter.update(ReplicationQuery.GET_HIGHWATERMARKS, QueryStatus.SUCCESS, procTime);
-
-                } catch (Exception drfm) {
-                        throw new FatalErrorException(new ErrorMessage("E_fatalError", drfm.getMessage()));
-
-                } finally {
-                        if (tx.isActive()) {
-                                tx.rollback();
-                        }
-                        em.close();
+                        
+                    }
                 }
-
-                return ret;
+            }
+            //dont forget this node
+            Long id = (Long) em.createQuery("select (e.id) from ChangeRecord e where e.nodeID = :node  order by e.id desc").setParameter("node", node).setMaxResults(1).getSingleResult();
+            if (id == null) {
+                id = 0L;
+            }
+            ChangeRecordIDType x = new ChangeRecordIDType();
+            x.setNodeID(node);
+            x.setOriginatingUSN(id);
+            ret.add(x);
+            
+            tx.rollback();
+            long procTime = System.currentTimeMillis() - startTime;
+            serviceCounter.update(ReplicationQuery.GET_HIGHWATERMARKS, QueryStatus.SUCCESS, procTime);
+            
+        } catch (Exception drfm) {
+            throw new FatalErrorException(new ErrorMessage("E_fatalError", drfm.getMessage()));
+            
+        } finally {
+            if (tx.isActive()) {
+                tx.rollback();
+            }
+            em.close();
         }
-
-        /**
-         * this means that another node has a change and we need to pick up the
-         * change and apply it to our local database.
-         *
-         * @param body
-         * @throws DispositionReportFaultMessage
-         */
-        @Override
-        public void notifyChangeRecordsAvailable(NotifyChangeRecordsAvailable body)
-             throws DispositionReportFaultMessage {
-                long startTime = System.currentTimeMillis();
-                long procTime = System.currentTimeMillis() - startTime;
-                serviceCounter.update(ReplicationQuery.NOTIFY_CHANGERECORDSAVAILABLE,
-                     QueryStatus.SUCCESS, procTime);
+        
+        
+        
+        return ret;
+    }
+
+    /**
+     * this means that another node has a change and we need to pick up the
+     * change and apply it to our local database.
+     *
+     * @param body
+     * @throws DispositionReportFaultMessage
+     */
+    @Override
+    public void notifyChangeRecordsAvailable(NotifyChangeRecordsAvailable body)
+            throws DispositionReportFaultMessage {
+        long startTime = System.currentTimeMillis();
+        long procTime = System.currentTimeMillis() - startTime;
+        serviceCounter.update(ReplicationQuery.NOTIFY_CHANGERECORDSAVAILABLE,
+                QueryStatus.SUCCESS, procTime);
                 //some other node just told us there's new records available, call
-                //getChangeRecords from the remote node asynch
-
-                new ValidateReplication(null).validateNotifyChangeRecordsAvailable(body, ctx);
-
-                queue.add(body);
+        //getChangeRecords from the remote node asynch
+
+        new ValidateReplication(null).validateNotifyChangeRecordsAvailable(body, ctx);
+        
+        queue.add(body);
+
+        //ValidateReplication.unsupportedAPICall();
+    }
+    private static Queue<NotifyChangeRecordsAvailable> queue = null;
+
+    /**
+     * transfers custody of an entity from node1/user1 to node2/user2
+     *
+     * @param body
+     * @throws DispositionReportFaultMessage
+     */
+    @Override
+    public void transferCustody(TransferCustody body)
+            throws DispositionReportFaultMessage {
+        long startTime = System.currentTimeMillis();
 
-                //ValidateReplication.unsupportedAPICall();
-        }
-        private static Queue<NotifyChangeRecordsAvailable> queue = null;
+                //*this node is transfering data to another node
+        //body.getTransferOperationalInfo().
+        ValidateReplication.unsupportedAPICall();
+        
+        EntityManager em = PersistenceManager.getEntityManager();
+        //EntityTransaction tx = em.getTransaction();
 
         /**
-         * transfers custody of an entity from node1/user1 to node2/user2
+         * The custodial node must verify that it has granted permission to
+         * transfer the entities identified and that this permission is still
+         * valid. This operation is comprised of two steps:
+         *
+         * 1. Verification that the transferToken was issued by it, that it has
+         * not expired, that it represents the authority to transfer no more and
+         * no less than those entities identified by the businessKey and
+         * tModelKey elements and that all these entities are still valid and
+         * not yet transferred. The transferToken is invalidated if any of these
+         * conditions are not met.
+         *
+         * 2. If the conditions above are met, the custodial node will prevent
+         * any further changes to the entities identified by the businessKey and
+         * tModelKey elements identified. The entity will remain in this state
+         * until the replication stream indicates it has been successfully
+         * processed via the replication stream. Upon successful verification of
+         * the custody transfer request by the custodial node, an empty message
+         * is returned by it indicating the success of the request and
+         * acknowledging the custody transfer. Following the issue of the empty
+         * message, the custodial node will submit into the replication stream a
+         * changeRecordNewData providing in the operationalInfo, the nodeID
+         * accepting custody of the datum and the authorizedName of the
+         * publisher accepting ownership. The acknowledgmentRequested attribute
+         * of this change record MUST be set to "true".
          *
-         * @param body
-         * @throws DispositionReportFaultMessage
+         * TODO enqueue Replication message
+         *
+         * Finally, the custodial node invalidates the transferToken in order to
+         * prevent additional calls of the transfer_entities API.
          */
-        @Override
-        public void transferCustody(TransferCustody body)
-             throws DispositionReportFaultMessage {
-                long startTime = System.currentTimeMillis();
-
-                //*this node is transfering data to another node
-                //body.getTransferOperationalInfo().
-                ValidateReplication.unsupportedAPICall();
-
-                EntityManager em = PersistenceManager.getEntityManager();
-                //EntityTransaction tx = em.getTransaction();
-
-                /**
-                 * The custodial node must verify that it has granted permission
-                 * to transfer the entities identified and that this permission
-                 * is still valid. This operation is comprised of two steps: 
-                 * 
-                 * 1.
-                 * Verification that the transferToken was issued by it, that it
-                 * has not expired, that it represents the authority to transfer
-                 * no more and no less than those entities identified by the
-                 * businessKey and tModelKey elements and that all these
-                 * entities are still valid and not yet transferred. The
-                 * transferToken is invalidated if any of these conditions are
-                 * not met. 
-                 * 
-                 * 2. If the conditions above are met, the custodial
-                 * node will prevent any further changes to the entities
-                 * identified by the businessKey and tModelKey elements
-                 * identified. The entity will remain in this state until the
-                 * replication stream indicates it has been successfully
-                 * processed via the replication stream. Upon successful
-                 * verification of the custody transfer request by the custodial
-                 * node, an empty message is returned by it indicating the
-                 * success of the request and acknowledging the custody
-                 * transfer. Following the issue of the empty message, the
-                 * custodial node will submit into the replication stream a
-                 * changeRecordNewData providing in the operationalInfo, the
-                 * nodeID accepting custody of the datum and the authorizedName
-                 * of the publisher accepting ownership. The
-                 * acknowledgmentRequested attribute of this change record MUST
-                 * be set to "true".
-                 *
-                 * TODO enqueue Replication message 
-                 * 
-                 * Finally, the custodial node
-                 * invalidates the transferToken in order to prevent additional
-                 * calls of the transfer_entities API.
-                 */
-                DiscardTransferToken dtt = new DiscardTransferToken();
-                dtt.setKeyBag(body.getKeyBag());
-                dtt.setTransferToken(body.getTransferToken());
-                new UDDICustodyTransferImpl().discardTransferToken(dtt);
-        }
-
+        DiscardTransferToken dtt = new DiscardTransferToken();
+        dtt.setKeyBag(body.getKeyBag());
+        dtt.setTransferToken(body.getTransferToken());
+        new UDDICustodyTransferImpl().discardTransferToken(dtt);
+    }
+    
 }

http://git-wip-us.apache.org/repos/asf/juddi/blob/7aa78f62/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDISubscriptionListenerImpl.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDISubscriptionListenerImpl.java b/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDISubscriptionListenerImpl.java
index d1a1f3f..a6239b1 100644
--- a/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDISubscriptionListenerImpl.java
+++ b/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDISubscriptionListenerImpl.java
@@ -88,7 +88,7 @@ public class UDDISubscriptionListenerImpl extends AuthenticatedService implement
 					throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.SubscripKeyNotFound", subscriptionKey));
 				}
 				apiClientSubscriptionInfo = new org.apache.juddi.api_v3.ClientSubscriptionInfo();
-				MappingModelToApi.mapClientSubscriptionInfo(modelClientSubscriptionInfo, apiClientSubscriptionInfo);
+				MappingModelToApi.mapClientSubscriptionInfo(modelClientSubscriptionInfo, apiClientSubscriptionInfo,em);
 		
 				tx.commit();
 			} finally {

http://git-wip-us.apache.org/repos/asf/juddi/blob/7aa78f62/juddi-core/src/main/java/org/apache/juddi/mapping/MappingApiToModel.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/mapping/MappingApiToModel.java b/juddi-core/src/main/java/org/apache/juddi/mapping/MappingApiToModel.java
index 7297311..65739a4 100644
--- a/juddi-core/src/main/java/org/apache/juddi/mapping/MappingApiToModel.java
+++ b/juddi-core/src/main/java/org/apache/juddi/mapping/MappingApiToModel.java
@@ -1071,7 +1071,7 @@ public class MappingApiToModel {
                         if (apiClerk.getNode() != null) {
                                 org.apache.juddi.model.Node modelNode = new org.apache.juddi.model.Node();
                                 mapNode(apiClerk.getNode(), modelNode);
-                                modelClerk.setNode(modelNode);
+                                modelClerk.setNode(modelNode.getName());
                         }
                 }
         }

http://git-wip-us.apache.org/repos/asf/juddi/blob/7aa78f62/juddi-core/src/main/java/org/apache/juddi/mapping/MappingModelToApi.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/mapping/MappingModelToApi.java b/juddi-core/src/main/java/org/apache/juddi/mapping/MappingModelToApi.java
index 8a4f1c1..0b5d9a3 100644
--- a/juddi-core/src/main/java/org/apache/juddi/mapping/MappingModelToApi.java
+++ b/juddi-core/src/main/java/org/apache/juddi/mapping/MappingModelToApi.java
@@ -30,6 +30,7 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.logging.Level;
 import java.util.logging.Logger;
+import javax.persistence.EntityManager;
 import javax.xml.bind.JAXB;
 import javax.xml.bind.JAXBElement;
 
@@ -1111,7 +1112,7 @@ public class MappingModelToApi {
         }
 
         public static void mapClientSubscriptionInfo(org.apache.juddi.model.ClientSubscriptionInfo modelClientSubscriptionInfo,
-             org.apache.juddi.api_v3.ClientSubscriptionInfo apiClientSubscriptionInfo)
+             org.apache.juddi.api_v3.ClientSubscriptionInfo apiClientSubscriptionInfo, EntityManager em)
              throws DispositionReportFaultMessage {
 
                 apiClientSubscriptionInfo.setSubscriptionKey(modelClientSubscriptionInfo.getSubscriptionKey());
@@ -1125,18 +1126,18 @@ public class MappingModelToApi {
 
                 if (modelClientSubscriptionInfo.getFromClerk() != null) {
                         org.apache.juddi.api_v3.Clerk apiFromClerk = new org.apache.juddi.api_v3.Clerk();
-                        mapClerk(modelClientSubscriptionInfo.getFromClerk(), apiFromClerk);
+                        mapClerk(modelClientSubscriptionInfo.getFromClerk(), apiFromClerk,em);
                         apiClientSubscriptionInfo.setFromClerk(apiFromClerk);
                 }
                 if (modelClientSubscriptionInfo.getToClerk() != null) {
                         org.apache.juddi.api_v3.Clerk apiToClerk = new org.apache.juddi.api_v3.Clerk();
-                        mapClerk(modelClientSubscriptionInfo.getToClerk(), apiToClerk);
+                        mapClerk(modelClientSubscriptionInfo.getToClerk(), apiToClerk,em);
                         apiClientSubscriptionInfo.setToClerk(apiToClerk);
                 }
         }
 
         public static void mapClerk(org.apache.juddi.model.Clerk modelClerk,
-             org.apache.juddi.api_v3.Clerk apiClerk)
+             org.apache.juddi.api_v3.Clerk apiClerk,EntityManager em)
              throws DispositionReportFaultMessage {
 
                 apiClerk.setName(modelClerk.getClerkName());
@@ -1144,7 +1145,9 @@ public class MappingModelToApi {
                 apiClerk.setPublisher(modelClerk.getPublisherId());
                 if (modelClerk.getNode() != null) {
                         org.apache.juddi.api_v3.Node apiNode = new org.apache.juddi.api_v3.Node();
-                        mapNode(modelClerk.getNode(), apiNode);
+                        mapNode(
+                                em.find(org.apache.juddi.model.Node.class, modelClerk.getNode()) 
+                               , apiNode);
                         apiClerk.setNode(apiNode);
                 }
         }

http://git-wip-us.apache.org/repos/asf/juddi/blob/7aa78f62/juddi-core/src/main/java/org/apache/juddi/model/Clerk.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/model/Clerk.java b/juddi-core/src/main/java/org/apache/juddi/model/Clerk.java
index fe0ca52..3ed1368 100644
--- a/juddi-core/src/main/java/org/apache/juddi/model/Clerk.java
+++ b/juddi-core/src/main/java/org/apache/juddi/model/Clerk.java
@@ -20,7 +20,10 @@ import javax.persistence.Column;
 import javax.persistence.Entity;
 import javax.persistence.FetchType;
 import javax.persistence.Id;
+import javax.persistence.JoinColumn;
 import javax.persistence.ManyToOne;
+import javax.persistence.OneToMany;
+import javax.persistence.OneToOne;
 import javax.persistence.Table;
 import javax.persistence.Transient;
 
@@ -38,14 +41,19 @@ public class Clerk implements java.io.Serializable {
 	private String clerkName;
 	@Column(name="publisher_id", nullable = false, length=255)
 	private String publisherId;
-	@ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
-	private Node node;
+        //@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
+	//@OneToOne(cascade = CascadeType.PERSIST , fetch = FetchType.EAGER)
+        //@JoinColumn(name = "nodeid", nullable = false)
+	//@ManyToOne(fetch = FetchType.LAZY,  targetEntity = Node.class , cascade =  {CascadeType.PERSIST,  CascadeType.DETACH, CascadeType.MERGE, CascadeType.REFRESH })
+        
+        @Column (name="nodeid")
+        private String node;
 	@Column(name="cred", length=255)
 	private String cred;
 	
 	public Clerk() {}
 
-	public Clerk(String clerkName, String cred, Node node, String publisherId) {
+	public Clerk(String clerkName, String cred, String node, String publisherId) {
 		super();
 		this.clerkName = clerkName;
 		this.cred = cred;
@@ -69,11 +77,11 @@ public class Clerk implements java.io.Serializable {
 		this.publisherId = publisherId;
 	}
 
-	public Node getNode() {
+	public String getNode() {
 		return node;
 	}
 
-	public void setNode(Node node) {
+	public void setNode(String node) {
 		this.node = node;
 	}
 

http://git-wip-us.apache.org/repos/asf/juddi/blob/7aa78f62/juddi-core/src/main/java/org/apache/juddi/model/Node.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/model/Node.java b/juddi-core/src/main/java/org/apache/juddi/model/Node.java
index a085536..53fbe12 100644
--- a/juddi-core/src/main/java/org/apache/juddi/model/Node.java
+++ b/juddi-core/src/main/java/org/apache/juddi/model/Node.java
@@ -15,9 +15,17 @@ package org.apache.juddi.model;
  * limitations under the License.
  */
 
+import java.util.List;
+import java.util.Set;
+import javax.persistence.CascadeType;
 import javax.persistence.Column;
 import javax.persistence.Entity;
+import javax.persistence.FetchType;
 import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.OneToMany;
+import javax.persistence.OneToOne;
 import javax.persistence.Table;
 import javax.persistence.Transient;
 
@@ -61,7 +69,7 @@ public class Node implements java.io.Serializable {
 	private String factoryURLPkgs;
 	@Column(name="factory_naming_provider", nullable = true, length=255)
 	private String factoryNamingProvider;
-
+        
 	public Node() {}
 
 	public Node(String custodyTransferUrl, String inquiryUrl,
@@ -189,5 +197,7 @@ public class Node implements java.io.Serializable {
 	public void setFactoryNamingProvider(String factoryNamingProvider) {
 		this.factoryNamingProvider = factoryNamingProvider;
 	}
+        
+        
 
 }

http://git-wip-us.apache.org/repos/asf/juddi/blob/7aa78f62/juddi-core/src/main/java/org/apache/juddi/validation/ValidatePublish.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/validation/ValidatePublish.java b/juddi-core/src/main/java/org/apache/juddi/validation/ValidatePublish.java
index ca560f1..9d02d9c 100644
--- a/juddi-core/src/main/java/org/apache/juddi/validation/ValidatePublish.java
+++ b/juddi-core/src/main/java/org/apache/juddi/validation/ValidatePublish.java
@@ -90,6 +90,7 @@ import org.uddi.api_v3.SaveBusiness;
 import org.uddi.api_v3.SaveService;
 import org.uddi.api_v3.SaveTModel;
 import org.uddi.api_v3.TModel;
+import org.uddi.repl_v3.ReplicationConfiguration;
 import org.uddi.sub_v3.Subscription;
 import org.uddi.v3_service.DispositionReportFaultMessage;
 
@@ -2365,7 +2366,7 @@ public class ValidatePublish extends ValidateUDDIApi {
                 return TokenResolver.replaceTokens(url, p);
         }
 
-        public void validateDeleteNode(EntityManager em, DeleteNode nodeID) throws DispositionReportFaultMessage {
+        public void validateDeleteNode(EntityManager em, DeleteNode nodeID, ReplicationConfiguration cfg) throws DispositionReportFaultMessage {
                 if (nodeID == null) {
                         throw new InvalidKeyPassedException(new ErrorMessage("errors.deleteClerk.NoInput"));
                 }
@@ -2375,6 +2376,22 @@ public class ValidatePublish extends ValidateUDDIApi {
                 if (nodeID.getNodeID() == null || nodeID.getNodeID().trim().equalsIgnoreCase("")) {
                         throw new InvalidKeyPassedException(new ErrorMessage("errors.deleteNode.NoInput"));
                 }
+                //get the latest replication config
+                if (cfg!=null){
+                    if (cfg.getCommunicationGraph()!=null){
+                        for (String node : cfg.getCommunicationGraph().getNode()) {
+                            if (node.equals(nodeID.getNodeID()))
+                                throw new InvalidKeyPassedException(new ErrorMessage("errors.deleteNode.InReplicationConfig", nodeID.getNodeID()));
+                        }
+                        for (int i=0; i <cfg.getCommunicationGraph().getEdge().size(); i++){
+                            if (nodeID.getNodeID().equals(cfg.getCommunicationGraph().getEdge().get(i).getMessageReceiver()))
+                                throw new InvalidKeyPassedException(new ErrorMessage("errors.deleteNode.InReplicationConfig", nodeID.getNodeID()));
+                            if (nodeID.getNodeID().equals(cfg.getCommunicationGraph().getEdge().get(i).getMessageSender()))
+                                throw new InvalidKeyPassedException(new ErrorMessage("errors.deleteNode.InReplicationConfig", nodeID.getNodeID()));
+                            
+                        }
+                    }
+                }
 
         }
 

http://git-wip-us.apache.org/repos/asf/juddi/blob/7aa78f62/juddi-core/src/main/resources/messages.properties
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/resources/messages.properties b/juddi-core/src/main/resources/messages.properties
index 18f7cfc..9665589 100644
--- a/juddi-core/src/main/resources/messages.properties
+++ b/juddi-core/src/main/resources/messages.properties
@@ -107,7 +107,7 @@ errors.saveclientsubscriptionKey.NoInput=The SubscriptionKey must be provided
 errors.saveClerk.NoInput=At least one Clerk must be provided
 errors.saveNodes.NoInput=At least one Node must be provided
 errors.deleteNode.NoInput=A node id must be specified
-errors.deleteNode.NotFound=The specified node if could not be found.
+errors.deleteNode.NotFound=The specified node could not be found.
 errors.deleteClerk.NoInput=A clerk id must be specified
 errors.deleteClerk.NotFound=The specified clerk if could not be found.
 errors.savetmodel.NoInput=At least one tModel must be provided
@@ -292,4 +292,5 @@ errors.replication.negativeLimit=The specified response limit is either 0 or a n
 errors.replication.limitVectorNull=The high water mark vector limit specified OriginatingUSN is null or invalid
 errors.replication.limitVectorNoNode=No node name was specified
 errors.replication.configNodeNotFound=No specified node name is not currently registered as a node. Use the jUDDI Service API to register it. Node id: 
-errors.replication.configNull=No replication config was present in the message
\ No newline at end of file
+errors.replication.configNull=No replication config was present in the message
+errors.deleteNode.InReplicationConfig=The node to be deleted is currently referenced in the replication configuration. You must revise the configuration before deleting the node, 
\ No newline at end of file


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


[8/9] juddi git commit: JUDDI-241 get/set replication cfg now works for all sub elements. notify changes works, however getChangeRecords fails when called from within the tomcat container.

Posted by al...@apache.org.
JUDDI-241 get/set replication cfg now works for all sub elements. notify changes works, however getChangeRecords fails when called from within the tomcat container.


Project: http://git-wip-us.apache.org/repos/asf/juddi/repo
Commit: http://git-wip-us.apache.org/repos/asf/juddi/commit/22a846dd
Tree: http://git-wip-us.apache.org/repos/asf/juddi/tree/22a846dd
Diff: http://git-wip-us.apache.org/repos/asf/juddi/diff/22a846dd

Branch: refs/heads/JUDDI-241
Commit: 22a846ddb5fe2c79b23967a81899c214312fc2be
Parents: 03dce36
Author: Alex <al...@apache.org>
Authored: Sun Nov 23 19:52:30 2014 -0500
Committer: Alex <al...@apache.org>
Committed: Sun Nov 23 19:52:30 2014 -0500

----------------------------------------------------------------------
 .../src/test/resources/META-INF/persistence.xml |    3 +-
 .../juddi/api/impl/AuthenticatedService.java    |    5 +
 .../org/apache/juddi/api/impl/JUDDIApiImpl.java |   83 +-
 .../juddi/api/impl/UDDIReplicationImpl.java     | 1088 ++++++++++--------
 .../apache/juddi/mapping/MappingApiToModel.java |  333 +++---
 .../apache/juddi/mapping/MappingModelToApi.java |   27 +-
 .../java/org/apache/juddi/model/Contact.java    |   11 +
 .../org/apache/juddi/model/ControlMessage.java  |   30 +
 .../main/java/org/apache/juddi/model/Edge.java  |   41 +-
 .../juddi/model/EdgeReceiverAlternate.java      |   68 ++
 .../main/java/org/apache/juddi/model/Node.java  |  328 +++---
 .../java/org/apache/juddi/model/Operator.java   |   31 +-
 .../juddi/model/ReplicationConfiguration.java   |   46 +-
 .../model/ReplicationConfigurationNode.java     |   72 ++
 .../juddi/replication/ReplicationNotifier.java  |   84 +-
 .../apache/juddi/validation/ValidateNode.java   |    5 +-
 .../juddi/validation/ValidateReplication.java   |   49 +-
 .../src/main/resources/messages.properties      |    4 +-
 .../juddi/api/impl/API_160_ReplicationTest.java |  138 ++-
 .../apache/juddi/api/runtime/CLIServerTest.java |  119 ++
 .../apache/juddi/api/runtime/juddiTestimpl.java |  188 +++
 .../apache/juddi/api/runtime/replicantImpl.java |   70 ++
 .../replication/ReplicationNotifierTest.java    |    5 -
 .../src/test/resources/META-INF/persistence.xml |    3 +
 juddi-core/src/test/resources/META-INF/uddi.xml |   24 +
 .../src/main/resources/META-INF/persistence.xml |    3 +-
 .../org/apache/juddi/samples/EntryPoint.java    |   89 +-
 .../apache/juddi/samples/JuddiAdminService.java |  237 +++-
 .../apache/juddi/samples/UddiReplication.java   |    4 +-
 .../resources/META-INF/simple-publish-uddi.xml  |   27 +-
 .../src/test/resources/META-INF/persistence.xml |    3 +-
 .../WEB-INF/classes/META-INF/persistence.xml    |    2 +
 .../WEB-INF/classes/META-INF/persistence.xml    |    2 +
 .../WEB-INF/classes/META-INF/persistence.xml    |    2 +
 .../WEB-INF/classes/META-INF/persistence.xml    |    3 +
 pom.xml                                         |    2 +-
 uddi-ws/pom.xml                                 |   73 +-
 .../java/org/apache/juddi/repl_v3/EdgeExt.java  |   36 -
 .../main/java/org/uddi/api_v3/GetAuthToken.java |  128 ++-
 .../org/uddi/repl_v3/CommunicationGraph.java    |    1 +
 .../main/java/org/uddi/repl_v3/Operator.java    |  300 ++---
 .../uddi/repl_v3/ReplicationConfiguration.java  |   17 +-
 .../v3_service/UDDIReplicationPortType.java     |   38 +-
 .../juddi/api_v3/GetPublisherDetailTest.java    |   33 +
 44 files changed, 2516 insertions(+), 1339 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/juddi/blob/22a846dd/juddi-core-openjpa/src/test/resources/META-INF/persistence.xml
----------------------------------------------------------------------
diff --git a/juddi-core-openjpa/src/test/resources/META-INF/persistence.xml b/juddi-core-openjpa/src/test/resources/META-INF/persistence.xml
index 7bf55b0..f42c65f 100644
--- a/juddi-core-openjpa/src/test/resources/META-INF/persistence.xml
+++ b/juddi-core-openjpa/src/test/resources/META-INF/persistence.xml
@@ -78,7 +78,8 @@
 	<class>org.apache.juddi.model.ReplicationConfiguration</class>
 	<class>org.apache.juddi.model.Edge</class>
 	<class>org.apache.juddi.model.ControlMessage</class>
-	<class>org.apache.juddi.model.ReplicationMessage</class>
+  <class>org.apache.juddi.model.ReplicationConfigurationNode</class>
+    <class>org.apache.juddi.model.EdgeReceiverAlternate</class>
   
     <properties>
       <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(SchemaAction='dropDB,add')"/>

http://git-wip-us.apache.org/repos/asf/juddi/blob/22a846dd/juddi-core/src/main/java/org/apache/juddi/api/impl/AuthenticatedService.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/api/impl/AuthenticatedService.java b/juddi-core/src/main/java/org/apache/juddi/api/impl/AuthenticatedService.java
index d69afbf..767cbee 100644
--- a/juddi-core/src/main/java/org/apache/juddi/api/impl/AuthenticatedService.java
+++ b/juddi-core/src/main/java/org/apache/juddi/api/impl/AuthenticatedService.java
@@ -50,10 +50,15 @@ public abstract class AuthenticatedService {
 	public static final int AUTHTOKEN_RETIRED = 0;
 	static final Log logger = LogFactory.getLog(AuthenticatedService.class);
 	protected String node = "UNDEFINED_NODE_NAME";
+        protected String baseUrlSSL="UNDEFINED";
+         protected String baseUrl="UNDEFINED";
         
         public AuthenticatedService(){
                 try {
                         node = AppConfig.getConfiguration().getString(Property.JUDDI_NODE_ID, "UNDEFINED_NODE_NAME");
+                        node=node.trim();
+                        baseUrlSSL=AppConfig.getConfiguration().getString(Property.JUDDI_BASE_URL_SECURE, Property.DEFAULT_BASE_URL_SECURE);
+                        baseUrlSSL=AppConfig.getConfiguration().getString(Property.JUDDI_BASE_URL, Property.DEFAULT_BASE_URL);
                 } catch (ConfigurationException ex) {
                         logger.fatal(null, ex);
                 }

http://git-wip-us.apache.org/repos/asf/juddi/blob/22a846dd/juddi-core/src/main/java/org/apache/juddi/api/impl/JUDDIApiImpl.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/api/impl/JUDDIApiImpl.java b/juddi-core/src/main/java/org/apache/juddi/api/impl/JUDDIApiImpl.java
index 268616e..dd201fe 100644
--- a/juddi-core/src/main/java/org/apache/juddi/api/impl/JUDDIApiImpl.java
+++ b/juddi-core/src/main/java/org/apache/juddi/api/impl/JUDDIApiImpl.java
@@ -19,6 +19,7 @@ package org.apache.juddi.api.impl;
 import java.io.StringWriter;
 import java.math.BigInteger;
 import java.rmi.RemoteException;
+import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.HashMap;
@@ -30,6 +31,7 @@ import javax.jws.WebService;
 import javax.persistence.EntityManager;
 import javax.persistence.EntityTransaction;
 import javax.persistence.Query;
+import javax.xml.bind.JAXB;
 import javax.xml.bind.JAXBContext;
 import javax.xml.bind.Marshaller;
 import javax.xml.ws.Holder;
@@ -73,7 +75,6 @@ import org.apache.juddi.model.ClientSubscriptionInfo;
 import org.apache.juddi.model.Node;
 import org.apache.juddi.model.Publisher;
 import org.apache.juddi.model.ReplicationConfiguration;
-import org.apache.juddi.model.SubscriptionMatch;
 import org.apache.juddi.model.Tmodel;
 import org.apache.juddi.model.UddiEntityPublisher;
 import org.apache.juddi.subscription.NotificationList;
@@ -89,19 +90,24 @@ import org.apache.juddi.validation.ValidateNode;
 import org.apache.juddi.validation.ValidatePublish;
 import org.apache.juddi.validation.ValidatePublisher;
 import org.apache.juddi.validation.ValidateReplication;
-import org.apache.juddi.validation.ValidateSubscription;
 import org.uddi.api_v3.AuthToken;
 import org.uddi.api_v3.BusinessInfo;
 import org.uddi.api_v3.BusinessInfos;
+import org.uddi.api_v3.Contact;
 import org.uddi.api_v3.DeleteTModel;
 import org.uddi.api_v3.DispositionReport;
 import org.uddi.api_v3.GetRegisteredInfo;
 import org.uddi.api_v3.InfoSelection;
+import org.uddi.api_v3.KeyType;
+import org.uddi.api_v3.PersonName;
 import org.uddi.api_v3.RegisteredInfo;
 import org.uddi.api_v3.Result;
 import org.uddi.api_v3.SaveTModel;
 import org.uddi.api_v3.TModelInfo;
 import org.uddi.api_v3.TModelInfos;
+import org.uddi.repl_v3.CommunicationGraph;
+import org.uddi.repl_v3.Operator;
+import org.uddi.repl_v3.OperatorStatusType;
 import org.uddi.sub_v3.GetSubscriptionResults;
 import org.uddi.sub_v3.Subscription;
 import org.uddi.sub_v3.SubscriptionResultsList;
@@ -119,7 +125,7 @@ import org.uddi.v3_service.UDDISubscriptionPortType;
  */
 @WebService(serviceName = "JUDDIApiService",
         endpointInterface = "org.apache.juddi.v3_service.JUDDIApiPortType",
-        targetNamespace = "urn:juddi-apache-org:v3_service")
+        targetNamespace = "urn:juddi-apache-org:v3_service", wsdlLocation =  "classpath:/juddi_api_v1.wsdl")
 public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortType {
 
         private Log log = LogFactory.getLog(this.getClass());
@@ -786,6 +792,7 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
          * @throws RemoteException
          */
         @SuppressWarnings("unchecked")
+        @Override
         public SyncSubscriptionDetail invokeSyncSubscription(
                 SyncSubscription body) throws DispositionReportFaultMessage,
                 RemoteException {
@@ -1273,30 +1280,42 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
                         if (!((Publisher) publisher).isAdmin()) {
                                 throw new UserMismatchException(new ErrorMessage("errors.AdminReqd"));
                         }
-                        new ValidateReplication(publisher).validateSetReplicationNodes(replicationConfiguration,em);
+                        new ValidateReplication(publisher).validateSetReplicationNodes(replicationConfiguration, em, node);
 
                         org.apache.juddi.model.ReplicationConfiguration model = null;
                         try {
                                 model = (ReplicationConfiguration) em.createQuery("select c FROM ReplicationConfiguration c order by c.serialNumber desc").getSingleResult();
                         } catch (Exception ex) {
                         }
+                        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddkkmmZ");
                         if (model == null) {
+                                //this is a brand new configuration
                                 model = new ReplicationConfiguration();
-                                MappingApiToModel.mapReplicationConfiguration(replicationConfiguration, model, em);
+                                MappingApiToModel.mapReplicationConfiguration(replicationConfiguration, model,em);
                                 model.setSerialNumber(System.currentTimeMillis());
+                                model.setTimeOfConfigurationUpdate(sdf.format(new Date()));
                                 em.persist(model);
+                                //if (newReplicationNode(model)){
+                                //tell the replication notifier to start transfering with
+                                //the first change record
+                                //}
 
                         } else {
-                                //long oldid = model.getSerialNumber();
-                                em.remove(model);
+                                //a config exists, remove it, add the new one
+                                //spec doesn't appear to mention if recording a change history on the config is required
+                                //assuming not.
+                                //em.remove(model);
                                 model = new ReplicationConfiguration();
                                 MappingApiToModel.mapReplicationConfiguration(replicationConfiguration, model, em);
                                 model.setSerialNumber(System.currentTimeMillis());
-                                em.persist(model);
+
+                                model.setTimeOfConfigurationUpdate(sdf.format(new Date()));
+                                em.merge(model);
 
                         }
 
                         tx.commit();
+                        //UDDIReplicationImpl.notifyConfigurationChange(replicationConfiguration);
                         long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(JUDDIQuery.SET_REPLICATION_NODES,
                                 QueryStatus.SUCCESS, procTime);
@@ -1305,14 +1324,22 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
                         serviceCounter.update(JUDDIQuery.SET_REPLICATION_NODES,
                                 QueryStatus.FAILED, procTime);
                         throw drfm;
-                } finally {
+                } catch (Exception ex){
+                        logger.error(ex,ex);
+                        JAXB.marshal(replicationConfiguration, System.out);
+                        throw new FatalErrorException(new ErrorMessage("E_fatalError", ex.getMessage()));
+                }
+                finally {
                         if (tx.isActive()) {
                                 tx.rollback();
                         }
                         em.close();
                 }
+                DispositionReport d = new DispositionReport();
+                Result res = new Result();
 
-                return new DispositionReport();
+                d.getResult().add(res);
+                return d;
         }
 
         @Override
@@ -1335,7 +1362,7 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
                         sql.toString();
                         Query qry = em.createQuery(sql.toString());
                         qry.setMaxResults(1);
-                       
+
                         org.apache.juddi.model.ReplicationConfiguration resultList = (org.apache.juddi.model.ReplicationConfiguration) qry.getSingleResult();
                         MappingModelToApi.mapReplicationConfiguration(resultList, r);
                         tx.commit();
@@ -1347,15 +1374,36 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
                         serviceCounter.update(JUDDIQuery.GET_ALL_NODES,
                                 QueryStatus.FAILED, procTime);
                         throw drfm;
-                } catch (Exception ex){
-                //possible that there is no config to return
-                        r.setCommunicationGraph(null);
-                        logger.warn("Error caught, is there a replication config is avaiable?", ex);
+                } catch (Exception ex) {
+                        //possible that there is no config to return
+                        r.setCommunicationGraph(new CommunicationGraph());
+                        Operator op = new Operator();
+                        op.setOperatorNodeID(node);
+                        op.setSoapReplicationURL(baseUrlSSL + "/services/replication");
+                        //TODO lookup from the root business
+                       
+                        op.getContact().add(new Contact());
+                        op.getContact().get(0).getPersonName().add(new PersonName("Unknown", null));
+                        op.setOperatorStatus(OperatorStatusType.NORMAL);
+                        
+                        r.getOperator().add(op);
+                        r.getCommunicationGraph().getNode().add(node);
+                        r.getCommunicationGraph().getControlledMessage().add("*");
+                        logger.warn("Error caught, is there a replication config is avaiable? Returning a default config (no replication): " + ex.getMessage());
+                        logger.debug("Error caught, is there a replication config is avaiable? Returning a default config (no replication): ", ex);
                         long procTime = System.currentTimeMillis() - startTime;
+                        r.setSerialNumber(0);
+                        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddkkmmZ");
+                        r.setTimeOfConfigurationUpdate(sdf.format(new Date()));
+                        r.setRegistryContact(new org.uddi.repl_v3.ReplicationConfiguration.RegistryContact());
+                        //TODO pull from root business
+                        r.getRegistryContact().setContact(new Contact());
+                        r.getRegistryContact().getContact().getPersonName().add(new PersonName("Unknown", null));
+
                         serviceCounter.update(JUDDIQuery.GET_REPLICATION_NODES,
                                 QueryStatus.FAILED, procTime);
-                
-                }finally {
+
+                } finally {
                         if (tx.isActive()) {
                                 tx.rollback();
                         }
@@ -1364,6 +1412,7 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
 
                 r.setMaximumTimeToGetChanges(BigInteger.ONE);
                 r.setMaximumTimeToSyncRegistry(BigInteger.ONE);
+                JAXB.marshal(r, System.out);
                 return r;
         }
 

http://git-wip-us.apache.org/repos/asf/juddi/blob/22a846dd/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIReplicationImpl.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIReplicationImpl.java b/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIReplicationImpl.java
index 15ed7a8..3971e6b 100644
--- a/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIReplicationImpl.java
+++ b/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIReplicationImpl.java
@@ -28,11 +28,19 @@ import java.util.TimerTask;
 import java.util.concurrent.ConcurrentLinkedDeque;
 import java.util.logging.Level;
 import java.util.logging.Logger;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
 import javax.persistence.EntityManager;
 import javax.persistence.EntityTransaction;
 import javax.persistence.Query;
+import javax.xml.bind.JAXB;
+import javax.xml.bind.annotation.XmlSeeAlso;
 import javax.xml.datatype.DatatypeConfigurationException;
 import javax.xml.ws.BindingProvider;
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.ResponseWrapper;
 import org.apache.commons.configuration.ConfigurationException;
 import static org.apache.juddi.api.impl.AuthenticatedService.logger;
 import org.apache.juddi.api.util.QueryStatus;
@@ -45,6 +53,7 @@ import org.apache.juddi.mapping.MappingModelToApi;
 import org.apache.juddi.model.BusinessEntity;
 import org.apache.juddi.model.BusinessService;
 import org.apache.juddi.model.Node;
+import org.apache.juddi.model.Operator;
 import org.apache.juddi.model.Tmodel;
 import static org.apache.juddi.replication.ReplicationNotifier.FetchEdges;
 import org.apache.juddi.v3.client.UDDIService;
@@ -75,562 +84,625 @@ import org.uddi.v3_service.UDDIReplicationPortType;
  * <li>do_ping</li>
  * <li>get_highWaterMarks</li>
  *
- * @author <a href="mailto:alexoree@apache.org">Alex O'Ree<a/>
+ * @author <a href="mailto:alexoree@apache.org">Alex O'Ree</a>
  */
+@WebService(serviceName = "UDDI_Replication_PortType", targetNamespace = "urn:uddi-org:repl_v3_portType",
+        endpointInterface = "org.uddi.v3_service.UDDIReplicationPortType")
+@XmlSeeAlso({
+        org.uddi.custody_v3.ObjectFactory.class,
+        org.uddi.repl_v3.ObjectFactory.class,
+        org.uddi.subr_v3.ObjectFactory.class,
+        org.uddi.api_v3.ObjectFactory.class,
+        org.uddi.vscache_v3.ObjectFactory.class,
+        org.uddi.vs_v3.ObjectFactory.class,
+        org.uddi.sub_v3.ObjectFactory.class,
+        org.w3._2000._09.xmldsig_.ObjectFactory.class,
+        org.uddi.policy_v3.ObjectFactory.class,
+        org.uddi.policy_v3_instanceparms.ObjectFactory.class
+})
 public class UDDIReplicationImpl extends AuthenticatedService implements UDDIReplicationPortType {
-    
-    private UDDIServiceCounter serviceCounter;
-    
-    private static PullTimerTask timer = null;
-    private long startBuffer = 20000l;//AppConfig.getConfiguration().getLong(Property.JUDDI_NOTIFICATION_START_BUFFER, 20000l); // 20s startup delay default 
-    private long interval = 300000l;// AppConfig.getConfiguration().getLong(Property.JUDDI_NOTIFICATION_INTERVAL, 300000l); //5 min default
-
-    private static UDDIPublicationImpl pub = null;
-    
-    public UDDIReplicationImpl() {
-        super();
-        if (pub == null) {
-            pub = new UDDIPublicationImpl();
-        }
-        serviceCounter = ServiceCounterLifecycleResource.getServiceCounter(UDDIReplicationImpl.class);
-        Init();
-        try {
-            startBuffer = AppConfig.getConfiguration().getLong(Property.JUDDI_NOTIFICATION_START_BUFFER, 20000l); // 20s startup delay default 
-            interval = AppConfig.getConfiguration().getLong(Property.JUDDI_NOTIFICATION_INTERVAL, 300000l); //5 min default
-        } catch (ConfigurationException ex) {
-            logger.fatal(ex);
-        }
-        
-    }
-    
-    private synchronized void Init() {
-        if (queue == null) {
-            queue = new ConcurrentLinkedDeque<NotifyChangeRecordsAvailable>();
+
+        static void notifyConfigurationChange(ReplicationConfiguration oldConfig, ReplicationConfiguration newConfig) {
+
+                //if the config is different
         }
-        timer = new PullTimerTask();
-        
-    }
-    
-    private boolean Excluded(HighWaterMarkVectorType changesAlreadySeen, ChangeRecord r) {
-        if (changesAlreadySeen != null) {
-            for (int i = 0; i < changesAlreadySeen.getHighWaterMark().size(); i++) {
-                if (changesAlreadySeen.getHighWaterMark().get(i).getNodeID().equals(r.getChangeID().getNodeID())
-                        && changesAlreadySeen.getHighWaterMark().get(i).getOriginatingUSN().equals(r.getChangeID().getOriginatingUSN())) {
-                    return true;
+
+        private UDDIServiceCounter serviceCounter;
+
+        private static PullTimerTask timer = null;
+        private long startBuffer = 20000l;//AppConfig.getConfiguration().getLong(Property.JUDDI_NOTIFICATION_START_BUFFER, 20000l); // 20s startup delay default 
+        private long interval = 300000l;// AppConfig.getConfiguration().getLong(Property.JUDDI_NOTIFICATION_INTERVAL, 300000l); //5 min default
+
+        private static UDDIPublicationImpl pub = null;
+
+        public UDDIReplicationImpl() {
+                super();
+                if (pub == null) {
+                        pub = new UDDIPublicationImpl();
+                }
+                serviceCounter = ServiceCounterLifecycleResource.getServiceCounter(UDDIReplicationImpl.class);
+                Init();
+                try {
+                        startBuffer = AppConfig.getConfiguration().getLong(Property.JUDDI_NOTIFICATION_START_BUFFER, 20000l); // 20s startup delay default 
+                        interval = 5000;//AppConfig.getConfiguration().getLong(Property.JUDDI_NOTIFICATION_INTERVAL, 300000l); //5 min default
+                } catch (ConfigurationException ex) {
+                        logger.fatal(ex);
                 }
-            }
+
         }
-        return false;
-    }
-    
-    private class PullTimerTask extends TimerTask {
-        
-        private Timer timer = null;
-        
-        public PullTimerTask() {
-            super();
-            timer = new Timer(true);
-            timer.scheduleAtFixedRate(this, startBuffer, interval);
+
+        private synchronized void Init() {
+                if (queue == null) {
+                        queue = new ConcurrentLinkedDeque<NotifyChangeRecordsAvailable>();
+                }
+                timer = new PullTimerTask();
+
         }
-        
-        @Override
-        public void run() {
-
-            //ok someone told me there's a change available
-            while (!queue.isEmpty()) {
-                NotifyChangeRecordsAvailable poll = queue.poll();
-                if (poll != null) {
-                    UDDIReplicationPortType replicationClient = getReplicationClient(poll.getNotifyingNode());
-                    try {
-                        //ok now get all the changes
-                        List<ChangeRecord> records
-                                = replicationClient.getChangeRecords(node,
-                                        null, null, poll.getChangesAvailable());
-                        //ok now we need to persist the change records
-                        for (int i = 0; i < records.size(); i++) {
-                            PersistChangeRecord(records.get(i));
+
+        private boolean Excluded(HighWaterMarkVectorType changesAlreadySeen, ChangeRecord r) {
+                if (changesAlreadySeen != null) {
+                        for (int i = 0; i < changesAlreadySeen.getHighWaterMark().size(); i++) {
+                                if (changesAlreadySeen.getHighWaterMark().get(i).getNodeID().equals(r.getChangeID().getNodeID())
+                                        && changesAlreadySeen.getHighWaterMark().get(i).getOriginatingUSN().equals(r.getChangeID().getOriginatingUSN())) {
+                                        return true;
+                                }
                         }
-                    } catch (Exception ex) {
-                        logger.equals(ex);
-                    }
                 }
-            }
-        }
-        
-        @Override
-        public boolean cancel() {
-            timer.cancel();
-            return super.cancel();
+                return false;
         }
 
         /**
-         * someone told me there's a change available, we retrieved it and are
-         * processing the changes locally
-         *
-         * @param rec
+         * handles when a remote node tells me that there's an update(s)
+         * available
          */
-        private void PersistChangeRecord(ChangeRecord rec) {
-            if (rec == null) {
-                return;
-            }
-            EntityManager em = PersistenceManager.getEntityManager();
-            EntityTransaction tx = em.getTransaction();
-            /**
-             * In nodes that support pre-bundled replication responses, the
-             * recipient of the get_changeRecords message MAY return more change
-             * records than requested by the caller. In this scenario, the
-             * caller MUST also be prepared to deal with such redundant changes
-             * where a USN is less than the USN specified in the
-             * changesAlreadySeen highWaterMarkVector.
-             */
-            try {
-                tx.begin();
-                //the change record rec must also be persisted!!
-                em.persist(MappingApiToModel.mapChangeRecord(rec));
-                //<editor-fold defaultstate="collapsed" desc="delete a record">
-
-                if (rec.getChangeRecordDelete() != null) {
-                    if (rec.getChangeRecordDelete() != null && rec.getChangeRecordDelete().getBindingKey() != null && !"".equalsIgnoreCase(rec.getChangeRecordDelete().getBindingKey())) {
-                        //delete a binding template
-                        pub.deleteBinding(rec.getChangeRecordDelete().getBindingKey(), em);
-                    }
-                    if (rec.getChangeRecordDelete() != null && rec.getChangeRecordDelete().getBusinessKey() != null && !"".equalsIgnoreCase(rec.getChangeRecordDelete().getBusinessKey())) {
-                        //delete a business 
-                        pub.deleteBusiness(rec.getChangeRecordDelete().getBusinessKey(), em);
-                    }
-                    if (rec.getChangeRecordDelete() != null && rec.getChangeRecordDelete().getServiceKey() != null && !"".equalsIgnoreCase(rec.getChangeRecordDelete().getServiceKey())) {
-                        //delete a service 
-                        pub.deleteService(rec.getChangeRecordDelete().getServiceKey(), em);
-                    }
-                    if (rec.getChangeRecordDelete() != null && rec.getChangeRecordDelete().getTModelKey() != null && !"".equalsIgnoreCase(rec.getChangeRecordDelete().getTModelKey())) {
-                        //delete a tmodel 
-                        /**
-                         * The changeRecordDelete for a tModel does not
-                         * correspond to any API described in this specification
-                         * and should only appear in the replication stream as
-                         * the result of an administrative function to
-                         * permanently remove a tModel.
-                         */
-                        pub.deleteTModel(rec.getChangeRecordDelete().getTModelKey(), em);
-                    }
+        private class PullTimerTask extends TimerTask {
+
+                private Timer timer = null;
+
+                public PullTimerTask() {
+                        super();
+                        timer = new Timer(true);
+                        timer.scheduleAtFixedRate(this, startBuffer, interval);
                 }
-                if (rec.getChangeRecordDeleteAssertion() != null && rec.getChangeRecordDeleteAssertion().getPublisherAssertion() != null) {
-                    //delete a pa template                            
-                    pub.deletePublisherAssertion(rec.getChangeRecordDeleteAssertion().getPublisherAssertion(), em);
+
+                @Override
+                public void run() {
+
+                        logger.info("Replication change puller thread started. Queue size: " + queue.size());
+                        //ok someone told me there's a change available
+                        while (!queue.isEmpty()) {
+                                NotifyChangeRecordsAvailable poll = queue.poll();
+                                if (poll != null) {
+                                        UDDIReplicationPortType replicationClient = getReplicationClient(poll.getNotifyingNode());
+                                        if (replicationClient == null) {
+                                                logger.fatal("unable to obtain a replication client to node " + poll.getNotifyingNode());
+                                        }
+                                        try {
+                                                //get the high water marks for this node
+                                                //ok now get all the changes
+                                                logger.info("fetching updates...");
+
+                                                List<ChangeRecord> records
+                                                        = replicationClient.getChangeRecords(node,
+                                                                poll.getChangesAvailable(), BigInteger.valueOf(100), null);
+                                                //ok now we need to persist the change records
+                                                logger.info("Change records retrieved " + records.size());
+                                                for (int i = 0; i < records.size(); i++) {
+                                                        PersistChangeRecord(records.get(i));
+                                                }
+                                        } catch (Exception ex) {
+                                                logger.error("Error caught fetching replication changes from " + poll.getNotifyingNode(), ex);
+                                        }
+                                } else {
+                                        logger.warn("weird, popped an object from the queue but it was null.");
+                                }
+                        }
+                }
+
+                @Override
+                public boolean cancel() {
+                        timer.cancel();
+                        return super.cancel();
                 }
 
+                /**
+                 * someone told me there's a change available, we retrieved it
+                 * and are processing the changes locally
+                 *
+                 * @param rec
+                 */
+                private void PersistChangeRecord(ChangeRecord rec) {
+                        if (rec == null) {
+                                return;
+                        }
+                        EntityManager em = PersistenceManager.getEntityManager();
+                        EntityTransaction tx = em.getTransaction();
+                        /**
+                         * In nodes that support pre-bundled replication
+                         * responses, the recipient of the get_changeRecords
+                         * message MAY return more change records than requested
+                         * by the caller. In this scenario, the caller MUST also
+                         * be prepared to deal with such redundant changes where
+                         * a USN is less than the USN specified in the
+                         * changesAlreadySeen highWaterMarkVector.
+                         */
+                        try {
+                                tx.begin();
+                                //the change record rec must also be persisted!!
+                                em.persist(MappingApiToModel.mapChangeRecord(rec));
+                                //<editor-fold defaultstate="collapsed" desc="delete a record">
+
+                                if (rec.getChangeRecordDelete() != null) {
+                                        if (rec.getChangeRecordDelete() != null && rec.getChangeRecordDelete().getBindingKey() != null && !"".equalsIgnoreCase(rec.getChangeRecordDelete().getBindingKey())) {
+                                                //delete a binding template
+                                                pub.deleteBinding(rec.getChangeRecordDelete().getBindingKey(), em);
+                                        }
+                                        if (rec.getChangeRecordDelete() != null && rec.getChangeRecordDelete().getBusinessKey() != null && !"".equalsIgnoreCase(rec.getChangeRecordDelete().getBusinessKey())) {
+                                                //delete a business 
+                                                pub.deleteBusiness(rec.getChangeRecordDelete().getBusinessKey(), em);
+                                        }
+                                        if (rec.getChangeRecordDelete() != null && rec.getChangeRecordDelete().getServiceKey() != null && !"".equalsIgnoreCase(rec.getChangeRecordDelete().getServiceKey())) {
+                                                //delete a service 
+                                                pub.deleteService(rec.getChangeRecordDelete().getServiceKey(), em);
+                                        }
+                                        if (rec.getChangeRecordDelete() != null && rec.getChangeRecordDelete().getTModelKey() != null && !"".equalsIgnoreCase(rec.getChangeRecordDelete().getTModelKey())) {
+                                                //delete a tmodel 
+                                                /**
+                                                 * The changeRecordDelete for a
+                                                 * tModel does not correspond to
+                                                 * any API described in this
+                                                 * specification and should only
+                                                 * appear in the replication
+                                                 * stream as the result of an
+                                                 * administrative function to
+                                                 * permanently remove a tModel.
+                                                 */
+                                                pub.deleteTModel(rec.getChangeRecordDelete().getTModelKey(), em);
+                                        }
+                                }
+                                if (rec.getChangeRecordDeleteAssertion() != null && rec.getChangeRecordDeleteAssertion().getPublisherAssertion() != null) {
+                                        //delete a pa template                            
+                                        pub.deletePublisherAssertion(rec.getChangeRecordDeleteAssertion().getPublisherAssertion(), em);
+                                }
+
 //</editor-fold>
-                //<editor-fold defaultstate="collapsed" desc="New Data">
-                if (rec.getChangeRecordNewData() != null) {
-                    
-                    if (rec.getChangeRecordNewData().getOperationalInfo().getNodeID() == null) {
-                        throw new Exception("Inbound replication data is missiong node id!");
-                    }
-
-                    //The operationalInfo element MUST contain the operational information associated with the indicated new data.
-                    if (rec.getChangeRecordNewData().getOperationalInfo() == null) {
-                        logger.warn("Inbound replication data does not have the required OperationalInfo element and is NOT spec compliant. Data will be ignored");
-                    } else {
-                        if (rec.getChangeRecordNewData().getBindingTemplate() != null) {
+                                //<editor-fold defaultstate="collapsed" desc="New Data">
+                                if (rec.getChangeRecordNewData() != null) {
+
+                                        if (rec.getChangeRecordNewData().getOperationalInfo().getNodeID() == null) {
+                                                throw new Exception("Inbound replication data is missiong node id!");
+                                        }
+
+                                        //The operationalInfo element MUST contain the operational information associated with the indicated new data.
+                                        if (rec.getChangeRecordNewData().getOperationalInfo() == null) {
+                                                logger.warn("Inbound replication data does not have the required OperationalInfo element and is NOT spec compliant. Data will be ignored");
+                                        } else {
+                                                if (rec.getChangeRecordNewData().getBindingTemplate() != null) {
                                                         //fetch the binding template if it exists already
-                            //if it exists, 
-                            //      confirm the owning node, it shouldn't be the local node id, if it is, throw
-                            //      the owning node should be the same as it was before
-
-                            BusinessService model = em.find(org.apache.juddi.model.BusinessService.class, rec.getChangeRecordNewData().getBindingTemplate().getServiceKey());
-                            if (model == null) {
-                                logger.error("Replication error, attempting to insert a binding where the service doesn't exist yet");
-                            } else {
-                                ValidateNodeIdMatches(model.getNodeId(), rec.getChangeRecordNewData().getOperationalInfo());
-                                
-                                org.apache.juddi.model.BindingTemplate modelT = new org.apache.juddi.model.BindingTemplate();
-                                MappingApiToModel.mapBindingTemplate(rec.getChangeRecordNewData().getBindingTemplate(), modelT, model);
-                                MappingApiToModel.mapOperationalInfo(model, rec.getChangeRecordNewData().getOperationalInfo());
-                                em.persist(model);
-                            }
-                            
-                        } else if (rec.getChangeRecordNewData().getBusinessEntity() != null) {
-                            
-                            BusinessEntity model = em.find(org.apache.juddi.model.BusinessEntity.class, rec.getChangeRecordNewData().getBusinessEntity().getBusinessKey());
-                            if (model == null) {
-                                model = new BusinessEntity();
-                            } else {
-                                ValidateNodeIdMatches(model.getNodeId(), rec.getChangeRecordNewData().getOperationalInfo());
-                            }
-                            MappingApiToModel.mapBusinessEntity(rec.getChangeRecordNewData().getBusinessEntity(), model);
-                            MappingApiToModel.mapOperationalInfo(model, rec.getChangeRecordNewData().getOperationalInfo());
-                            
-                            em.persist(model);
-                            
-                        }
-                        if (rec.getChangeRecordNewData().getBusinessService() != null) {
-                            BusinessEntity find = em.find(org.apache.juddi.model.BusinessEntity.class, rec.getChangeRecordNewData().getBusinessService().getBusinessKey());
-                            if (find == null) {
-                                logger.error("Replication error, attempting to insert a service where the business doesn't exist yet");
-                            } else {
-                                org.apache.juddi.model.BusinessService model = new org.apache.juddi.model.BusinessService();
-                                MappingApiToModel.mapBusinessService(rec.getChangeRecordNewData().getBusinessService(), model, find);
-                                MappingApiToModel.mapOperationalInfo(model, rec.getChangeRecordNewData().getOperationalInfo());
-                                
-                                em.persist(model);
-                            }
-                            
-                        } else if (rec.getChangeRecordNewData().getTModel() != null) {
-                            Tmodel model = new Tmodel();
-                            MappingApiToModel.mapTModel(rec.getChangeRecordNewData().getTModel(), model);
-                            
-                            MappingApiToModel.mapOperationalInfo(model, rec.getChangeRecordNewData().getOperationalInfo());
-                            
-                            em.persist(model);
-                        }
-                        
-                    }
-                    
-                }
+                                                        //if it exists, 
+                                                        //      confirm the owning node, it shouldn't be the local node id, if it is, throw
+                                                        //      the owning node should be the same as it was before
+
+                                                        BusinessService model = em.find(org.apache.juddi.model.BusinessService.class, rec.getChangeRecordNewData().getBindingTemplate().getServiceKey());
+                                                        if (model == null) {
+                                                                logger.error("Replication error, attempting to insert a binding where the service doesn't exist yet");
+                                                        } else {
+                                                                ValidateNodeIdMatches(model.getNodeId(), rec.getChangeRecordNewData().getOperationalInfo());
+
+                                                                org.apache.juddi.model.BindingTemplate modelT = new org.apache.juddi.model.BindingTemplate();
+                                                                MappingApiToModel.mapBindingTemplate(rec.getChangeRecordNewData().getBindingTemplate(), modelT, model);
+                                                                MappingApiToModel.mapOperationalInfo(model, rec.getChangeRecordNewData().getOperationalInfo());
+                                                                em.persist(model);
+                                                        }
+
+                                                } else if (rec.getChangeRecordNewData().getBusinessEntity() != null) {
+
+                                                        BusinessEntity model = em.find(org.apache.juddi.model.BusinessEntity.class, rec.getChangeRecordNewData().getBusinessEntity().getBusinessKey());
+                                                        if (model == null) {
+                                                                model = new BusinessEntity();
+                                                        } else {
+                                                                ValidateNodeIdMatches(model.getNodeId(), rec.getChangeRecordNewData().getOperationalInfo());
+                                                        }
+                                                        MappingApiToModel.mapBusinessEntity(rec.getChangeRecordNewData().getBusinessEntity(), model);
+                                                        MappingApiToModel.mapOperationalInfo(model, rec.getChangeRecordNewData().getOperationalInfo());
+
+                                                        em.persist(model);
+
+                                                }
+                                                if (rec.getChangeRecordNewData().getBusinessService() != null) {
+                                                        BusinessEntity find = em.find(org.apache.juddi.model.BusinessEntity.class, rec.getChangeRecordNewData().getBusinessService().getBusinessKey());
+                                                        if (find == null) {
+                                                                logger.error("Replication error, attempting to insert a service where the business doesn't exist yet");
+                                                        } else {
+                                                                org.apache.juddi.model.BusinessService model = new org.apache.juddi.model.BusinessService();
+                                                                MappingApiToModel.mapBusinessService(rec.getChangeRecordNewData().getBusinessService(), model, find);
+                                                                MappingApiToModel.mapOperationalInfo(model, rec.getChangeRecordNewData().getOperationalInfo());
+
+                                                                em.persist(model);
+                                                        }
+
+                                                } else if (rec.getChangeRecordNewData().getTModel() != null) {
+                                                        Tmodel model = new Tmodel();
+                                                        MappingApiToModel.mapTModel(rec.getChangeRecordNewData().getTModel(), model);
+
+                                                        MappingApiToModel.mapOperationalInfo(model, rec.getChangeRecordNewData().getOperationalInfo());
+
+                                                        em.persist(model);
+                                                }
+
+                                        }
+
+                                }
 //</editor-fold>
 
                                 // changeRecordNull no action needed
-                // changeRecordHide tmodel only
-                //<editor-fold defaultstate="collapsed" desc="hide tmodel">
-                if (rec.getChangeRecordHide() != null) {
-                    /*
-                     A changeRecordHide element corresponds to the behavior of hiding a tModel described in the delete_tModel in the Publish API section of this Specification.  A tModel listed in a changeRecordHide should be marked as hidden, so that it is not returned in response to a find_tModel API call.
+                                // changeRecordHide tmodel only
+                                //<editor-fold defaultstate="collapsed" desc="hide tmodel">
+                                if (rec.getChangeRecordHide() != null) {
+                                        /*
+                                         A changeRecordHide element corresponds to the behavior of hiding a tModel described in the delete_tModel in the Publish API section of this Specification.  A tModel listed in a changeRecordHide should be marked as hidden, so that it is not returned in response to a find_tModel API call.
                                         
-                     The changeRecordHide MUST contain a modified timestamp to allow multi-node registries to calculate consistent modifiedIncludingChildren timestamps as described in Section 3.8 operationalInfo Structure.
-                     */
-                    String key = rec.getChangeRecordHide().getTModelKey();
-                    org.apache.juddi.model.Tmodel existing = em.find(org.apache.juddi.model.Tmodel.class, key);
-                    if (existing == null) {
-                        logger.error("Unexpected delete/hide tmodel message received for non existing key " + key);
-                    } else {
-                        existing.setDeleted(true);
-                        existing.setModified(rec.getChangeRecordHide().getModified().toGregorianCalendar().getTime());
-                        existing.setModifiedIncludingChildren(rec.getChangeRecordHide().getModified().toGregorianCalendar().getTime());
-                        em.persist(existing);
-                    }
-                }
+                                         The changeRecordHide MUST contain a modified timestamp to allow multi-node registries to calculate consistent modifiedIncludingChildren timestamps as described in Section 3.8 operationalInfo Structure.
+                                         */
+                                        String key = rec.getChangeRecordHide().getTModelKey();
+                                        org.apache.juddi.model.Tmodel existing = em.find(org.apache.juddi.model.Tmodel.class, key);
+                                        if (existing == null) {
+                                                logger.error("Unexpected delete/hide tmodel message received for non existing key " + key);
+                                        } else {
+                                                existing.setDeleted(true);
+                                                existing.setModified(rec.getChangeRecordHide().getModified().toGregorianCalendar().getTime());
+                                                existing.setModifiedIncludingChildren(rec.getChangeRecordHide().getModified().toGregorianCalendar().getTime());
+                                                em.persist(existing);
+                                        }
+                                }
 //</editor-fold>
 
-                //<editor-fold defaultstate="collapsed" desc="changeRecordPublisherAssertion">
-                if (rec.getChangeRecordPublisherAssertion() != null) {
+                                //<editor-fold defaultstate="collapsed" desc="changeRecordPublisherAssertion">
+                                if (rec.getChangeRecordPublisherAssertion() != null) {
 //TODO implement
-                }
+                                }
 //</editor-fold>
 
-                tx.commit();
-                
-            } catch (Exception drfm) {
-                logger.warn(drfm);
-            } finally {
-                if (tx.isActive()) {
-                    tx.rollback();
+                                tx.commit();
+
+                        } catch (Exception drfm) {
+                                logger.warn(drfm);
+                        } finally {
+                                if (tx.isActive()) {
+                                        tx.rollback();
+                                }
+                                em.close();
+                        }
                 }
-                em.close();
-            }
-        }
-        
-    }
-    
-    private static void ValidateNodeIdMatches(String nodeId, OperationalInfo operationalInfo) throws Exception {
-        if (nodeId == null || operationalInfo == null) {
-            throw new Exception("either the local node ID is null or the inbound replication data's node id is null");
-        }
-        if (!nodeId.equals(operationalInfo.getNodeID())) {
-            throw new Exception("node id mismatch!");
+
         }
-    }
-    
-    private synchronized UDDIReplicationPortType getReplicationClient(String node) {
-        if (cache.containsKey(node)) {
-            return cache.get(node);
+
+        private static void ValidateNodeIdMatches(String nodeId, OperationalInfo operationalInfo) throws Exception {
+                if (nodeId == null || operationalInfo == null) {
+                        throw new Exception("either the local node ID is null or the inbound replication data's node id is null");
+                }
+                if (!nodeId.equals(operationalInfo.getNodeID())) {
+                        throw new Exception("node id mismatch!");
+                }
         }
-        UDDIService svc = new UDDIService();
-        UDDIReplicationPortType replicationClient = svc.getUDDIReplicationPort();
-        EntityManager em = PersistenceManager.getEntityManager();
-        EntityTransaction tx = em.getTransaction();
-        try {
-            Node find = em.find(org.apache.juddi.model.Node.class, node);
-            ((BindingProvider) replicationClient).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, find.getReplicationUrl());
-            cache.put(node, replicationClient);
-            return replicationClient;
-        } catch (Exception ex) {
-            logger.fatal("Node not found!" + node, ex);
-        } finally {
-            if (tx.isActive()) {
-                tx.rollback();
-            }
-            em.close();
+
+        private synchronized UDDIReplicationPortType getReplicationClient(String node) {
+                if (cache.containsKey(node)) {
+                        return cache.get(node);
+                }
+                UDDIService svc = new UDDIService();
+                UDDIReplicationPortType replicationClient = svc.getUDDIReplicationPort();
+
+                EntityManager em = PersistenceManager.getEntityManager();
+                EntityTransaction tx = em.getTransaction();
+                try {
+                        StringBuilder sql = new StringBuilder();
+                        sql.append("select c from ReplicationConfiguration c order by c.serialNumber desc");
+                        sql.toString();
+                        Query qry = em.createQuery(sql.toString());
+                        qry.setMaxResults(1);
+
+                        org.apache.juddi.model.ReplicationConfiguration resultList = (org.apache.juddi.model.ReplicationConfiguration) qry.getSingleResult();
+                        for (Operator o : resultList.getOperator()) {
+                                if (o.getOperatorNodeID().equalsIgnoreCase(node)) {
+                                        ((BindingProvider) replicationClient).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, o.getSoapReplicationURL());
+                                        cache.put(node, replicationClient);
+                                        return replicationClient;
+                                }
+                        }
+                        tx.rollback();
+
+                } catch (Exception ex) {
+                        logger.fatal("Node not found!" + node, ex);
+                } finally {
+                        if (tx.isActive()) {
+                                tx.rollback();
+                        }
+                        em.close();
+                }
+                //em.close();
+                return null;
+
         }
-        em.close();
-        return null;
-        
-    }
-    private Map<String, UDDIReplicationPortType> cache = new HashMap<String, UDDIReplicationPortType>();
-
-    /**
-     * @since 3.3
-     * @param body
-     * @return
-     * @throws DispositionReportFaultMessage
-     */
-    public String doPing(DoPing body) throws DispositionReportFaultMessage {
-        long startTime = System.currentTimeMillis();
-        long procTime = System.currentTimeMillis() - startTime;
-        serviceCounter.update(ReplicationQuery.DO_PING, QueryStatus.SUCCESS, procTime);
-        
-        return node;
-        
-    }
-    
-    @Override
-    public List<ChangeRecord> getChangeRecords(String requestingNode,
-            HighWaterMarkVectorType changesAlreadySeen,
-            BigInteger responseLimitCount,
-            HighWaterMarkVectorType responseLimitVector)
-            throws DispositionReportFaultMessage {
-        long startTime = System.currentTimeMillis();
-        
-        new ValidateReplication(null).validateGetChangeRecords(requestingNode, changesAlreadySeen, responseLimitCount, responseLimitVector, FetchEdges(), ctx);
-
-        //TODO should we validate that "requestingNode" is in the replication config?
-        List<ChangeRecord> ret = new ArrayList<ChangeRecord>();
-        EntityManager em = PersistenceManager.getEntityManager();
-        EntityTransaction tx = em.getTransaction();
+        private Map<String, UDDIReplicationPortType> cache = new HashMap<String, UDDIReplicationPortType>();
 
         /**
-         * More specifically, the recipient determines the particular change
-         * records that are returned by comparing the originating USNs in the
-         * caller’s high water mark vector with the originating USNs of each of
-         * the changes the recipient has seen from others or generated by
-         * itself. The recipient SHOULD only return change records that have
-         * originating USNs that are greater than those listed in the
-         * changesAlreadySeen highWaterMarkVector and less than the limit
-         * required by either the responseLimitCount or the responseLimitVector.
-         *
-         *
-         * Part of the message is a high water mark vector that contains for
-         * each node of the registry the originating USN of the most recent
-         * change record that has been successfully processed by the invocating
-         * node
+         * @since 3.3
+         * @param body
+         * @return
+         * @throws DispositionReportFaultMessage
          */
-        int maxrecords = 100;
-        if (responseLimitCount != null) {
-            maxrecords = responseLimitCount.intValue();
+        public String doPing(DoPing body) throws DispositionReportFaultMessage {
+                long startTime = System.currentTimeMillis();
+                long procTime = System.currentTimeMillis() - startTime;
+                serviceCounter.update(ReplicationQuery.DO_PING, QueryStatus.SUCCESS, procTime);
+
+                return node;
+
         }
-        try {
-            tx.begin();
-            Long firstrecord = 1L;
-            Long lastrecord = null;
-            
-            if (changesAlreadySeen != null) {
-                                //this is basically a lower limit (i.e. the newest record that was processed by the requestor
-                //therefore we want the oldest record stored locally to return to the requestor for processing
-                for (int i = 0; i < changesAlreadySeen.getHighWaterMark().size(); i++) {
-                    if (responseLimitVector.getHighWaterMark().get(i).getNodeID().equals(node)) {
-                        firstrecord = changesAlreadySeen.getHighWaterMark().get(i).getOriginatingUSN() + 1;
-                    }
+
+        @WebResult(name = "changeRecord", targetNamespace = "urn:uddi-org:repl_v3")
+        @RequestWrapper(localName = "get_changeRecords", targetNamespace = "urn:uddi-org:repl_v3", className = "org.uddi.repl_v3.GetChangeRecords")
+        @ResponseWrapper(localName = "changeRecords", targetNamespace = "urn:uddi-org:repl_v3", className = "org.uddi.repl_v3.ChangeRecords")
+
+        @Override
+        public List<ChangeRecord> getChangeRecords(@WebParam(name = "requestingNode", targetNamespace = "urn:uddi-org:repl_v3") String requestingNode,
+                @WebParam(name = "changesAlreadySeen", targetNamespace = "urn:uddi-org:repl_v3") HighWaterMarkVectorType changesAlreadySeen,
+                @WebParam(name = "responseLimitCount", targetNamespace = "urn:uddi-org:repl_v3") BigInteger responseLimitCount,
+                @WebParam(name = "responseLimitVector", targetNamespace = "urn:uddi-org:repl_v3") HighWaterMarkVectorType responseLimitVector)
+                throws DispositionReportFaultMessage {
+                long startTime = System.currentTimeMillis();
+
+                new ValidateReplication(null).validateGetChangeRecords(requestingNode, changesAlreadySeen, responseLimitCount, responseLimitVector, FetchEdges(), ctx);
+
+                //TODO should we validate that "requestingNode" is in the replication config?
+                List<ChangeRecord> ret = new ArrayList<ChangeRecord>();
+                EntityManager em = PersistenceManager.getEntityManager();
+                EntityTransaction tx = em.getTransaction();
+
+                /**
+                 * More specifically, the recipient determines the particular
+                 * change records that are returned by comparing the originating
+                 * USNs in the caller’s high water mark vector with the
+                 * originating USNs of each of the changes the recipient has
+                 * seen from others or generated by itself. The recipient SHOULD
+                 * only return change records that have originating USNs that
+                 * are greater than those listed in the changesAlreadySeen
+                 * highWaterMarkVector and less than the limit required by
+                 * either the responseLimitCount or the responseLimitVector.
+                 *
+                 *
+                 * Part of the message is a high water mark vector that contains
+                 * for each node of the registry the originating USN of the most
+                 * recent change record that has been successfully processed by
+                 * the invocating node
+                 */
+                int maxrecords = 100;
+                if (responseLimitCount != null) {
+                        maxrecords = responseLimitCount.intValue();
                 }
-            }
-            if (responseLimitVector != null) {
+                try {
+                        tx.begin();
+                        Long firstrecord = 1L;
+                        Long lastrecord = null;
+
+                        if (changesAlreadySeen != null) {
+                                //this is basically a lower limit (i.e. the newest record that was processed by the requestor
+                                //therefore we want the oldest record stored locally to return to the requestor for processing
+                                for (int i = 0; i < changesAlreadySeen.getHighWaterMark().size(); i++) {
+                                        if (changesAlreadySeen.getHighWaterMark().get(i).getNodeID().equals(node)) {
+                                                firstrecord = changesAlreadySeen.getHighWaterMark().get(i).getOriginatingUSN() + 1;
+                                        }
+                                }
+                        }
+                        if (responseLimitVector != null) {
                                 //using responseLimitVector, indicating for each node in the graph the first change originating there that he does not wish to be returned.
-                //upper limit basically
-                for (int i = 0; i < responseLimitVector.getHighWaterMark().size(); i++) {
-                    if (responseLimitVector.getHighWaterMark().get(i).getNodeID().equals(node)) {
-                        lastrecord = responseLimitVector.getHighWaterMark().get(i).getOriginatingUSN();
-                    }
-                }
-            }
-            
-            Query createQuery = null;
-            if (lastrecord != null) {
-                createQuery = em.createQuery("select e from ChangeRecord e where (e.id > :inbound and e.nodeID = :node and e.id < :lastrecord) OR (e.originatingUSN > :inbound and e.nodeID != :node and e.originatingUSN < :lastrecord) order by e.id ASC");
-                createQuery.setParameter("lastrecord", lastrecord);
-            } else {
-                createQuery = em.createQuery("select e from ChangeRecord e where (e.id > :inbound and e.nodeID = :node) OR (e.originatingUSN > :inbound and e.nodeID != :node) order by e.id ASC");
-            }
-            createQuery.setMaxResults(maxrecords);
-            createQuery.setParameter("inbound", firstrecord);
-            createQuery.setParameter("node", node);
-            
-            List<org.apache.juddi.model.ChangeRecord> records = (List<org.apache.juddi.model.ChangeRecord>) (org.apache.juddi.model.ChangeRecord) createQuery.getResultList();
-            for (int i = 0; i < records.size(); i++) {
-                ChangeRecord r = MappingModelToApi.mapChangeRecord(records.get(i));
-                if (!Excluded(changesAlreadySeen, r)) {
-                    ret.add(r);
+                                //upper limit basically
+                                for (int i = 0; i < responseLimitVector.getHighWaterMark().size(); i++) {
+                                        if (responseLimitVector.getHighWaterMark().get(i).getNodeID().equals(node)) {
+                                                lastrecord = responseLimitVector.getHighWaterMark().get(i).getOriginatingUSN();
+                                        }
+                                }
+                        }
+
+                        Query createQuery = null;
+                        if (lastrecord != null) {
+                                createQuery = em.createQuery("select e from ChangeRecord e where ((e.id >= :inbound and e.nodeID = :node and e.id < :lastrecord) OR "
+                                        + "(e.originatingUSN > :inbound and e.nodeID <> :node and e.originatingUSN < :lastrecord)) order by e.id ASC");
+                                createQuery.setParameter("lastrecord", lastrecord);
+                        } else {
+                                createQuery = em.createQuery("select e from ChangeRecord e where ((e.id >= :inbound and e.nodeID = :node) OR "
+                                        + "(e.originatingUSN > :inbound and e.nodeID <> :node)) order by e.id ASC");
+                        }
+                        createQuery.setMaxResults(maxrecords);
+                        createQuery.setParameter("inbound", firstrecord);
+                        createQuery.setParameter("node", node);
+
+                        List<org.apache.juddi.model.ChangeRecord> records = (List<org.apache.juddi.model.ChangeRecord>) createQuery.getResultList();
+                        for (int i = 0; i < records.size(); i++) {
+                                ChangeRecord r = MappingModelToApi.mapChangeRecord(records.get(i));
+                                if (!Excluded(changesAlreadySeen, r)) {
+                                        ret.add(r);
+                                }
+
+                        }
+
+                        tx.rollback();
+                        long procTime = System.currentTimeMillis() - startTime;
+                        serviceCounter.update(ReplicationQuery.GET_CHANGERECORDS,
+                                QueryStatus.SUCCESS, procTime);
+
+                } catch (Exception ex) {
+                        logger.fatal("Error, this node is: " + node, ex);
+                        throw new FatalErrorException(new ErrorMessage("E_fatalError", ex.getMessage()));
+
+                } finally {
+                        if (tx.isActive()) {
+                                tx.rollback();
+                        }
+                        em.close();
                 }
-                
-            }
-            
-            tx.rollback();
-            long procTime = System.currentTimeMillis() - startTime;
-            serviceCounter.update(ReplicationQuery.GET_CHANGERECORDS,
-                    QueryStatus.SUCCESS, procTime);
-            
-        } catch (Exception ex) {
-            logger.fatal("Error, this node is: " + node, ex);
-            throw new FatalErrorException(new ErrorMessage("E_fatalError", ex.getMessage()));
-            
-        } finally {
-            if (tx.isActive()) {
-                tx.rollback();
-            }
-            em.close();
+                logger.info("Change records returned for " + requestingNode + ": " + ret.size());
+                //JAXB.marshal(ret, System.out);
+                return ret;
         }
-        return ret;
-    }
-
-    /**
-     * This UDDI API message provides a means to obtain a list of highWaterMark
-     * element containing the highest known USN for all nodes in the replication
-     * graph. If there is no graph, we just return the local bits
-     *
-     * @return
-     * @throws DispositionReportFaultMessage
-     */
-    @Override
-    public List<ChangeRecordIDType> getHighWaterMarks()
-            throws DispositionReportFaultMessage {
-        long startTime = System.currentTimeMillis();
-        
-        List<ChangeRecordIDType> ret = new ArrayList<ChangeRecordIDType>();
-
-        //fetch from database the highest known watermark
-        ReplicationConfiguration FetchEdges = FetchEdges();
-        
-        EntityManager em = PersistenceManager.getEntityManager();
-        EntityTransaction tx = em.getTransaction();
-        try {
-            tx.begin();
-            if (FetchEdges != null) {
-                Iterator<String> it = FetchEdges.getCommunicationGraph().getNode().iterator();
-                while (it.hasNext()) {
-                    String nextNode = it.next();
-                    if (!nextNode.equals(node)) {
-                        
-                        Long id = 0L;
-                        try {
-                            id = (Long) em.createQuery("select e.originatingUSN from ChangeRecord e where e.nodeID = :node order by e.originatingUSN desc").setParameter("node", nextNode).setMaxResults(1).getSingleResult();
-                        } catch (Exception ex) {
-                            logger.debug(ex);
+
+        /**
+         * This UDDI API message provides a means to obtain a list of
+         * highWaterMark element containing the highest known USN for all nodes
+         * in the replication graph. If there is no graph, we just return the
+         * local bits
+         *
+         * @return
+         * @throws DispositionReportFaultMessage
+         */
+        @Override
+        public List<ChangeRecordIDType> getHighWaterMarks()
+                throws DispositionReportFaultMessage {
+                long startTime = System.currentTimeMillis();
+
+                List<ChangeRecordIDType> ret = new ArrayList<ChangeRecordIDType>();
+
+                //fetch from database the highest known watermark
+                ReplicationConfiguration FetchEdges = FetchEdges();
+
+                EntityManager em = PersistenceManager.getEntityManager();
+                EntityTransaction tx = em.getTransaction();
+                try {
+                        tx.begin();
+                        if (FetchEdges != null) {
+                                Iterator<String> it = FetchEdges.getCommunicationGraph().getNode().iterator();
+                                while (it.hasNext()) {
+                                        String nextNode = it.next();
+                                        if (!nextNode.equals(node)) {
+
+                                                Long id = 0L;
+                                                try {
+                                                        id = (Long) em.createQuery("select e.originatingUSN from ChangeRecord e where e.nodeID = :node order by e.originatingUSN desc").setParameter("node", nextNode).setMaxResults(1).getSingleResult();
+                                                } catch (Exception ex) {
+                                                        logger.debug(ex);
+                                                }
+                                                if (id == null) {
+                                                        id = 0L;
+                                                        //per the spec
+                                                }
+                                                ChangeRecordIDType x = new ChangeRecordIDType(nextNode, id);
+
+                                                ret.add(x);
+
+                                        }
+                                }
                         }
+                        //dont forget this node
+                        Long id = (Long) em.createQuery("select (e.id) from ChangeRecord e where e.nodeID = :node  order by e.id desc").setParameter("node", node).setMaxResults(1).getSingleResult();
                         if (id == null) {
-                            id = 0L;
-                            //per the spec
+                                id = 0L;
                         }
-                        ChangeRecordIDType x = new ChangeRecordIDType(nextNode, id);
-                        
+                        ChangeRecordIDType x = new ChangeRecordIDType();
+                        x.setNodeID(node);
+                        x.setOriginatingUSN(id);
                         ret.add(x);
-                        
-                    }
+
+                        tx.rollback();
+                        long procTime = System.currentTimeMillis() - startTime;
+                        serviceCounter.update(ReplicationQuery.GET_HIGHWATERMARKS, QueryStatus.SUCCESS, procTime);
+
+                } catch (Exception drfm) {
+                        throw new FatalErrorException(new ErrorMessage("E_fatalError", drfm.getMessage()));
+
+                } finally {
+                        if (tx.isActive()) {
+                                tx.rollback();
+                        }
+                        em.close();
                 }
-            }
-            //dont forget this node
-            Long id = (Long) em.createQuery("select (e.id) from ChangeRecord e where e.nodeID = :node  order by e.id desc").setParameter("node", node).setMaxResults(1).getSingleResult();
-            if (id == null) {
-                id = 0L;
-            }
-            ChangeRecordIDType x = new ChangeRecordIDType();
-            x.setNodeID(node);
-            x.setOriginatingUSN(id);
-            ret.add(x);
-            
-            tx.rollback();
-            long procTime = System.currentTimeMillis() - startTime;
-            serviceCounter.update(ReplicationQuery.GET_HIGHWATERMARKS, QueryStatus.SUCCESS, procTime);
-            
-        } catch (Exception drfm) {
-            throw new FatalErrorException(new ErrorMessage("E_fatalError", drfm.getMessage()));
-            
-        } finally {
-            if (tx.isActive()) {
-                tx.rollback();
-            }
-            em.close();
+
+                return ret;
         }
-        
-        
-        
-        return ret;
-    }
-
-    /**
-     * this means that another node has a change and we need to pick up the
-     * change and apply it to our local database.
-     *
-     * @param body
-     * @throws DispositionReportFaultMessage
-     */
-    @Override
-    public void notifyChangeRecordsAvailable(NotifyChangeRecordsAvailable body)
-            throws DispositionReportFaultMessage {
-        long startTime = System.currentTimeMillis();
-        long procTime = System.currentTimeMillis() - startTime;
-        serviceCounter.update(ReplicationQuery.NOTIFY_CHANGERECORDSAVAILABLE,
-                QueryStatus.SUCCESS, procTime);
+
+        /**
+         * this means that another node has a change and we need to pick up the
+         * change and apply it to our local database.
+         *
+         * @param body
+         * @throws DispositionReportFaultMessage
+         */
+        @Override
+        public void notifyChangeRecordsAvailable(NotifyChangeRecordsAvailable body)
+                throws DispositionReportFaultMessage {
+                long startTime = System.currentTimeMillis();
+                long procTime = System.currentTimeMillis() - startTime;
+                serviceCounter.update(ReplicationQuery.NOTIFY_CHANGERECORDSAVAILABLE,
+                        QueryStatus.SUCCESS, procTime);
                 //some other node just told us there's new records available, call
-        //getChangeRecords from the remote node asynch
-
-        new ValidateReplication(null).validateNotifyChangeRecordsAvailable(body, ctx);
-        
-        queue.add(body);
-
-        //ValidateReplication.unsupportedAPICall();
-    }
-    private static Queue<NotifyChangeRecordsAvailable> queue = null;
-
-    /**
-     * transfers custody of an entity from node1/user1 to node2/user2
-     *
-     * @param body
-     * @throws DispositionReportFaultMessage
-     */
-    @Override
-    public void transferCustody(TransferCustody body)
-            throws DispositionReportFaultMessage {
-        long startTime = System.currentTimeMillis();
+                //getChangeRecords from the remote node asynch
 
-                //*this node is transfering data to another node
-        //body.getTransferOperationalInfo().
-        ValidateReplication.unsupportedAPICall();
-        
-        EntityManager em = PersistenceManager.getEntityManager();
-        //EntityTransaction tx = em.getTransaction();
+                new ValidateReplication(null).validateNotifyChangeRecordsAvailable(body, ctx);
+
+                logger.info(body.getNotifyingNode() + " just told me that there are change records available, enqueuing...");
+                queue.add(body);
+
+                //ValidateReplication.unsupportedAPICall();
+        }
+        private static Queue<NotifyChangeRecordsAvailable> queue = null;
 
         /**
-         * The custodial node must verify that it has granted permission to
-         * transfer the entities identified and that this permission is still
-         * valid. This operation is comprised of two steps:
-         *
-         * 1. Verification that the transferToken was issued by it, that it has
-         * not expired, that it represents the authority to transfer no more and
-         * no less than those entities identified by the businessKey and
-         * tModelKey elements and that all these entities are still valid and
-         * not yet transferred. The transferToken is invalidated if any of these
-         * conditions are not met.
-         *
-         * 2. If the conditions above are met, the custodial node will prevent
-         * any further changes to the entities identified by the businessKey and
-         * tModelKey elements identified. The entity will remain in this state
-         * until the replication stream indicates it has been successfully
-         * processed via the replication stream. Upon successful verification of
-         * the custody transfer request by the custodial node, an empty message
-         * is returned by it indicating the success of the request and
-         * acknowledging the custody transfer. Following the issue of the empty
-         * message, the custodial node will submit into the replication stream a
-         * changeRecordNewData providing in the operationalInfo, the nodeID
-         * accepting custody of the datum and the authorizedName of the
-         * publisher accepting ownership. The acknowledgmentRequested attribute
-         * of this change record MUST be set to "true".
+         * transfers custody of an entity from node1/user1 to node2/user2
          *
-         * TODO enqueue Replication message
-         *
-         * Finally, the custodial node invalidates the transferToken in order to
-         * prevent additional calls of the transfer_entities API.
+         * @param body
+         * @throws DispositionReportFaultMessage
          */
-        DiscardTransferToken dtt = new DiscardTransferToken();
-        dtt.setKeyBag(body.getKeyBag());
-        dtt.setTransferToken(body.getTransferToken());
-        new UDDICustodyTransferImpl().discardTransferToken(dtt);
-    }
-    
+        @Override
+        public void transferCustody(TransferCustody body)
+                throws DispositionReportFaultMessage {
+                long startTime = System.currentTimeMillis();
+
+                //*this node is transfering data to another node
+                //body.getTransferOperationalInfo().
+                ValidateReplication.unsupportedAPICall();
+
+                EntityManager em = PersistenceManager.getEntityManager();
+                //EntityTransaction tx = em.getTransaction();
+
+                /**
+                 * The custodial node must verify that it has granted permission
+                 * to transfer the entities identified and that this permission
+                 * is still valid. This operation is comprised of two steps:
+                 *
+                 * 1. Verification that the transferToken was issued by it, that
+                 * it has not expired, that it represents the authority to
+                 * transfer no more and no less than those entities identified
+                 * by the businessKey and tModelKey elements and that all these
+                 * entities are still valid and not yet transferred. The
+                 * transferToken is invalidated if any of these conditions are
+                 * not met.
+                 *
+                 * 2. If the conditions above are met, the custodial node will
+                 * prevent any further changes to the entities identified by the
+                 * businessKey and tModelKey elements identified. The entity
+                 * will remain in this state until the replication stream
+                 * indicates it has been successfully processed via the
+                 * replication stream. Upon successful verification of the
+                 * custody transfer request by the custodial node, an empty
+                 * message is returned by it indicating the success of the
+                 * request and acknowledging the custody transfer. Following the
+                 * issue of the empty message, the custodial node will submit
+                 * into the replication stream a changeRecordNewData providing
+                 * in the operationalInfo, the nodeID accepting custody of the
+                 * datum and the authorizedName of the publisher accepting
+                 * ownership. The acknowledgmentRequested attribute of this
+                 * change record MUST be set to "true".
+                 *
+                 * TODO enqueue Replication message
+                 *
+                 * Finally, the custodial node invalidates the transferToken in
+                 * order to prevent additional calls of the transfer_entities
+                 * API.
+                 */
+                DiscardTransferToken dtt = new DiscardTransferToken();
+                dtt.setKeyBag(body.getKeyBag());
+                dtt.setTransferToken(body.getTransferToken());
+                new UDDICustodyTransferImpl().discardTransferToken(dtt);
+        }
+
 }


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


[4/9] juddi git commit: JUDDI-241 juddi-tomcat now build's two tomcat servers, one configured as "node2" and one as "node1". additional features for the CLI client to help make setting up the replication config easier

Posted by al...@apache.org.
JUDDI-241 juddi-tomcat now build's two tomcat servers, one configured as "node2" and one as "node1". additional features for the CLI client to help make setting up the replication config easier


Project: http://git-wip-us.apache.org/repos/asf/juddi/repo
Commit: http://git-wip-us.apache.org/repos/asf/juddi/commit/03dce361
Tree: http://git-wip-us.apache.org/repos/asf/juddi/tree/03dce361
Diff: http://git-wip-us.apache.org/repos/asf/juddi/diff/03dce361

Branch: refs/heads/JUDDI-241
Commit: 03dce361e8c06a036cd1a5534a1f0a105e615b3d
Parents: a975954
Author: Alex <al...@apache.org>
Authored: Sun Nov 16 13:16:11 2014 -0500
Committer: Alex <al...@apache.org>
Committed: Sun Nov 16 13:16:11 2014 -0500

----------------------------------------------------------------------
 .../org/apache/juddi/api/impl/JUDDIApiImpl.java |  12 +-
 .../juddi/replication/ReplicationNotifier.java  |   1 +
 .../org/apache/juddi/samples/EntryPoint.java    |   5 +
 .../apache/juddi/samples/JuddiAdminService.java | 143 ++++++++++++++++++-
 juddi-tomcat/build.xml                          |  11 +-
 juddi-tomcat/juddiv3Node2.xml                   |   4 +-
 juddi-tomcat/pom.xml                            |   4 +-
 .../WEB-INF/classes/META-INF/persistence.xml    |  91 ++++++------
 .../WEB-INF/classes/META-INF/persistence.xml    |  90 ++++++------
 .../WEB-INF/classes/META-INF/persistence.xml    |  91 ++++++------
 .../WEB-INF/classes/META-INF/persistence.xml    |   4 -
 juddiv3-war/src/main/webapp/index.jsp           |  27 +++-
 12 files changed, 329 insertions(+), 154 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/juddi/blob/03dce361/juddi-core/src/main/java/org/apache/juddi/api/impl/JUDDIApiImpl.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/api/impl/JUDDIApiImpl.java b/juddi-core/src/main/java/org/apache/juddi/api/impl/JUDDIApiImpl.java
index e2b9dc5..268616e 100644
--- a/juddi-core/src/main/java/org/apache/juddi/api/impl/JUDDIApiImpl.java
+++ b/juddi-core/src/main/java/org/apache/juddi/api/impl/JUDDIApiImpl.java
@@ -1335,9 +1335,9 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
                         sql.toString();
                         Query qry = em.createQuery(sql.toString());
                         qry.setMaxResults(1);
+                       
                         org.apache.juddi.model.ReplicationConfiguration resultList = (org.apache.juddi.model.ReplicationConfiguration) qry.getSingleResult();
                         MappingModelToApi.mapReplicationConfiguration(resultList, r);
-
                         tx.commit();
                         long procTime = System.currentTimeMillis() - startTime;
                         serviceCounter.update(JUDDIQuery.GET_ALL_NODES,
@@ -1347,7 +1347,15 @@ public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortTy
                         serviceCounter.update(JUDDIQuery.GET_ALL_NODES,
                                 QueryStatus.FAILED, procTime);
                         throw drfm;
-                } finally {
+                } catch (Exception ex){
+                //possible that there is no config to return
+                        r.setCommunicationGraph(null);
+                        logger.warn("Error caught, is there a replication config is avaiable?", ex);
+                        long procTime = System.currentTimeMillis() - startTime;
+                        serviceCounter.update(JUDDIQuery.GET_REPLICATION_NODES,
+                                QueryStatus.FAILED, procTime);
+                
+                }finally {
                         if (tx.isActive()) {
                                 tx.rollback();
                         }

http://git-wip-us.apache.org/repos/asf/juddi/blob/03dce361/juddi-core/src/main/java/org/apache/juddi/replication/ReplicationNotifier.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/replication/ReplicationNotifier.java b/juddi-core/src/main/java/org/apache/juddi/replication/ReplicationNotifier.java
index 15b16ab..e2e11ca 100644
--- a/juddi-core/src/main/java/org/apache/juddi/replication/ReplicationNotifier.java
+++ b/juddi-core/src/main/java/org/apache/juddi/replication/ReplicationNotifier.java
@@ -168,6 +168,7 @@ public class ReplicationNotifier extends TimerTask {
                 if (queue == null) {
                         queue = new ConcurrentLinkedQueue();
                 }
+                //TODO check for replication config changes
                 while (!queue.isEmpty()) {
                         //for each change at this node
                         log.info("Replication, Notifying nodes of new change records. " + queue.size() + " remaining");

http://git-wip-us.apache.org/repos/asf/juddi/blob/03dce361/juddi-examples/more-uddi-samples/src/main/java/org/apache/juddi/samples/EntryPoint.java
----------------------------------------------------------------------
diff --git a/juddi-examples/more-uddi-samples/src/main/java/org/apache/juddi/samples/EntryPoint.java b/juddi-examples/more-uddi-samples/src/main/java/org/apache/juddi/samples/EntryPoint.java
index d9a86cf..2f9f032 100644
--- a/juddi-examples/more-uddi-samples/src/main/java/org/apache/juddi/samples/EntryPoint.java
+++ b/juddi-examples/more-uddi-samples/src/main/java/org/apache/juddi/samples/EntryPoint.java
@@ -72,6 +72,7 @@ public class EntryPoint {
                         System.out.println("34) View all registered remote nodes on a jUDDI server");
                         System.out.println("35) View all registered nodes for this client");
                         System.out.println("36) UnRegister a node on a jUDDI server");
+                        System.out.println("37) Fetch the replication config from a jUDDI server");
 
                         System.out.println("q) quit");
                         System.out.print("Selection: ");
@@ -408,8 +409,12 @@ public class EntryPoint {
                 }
                 if (input.equals("36")) {
 
+                        new JuddiAdminService().viewRemoveRemoteNode(authtoken);
                         //System.out.println("35) UnRegister a node on a jUDDI server");
                 }
+                if (input.equals("37")){
+                        new JuddiAdminService().viewReplicationConfig(authtoken);
+                }
 
         }
 }

http://git-wip-us.apache.org/repos/asf/juddi/blob/03dce361/juddi-examples/more-uddi-samples/src/main/java/org/apache/juddi/samples/JuddiAdminService.java
----------------------------------------------------------------------
diff --git a/juddi-examples/more-uddi-samples/src/main/java/org/apache/juddi/samples/JuddiAdminService.java b/juddi-examples/more-uddi-samples/src/main/java/org/apache/juddi/samples/JuddiAdminService.java
index 2ffa170..f87c637 100644
--- a/juddi-examples/more-uddi-samples/src/main/java/org/apache/juddi/samples/JuddiAdminService.java
+++ b/juddi-examples/more-uddi-samples/src/main/java/org/apache/juddi/samples/JuddiAdminService.java
@@ -19,6 +19,7 @@ import java.rmi.RemoteException;
 import java.util.List;
 import javax.xml.bind.JAXB;
 import org.apache.commons.configuration.ConfigurationException;
+import org.apache.juddi.api_v3.DeleteNode;
 import org.apache.juddi.api_v3.Node;
 import org.apache.juddi.api_v3.NodeDetail;
 import org.apache.juddi.api_v3.NodeList;
@@ -32,7 +33,10 @@ import org.apache.juddi.v3.client.transport.Transport;
 import org.apache.juddi.v3.client.transport.TransportException;
 import org.apache.juddi.v3_service.JUDDIApiPortType;
 import org.uddi.api_v3.AuthToken;
+import org.uddi.api_v3.DispositionReport;
 import org.uddi.api_v3.GetAuthToken;
+import org.uddi.repl_v3.CommunicationGraph;
+import org.uddi.repl_v3.ReplicationConfiguration;
 import org.uddi.v3_service.UDDIPublicationPortType;
 import org.uddi.v3_service.UDDISecurityPortType;
 
@@ -110,7 +114,7 @@ public class JuddiAdminService {
 
                 List<Node> uddiNodeList = clerkManager.getClientConfig().getUDDINodeList();
                 System.out.println();
-                System.out.println("Select a node");
+                System.out.println("Select a node (from *this config)");
                 for (int i = 0; i < uddiNodeList.size(); i++) {
                         System.out.print(i + 1);
                         System.out.println(") " + uddiNodeList.get(i).getName() + uddiNodeList.get(i).getDescription());
@@ -150,7 +154,7 @@ public class JuddiAdminService {
         }
 
         void registerLocalNodeToRemoteNode(String authtoken, Node cfg, Node publishTo) throws Exception {
-             
+
                 Transport transport = clerkManager.getTransport(publishTo.getName());
 
                 JUDDIApiPortType juddiApiService = transport.getJUDDIApiService();
@@ -162,4 +166,139 @@ public class JuddiAdminService {
                 System.out.println("Success.");
 
         }
+
+        void viewReplicationConfig(String authtoken) throws Exception {
+                List<Node> uddiNodeList = clerkManager.getClientConfig().getUDDINodeList();
+                System.out.println();
+                System.out.println("Select a node (from *this config)");
+                for (int i = 0; i < uddiNodeList.size(); i++) {
+                        System.out.print(i + 1);
+                        System.out.println(") " + uddiNodeList.get(i).getName() + uddiNodeList.get(i).getDescription());
+                }
+                System.out.println("Node #: ");
+                int index = Integer.parseInt(System.console().readLine()) - 1;
+                String node = uddiNodeList.get(index).getName();
+                Transport transport = clerkManager.getTransport(node);
+
+                JUDDIApiPortType juddiApiService = transport.getJUDDIApiService();
+                ReplicationConfiguration replicationNodes = juddiApiService.getReplicationNodes(authtoken);
+
+                System.out.println("Current Config:");
+                JAXB.marshal(replicationNodes, System.out);
+
+        }
+
+        void setReplicationConfig(String authtoken) throws Exception {
+                List<Node> uddiNodeList = clerkManager.getClientConfig().getUDDINodeList();
+                System.out.println();
+                System.out.println("Select a node (from *this config)");
+                for (int i = 0; i < uddiNodeList.size(); i++) {
+                        System.out.print(i + 1);
+                        System.out.println(") " + uddiNodeList.get(i).getName() + uddiNodeList.get(i).getDescription());
+                }
+                System.out.println("Node #: ");
+                int index = Integer.parseInt(System.console().readLine()) - 1;
+                String node = uddiNodeList.get(index).getName();
+                Transport transport = clerkManager.getTransport(node);
+
+                JUDDIApiPortType juddiApiService = transport.getJUDDIApiService();
+
+                ReplicationConfiguration replicationNodes = juddiApiService.getReplicationNodes(authtoken);
+
+                String input = "";
+                while (!"d".equalsIgnoreCase(input) && !"q".equalsIgnoreCase(input)) {
+                        System.out.println("Current Config:");
+                        JAXB.marshal(replicationNodes, System.out);
+                        System.out.println("1) Remove a replication node");
+                        System.out.println("2) Add a replication node");
+                        System.out.println("3) Remove an Edge");
+                        System.out.println("4) Add an Edge");
+                        System.out.println("5) Set Registry Contact");
+                        System.out.println("6) Add Operator info");
+                        System.out.println("7) Remove Operator info");
+                        input = System.console().readLine();
+                        if (input.equalsIgnoreCase("1")) {
+                                menu_RemoveReplicationNode(replicationNodes);
+                        } else if (input.equalsIgnoreCase("2")) {
+                                menu_AddReplicationNode(replicationNodes, juddiApiService, authtoken);
+                        }
+
+                }
+                if (input.equalsIgnoreCase("d")) {
+                        //save the changes
+                        DispositionReport setReplicationNodes = juddiApiService.setReplicationNodes(authtoken, replicationNodes);
+                        System.out.println("Saved!, dumping config from the server");
+                        replicationNodes = juddiApiService.getReplicationNodes(authtoken);
+                        JAXB.marshal(replicationNodes, System.out);
+
+                } else {
+                        //quit this sub menu
+                        System.out.println("aborting!");
+                }
+
+        }
+
+        void viewRemoveRemoteNode(String authtoken) throws Exception {
+                List<Node> uddiNodeList = clerkManager.getClientConfig().getUDDINodeList();
+                System.out.println();
+                System.out.println("Select a node (from *this config)");
+                for (int i = 0; i < uddiNodeList.size(); i++) {
+                        System.out.print(i + 1);
+                        System.out.println(") " + uddiNodeList.get(i).getName() + uddiNodeList.get(i).getDescription());
+                }
+                System.out.println("Node #: ");
+                int index = Integer.parseInt(System.console().readLine()) - 1;
+                String node = uddiNodeList.get(index).getName();
+                Transport transport = clerkManager.getTransport(node);
+
+                JUDDIApiPortType juddiApiService = transport.getJUDDIApiService();
+
+                NodeList allNodes = juddiApiService.getAllNodes(authtoken);
+                if (allNodes == null || allNodes.getNode().isEmpty()) {
+                        System.out.println("No nodes registered!");
+                } else {
+                        for (int i = 0; i < allNodes.getNode().size(); i++) {
+                                System.out.println("_______________________________________________________________________________");
+                                System.out.println("(" + i + ") Name :" + allNodes.getNode().get(i).getName());
+                                System.out.println("(" + i + ") Inquiry :" + allNodes.getNode().get(i).getInquiryUrl());
+
+                        }
+
+                        System.out.println("Node to remove from : ");
+                        int nodenum = Integer.parseInt(System.console().readLine());
+                        juddiApiService.deleteNode(new DeleteNode(authtoken, allNodes.getNode().get(nodenum).getName()));
+
+                }
+        }
+
+        private void menu_RemoveReplicationNode(ReplicationConfiguration replicationNodes) {
+                if (replicationNodes.getCommunicationGraph() == null) {
+                        replicationNodes.setCommunicationGraph(new CommunicationGraph());
+                }
+                for (int i = 0; i < replicationNodes.getCommunicationGraph().getNode().size(); i++) {
+                        System.out.println((i + 1) + ") " + replicationNodes.getCommunicationGraph().getNode().get(i));
+                }
+                System.out.println("Node #: ");
+                int index = Integer.parseInt(System.console().readLine()) - 1;
+                replicationNodes.getCommunicationGraph().getNode().remove(index);
+
+        }
+
+        private void menu_AddReplicationNode(ReplicationConfiguration replicationNodes, JUDDIApiPortType juddiApiService, String authtoken) throws Exception {
+
+                NodeList allNodes = juddiApiService.getAllNodes(authtoken);
+                if (allNodes == null || allNodes.getNode().isEmpty()) {
+                        System.out.println("No nodes registered!");
+                } else {
+                        for (int i = 0; i < allNodes.getNode().size(); i++) {
+                                System.out.println((i + 1) + ") Name :" + allNodes.getNode().get(i).getName());
+                                System.out.println((i + 1) + ") Replication :" + allNodes.getNode().get(i).getReplicationUrl());
+
+                        }
+                        System.out.println("Node #: ");
+                        int index = Integer.parseInt(System.console().readLine()) - 1;
+                        replicationNodes.getCommunicationGraph().getNode().add(allNodes.getNode().get(index).getName());
+                }
+
+        }
 }

http://git-wip-us.apache.org/repos/asf/juddi/blob/03dce361/juddi-tomcat/build.xml
----------------------------------------------------------------------
diff --git a/juddi-tomcat/build.xml b/juddi-tomcat/build.xml
index 1f23d6f..836f808 100644
--- a/juddi-tomcat/build.xml
+++ b/juddi-tomcat/build.xml
@@ -54,8 +54,8 @@
 	<target name="unzip-tomcat2">
 		<mkdir dir="${basedir}/target/tomcat2"/>
 		<unzip dest="${basedir}/target/tomcat2" src="${dependency.tomcat.zip}"/>
-		<unzip dest="${webapps.dir}/juddiv3" src="${dependency.juddiv3.war}"/>
-		<unzip dest="${webapps.dir}/juddi-gui" src="${dependency.juddi-gui.war}"/>
+		<unzip dest="${webapps2.dir}/juddiv3" src="${dependency.juddiv3.war}"/>
+		<unzip dest="${webapps2.dir}/juddi-gui" src="${dependency.juddi-gui.war}"/>
 	</target>
 	
 	<target name="copy-resources2" depends="unzip-tomcat2">
@@ -71,6 +71,11 @@
 		
 		
 		<copy file="${basedir}/juddiv3Node2.xml" tofile="${webapps2.dir}/juddiv3/WEB-INF/classes/juddiv3.xml" overwrite="true"/>
+		<copy file="${basedir}/juddi_install_data_node2/root_BusinessEntity.xml" todir="${webapps2.dir}/juddiv3/WEB-INF/classes/juddi_custom_install_data/" overwrite="true"/>
+<copy file="${basedir}/juddi_install_data_node2/root_Publisher.xml" todir="${webapps2.dir}/juddiv3/WEB-INF/classes/juddi_custom_install_data/" overwrite="true"/>
+<copy file="${basedir}/juddi_install_data_node2/root_tModelKeyGen.xml" todir="${webapps2.dir}/juddiv3/WEB-INF/classes/juddi_custom_install_data/" overwrite="true"/>
+
+		
 		<copy file="${basedir}/uddiNode2.xml" tofile="${webapps2.dir}/juddi-gui/WEB-INF/classes/META-INF/uddi.xml" overwrite="true"/>
 		<copy file="${basedir}/serverNode2.xml" tofile="${conf2.dir}/server.xml" overwrite="true"/>
 		
@@ -96,4 +101,6 @@
 		</chmod>
 	</target>
 
+	<target name="twonode" depends="package-tomcat,package-tomcat2"/>
+
 </project>

http://git-wip-us.apache.org/repos/asf/juddi/blob/03dce361/juddi-tomcat/juddiv3Node2.xml
----------------------------------------------------------------------
diff --git a/juddi-tomcat/juddiv3Node2.xml b/juddi-tomcat/juddiv3Node2.xml
index 988eb81..ceaa7e7 100644
--- a/juddi-tomcat/juddiv3Node2.xml
+++ b/juddi-tomcat/juddiv3Node2.xml
@@ -26,7 +26,7 @@
 			<!-- 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:another.juddi.apache.org:node2</businessId>
+			<businessId>uddi:another.juddi.apache.org:businesses-asf</businessId>
 			<partition>uddi:another.juddi.apache.org</partition>
 		</root>
 		<seed>
@@ -197,4 +197,4 @@
 			<logInquirySearchPayloads>false</logInquirySearchPayloads>
 		</logging>
 	</juddi>
-</config>
\ No newline at end of file
+</config>

http://git-wip-us.apache.org/repos/asf/juddi/blob/03dce361/juddi-tomcat/pom.xml
----------------------------------------------------------------------
diff --git a/juddi-tomcat/pom.xml b/juddi-tomcat/pom.xml
index cf23952..2bdda07 100644
--- a/juddi-tomcat/pom.xml
+++ b/juddi-tomcat/pom.xml
@@ -138,8 +138,8 @@
 								<property name="dependency.jaxws.jar" value="${maven.dependency.org.apache.geronimo.specs.geronimo-jaxws_2.2_spec.jar.path}" />
 								<ant antfile="${basedir}/build.xml">
 									<property name="dependency.tomcat.zip" value="${dependency.tomcat.zip}" />
-									<target name="package-tomcat" />
-									<target name="package-tomcat2" />
+									<target name="twonode" />
+									
 								</ant>
 							</tasks>
 						</configuration>

http://git-wip-us.apache.org/repos/asf/juddi/blob/03dce361/juddiv3-war/JPA/Hibernate-JBoss/WEB-INF/classes/META-INF/persistence.xml
----------------------------------------------------------------------
diff --git a/juddiv3-war/JPA/Hibernate-JBoss/WEB-INF/classes/META-INF/persistence.xml b/juddiv3-war/JPA/Hibernate-JBoss/WEB-INF/classes/META-INF/persistence.xml
index 35d980d..b8cde50 100644
--- a/juddiv3-war/JPA/Hibernate-JBoss/WEB-INF/classes/META-INF/persistence.xml
+++ b/juddiv3-war/JPA/Hibernate-JBoss/WEB-INF/classes/META-INF/persistence.xml
@@ -6,47 +6,47 @@
   <persistence-unit name="juddiDatabase" transaction-type="RESOURCE_LOCAL">
     <provider>org.hibernate.ejb.HibernatePersistence</provider>
     <non-jta-data-source>java:/DefaultDS</non-jta-data-source>
-        <!-- entity classes -->
-    <class>org.apache.juddi.model.Address</class>
-    <class>org.apache.juddi.model.AddressLine</class>
-    <class>org.apache.juddi.model.AuthToken</class>
-    <class>org.apache.juddi.model.BindingCategoryBag</class>
-    <class>org.apache.juddi.model.BindingDescr</class>
-    <class>org.apache.juddi.model.BindingTemplate</class>
-    <class>org.apache.juddi.model.BusinessCategoryBag</class>
-    <class>org.apache.juddi.model.BusinessDescr</class>
-    <class>org.apache.juddi.model.BusinessEntity</class>
-    <class>org.apache.juddi.model.BusinessIdentifier</class>
-    <class>org.apache.juddi.model.BusinessName</class>
-    <class>org.apache.juddi.model.BusinessService</class>
+        <!-- entity classes -->
+    <class>org.apache.juddi.model.Address</class>
+    <class>org.apache.juddi.model.AddressLine</class>
+    <class>org.apache.juddi.model.AuthToken</class>
+    <class>org.apache.juddi.model.BindingCategoryBag</class>
+    <class>org.apache.juddi.model.BindingDescr</class>
+    <class>org.apache.juddi.model.BindingTemplate</class>
+    <class>org.apache.juddi.model.BusinessCategoryBag</class>
+    <class>org.apache.juddi.model.BusinessDescr</class>
+    <class>org.apache.juddi.model.BusinessEntity</class>
+    <class>org.apache.juddi.model.BusinessIdentifier</class>
+    <class>org.apache.juddi.model.BusinessName</class>
+    <class>org.apache.juddi.model.BusinessService</class>
     <class>org.apache.juddi.model.CanonicalizationMethod</class>
     <class>org.apache.juddi.model.CategoryBag</class>
     <class>org.apache.juddi.model.Clerk</class>
-    <class>org.apache.juddi.model.ClientSubscriptionInfo</class>
-    <class>org.apache.juddi.model.Contact</class>
-    <class>org.apache.juddi.model.ContactDescr</class>
-    <class>org.apache.juddi.model.DiscoveryUrl</class>
-    <class>org.apache.juddi.model.Email</class>
-    <class>org.apache.juddi.model.InstanceDetailsDescr</class>
-    <class>org.apache.juddi.model.InstanceDetailsDocDescr</class>
-    <class>org.apache.juddi.model.KeyedReference</class>
+    <class>org.apache.juddi.model.ClientSubscriptionInfo</class>
+    <class>org.apache.juddi.model.Contact</class>
+    <class>org.apache.juddi.model.ContactDescr</class>
+    <class>org.apache.juddi.model.DiscoveryUrl</class>
+    <class>org.apache.juddi.model.Email</class>
+    <class>org.apache.juddi.model.InstanceDetailsDescr</class>
+    <class>org.apache.juddi.model.InstanceDetailsDocDescr</class>
+    <class>org.apache.juddi.model.KeyedReference</class>
     <class>org.apache.juddi.model.KeyedReferenceGroup</class>
     <class>org.apache.juddi.model.KeyDataValue</class>
     <class>org.apache.juddi.model.KeyInfo</class>
-    <class>org.apache.juddi.model.Node</class>
+    <class>org.apache.juddi.model.Node</class>
     <class>org.apache.juddi.model.ObjectType</class>
     <class>org.apache.juddi.model.ObjectTypeContent</class>
-    <class>org.apache.juddi.model.OverviewDoc</class>
-    <class>org.apache.juddi.model.OverviewDocDescr</class>
-    <class>org.apache.juddi.model.PersonName</class>
-    <class>org.apache.juddi.model.Phone</class>
-    <class>org.apache.juddi.model.Publisher</class>
-    <class>org.apache.juddi.model.PublisherAssertion</class>
-    <class>org.apache.juddi.model.PublisherAssertionId</class>
+    <class>org.apache.juddi.model.OverviewDoc</class>
+    <class>org.apache.juddi.model.OverviewDocDescr</class>
+    <class>org.apache.juddi.model.PersonName</class>
+    <class>org.apache.juddi.model.Phone</class>
+    <class>org.apache.juddi.model.Publisher</class>
+    <class>org.apache.juddi.model.PublisherAssertion</class>
+    <class>org.apache.juddi.model.PublisherAssertionId</class>
     <class>org.apache.juddi.model.Reference</class>
-    <class>org.apache.juddi.model.ServiceCategoryBag</class>
-    <class>org.apache.juddi.model.ServiceDescr</class>
-    <class>org.apache.juddi.model.ServiceName</class>
+    <class>org.apache.juddi.model.ServiceCategoryBag</class>
+    <class>org.apache.juddi.model.ServiceDescr</class>
+    <class>org.apache.juddi.model.ServiceName</class>
     <class>org.apache.juddi.model.ServiceProjection</class>
     <class>org.apache.juddi.model.ServiceProjectionId</class>
     <class>org.apache.juddi.model.Signature</class>
@@ -56,30 +56,27 @@
     <class>org.apache.juddi.model.SignatureValue</class>
     <class>org.apache.juddi.model.SignedInfo</class>
     <class>org.apache.juddi.model.Subscription</class>
-    <class>org.apache.juddi.model.SubscriptionChunkToken</class>
+    <class>org.apache.juddi.model.SubscriptionChunkToken</class>
     <class>org.apache.juddi.model.SubscriptionMatch</class>
     <class>org.apache.juddi.model.TempKey</class>
-	<class>org.apache.juddi.model.TempKeyPK</class>
-    <class>org.apache.juddi.model.Tmodel</class>
-    <class>org.apache.juddi.model.TmodelCategoryBag</class>
-    <class>org.apache.juddi.model.TmodelDescr</class>
-    <class>org.apache.juddi.model.TmodelIdentifier</class>
-    <class>org.apache.juddi.model.TmodelInstanceInfo</class>
-    <class>org.apache.juddi.model.TmodelInstanceInfoDescr</class>
-    <class>org.apache.juddi.model.TransferToken</class>
-    <class>org.apache.juddi.model.TransferTokenKey</class>
-    <class>org.apache.juddi.model.UddiEntity</class>
-    <class>org.apache.juddi.model.UddiEntityPublisher</class>
+	<class>org.apache.juddi.model.TempKeyPK</class>
+    <class>org.apache.juddi.model.Tmodel</class>
+    <class>org.apache.juddi.model.TmodelCategoryBag</class>
+    <class>org.apache.juddi.model.TmodelDescr</class>
+    <class>org.apache.juddi.model.TmodelIdentifier</class>
+    <class>org.apache.juddi.model.TmodelInstanceInfo</class>
+    <class>org.apache.juddi.model.TmodelInstanceInfoDescr</class>
+    <class>org.apache.juddi.model.TransferToken</class>
+    <class>org.apache.juddi.model.TransferTokenKey</class>
+    <class>org.apache.juddi.model.UddiEntity</class>
+    <class>org.apache.juddi.model.UddiEntityPublisher</class>
 	<class>org.apache.juddi.model.ValueSetValues</class>
 
 	<class>org.apache.juddi.model.ChangeRecord</class>
-	<class>org.apache.juddi.model.CommunicationGraph</class>
 	<class>org.apache.juddi.model.Operator</class>
 	<class>org.apache.juddi.model.ReplicationConfiguration</class>
 	<class>org.apache.juddi.model.Edge</class>
 	<class>org.apache.juddi.model.ControlMessage</class>
-	<class>org.apache.juddi.model.ReplicationMessage</class>
-	
 
     <properties>
       <property name="hibernate.archive.autodetection" value="class"/>

http://git-wip-us.apache.org/repos/asf/juddi/blob/03dce361/juddiv3-war/JPA/Hibernate-JBossAS7Up/WEB-INF/classes/META-INF/persistence.xml
----------------------------------------------------------------------
diff --git a/juddiv3-war/JPA/Hibernate-JBossAS7Up/WEB-INF/classes/META-INF/persistence.xml b/juddiv3-war/JPA/Hibernate-JBossAS7Up/WEB-INF/classes/META-INF/persistence.xml
index 0033ed2..70cde98 100644
--- a/juddiv3-war/JPA/Hibernate-JBossAS7Up/WEB-INF/classes/META-INF/persistence.xml
+++ b/juddiv3-war/JPA/Hibernate-JBossAS7Up/WEB-INF/classes/META-INF/persistence.xml
@@ -7,47 +7,47 @@
   <persistence-unit name="juddiDatabase" transaction-type="RESOURCE_LOCAL">
     <provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
     <jta-data-source>java:jboss/datasources/ExampleDS</jta-data-source>
-        <!-- entity classes -->
-    <class>org.apache.juddi.model.Address</class>
-    <class>org.apache.juddi.model.AddressLine</class>
-    <class>org.apache.juddi.model.AuthToken</class>
-    <class>org.apache.juddi.model.BindingCategoryBag</class>
-    <class>org.apache.juddi.model.BindingDescr</class>
-    <class>org.apache.juddi.model.BindingTemplate</class>
-    <class>org.apache.juddi.model.BusinessCategoryBag</class>
-    <class>org.apache.juddi.model.BusinessDescr</class>
-    <class>org.apache.juddi.model.BusinessEntity</class>
-    <class>org.apache.juddi.model.BusinessIdentifier</class>
-    <class>org.apache.juddi.model.BusinessName</class>
-    <class>org.apache.juddi.model.BusinessService</class>
+        <!-- entity classes -->
+    <class>org.apache.juddi.model.Address</class>
+    <class>org.apache.juddi.model.AddressLine</class>
+    <class>org.apache.juddi.model.AuthToken</class>
+    <class>org.apache.juddi.model.BindingCategoryBag</class>
+    <class>org.apache.juddi.model.BindingDescr</class>
+    <class>org.apache.juddi.model.BindingTemplate</class>
+    <class>org.apache.juddi.model.BusinessCategoryBag</class>
+    <class>org.apache.juddi.model.BusinessDescr</class>
+    <class>org.apache.juddi.model.BusinessEntity</class>
+    <class>org.apache.juddi.model.BusinessIdentifier</class>
+    <class>org.apache.juddi.model.BusinessName</class>
+    <class>org.apache.juddi.model.BusinessService</class>
     <class>org.apache.juddi.model.CanonicalizationMethod</class>
     <class>org.apache.juddi.model.CategoryBag</class>
     <class>org.apache.juddi.model.Clerk</class>
-    <class>org.apache.juddi.model.ClientSubscriptionInfo</class>
-    <class>org.apache.juddi.model.Contact</class>
-    <class>org.apache.juddi.model.ContactDescr</class>
-    <class>org.apache.juddi.model.DiscoveryUrl</class>
-    <class>org.apache.juddi.model.Email</class>
-    <class>org.apache.juddi.model.InstanceDetailsDescr</class>
-    <class>org.apache.juddi.model.InstanceDetailsDocDescr</class>
-    <class>org.apache.juddi.model.KeyedReference</class>
+    <class>org.apache.juddi.model.ClientSubscriptionInfo</class>
+    <class>org.apache.juddi.model.Contact</class>
+    <class>org.apache.juddi.model.ContactDescr</class>
+    <class>org.apache.juddi.model.DiscoveryUrl</class>
+    <class>org.apache.juddi.model.Email</class>
+    <class>org.apache.juddi.model.InstanceDetailsDescr</class>
+    <class>org.apache.juddi.model.InstanceDetailsDocDescr</class>
+    <class>org.apache.juddi.model.KeyedReference</class>
     <class>org.apache.juddi.model.KeyedReferenceGroup</class>
     <class>org.apache.juddi.model.KeyDataValue</class>
     <class>org.apache.juddi.model.KeyInfo</class>
-    <class>org.apache.juddi.model.Node</class>
+    <class>org.apache.juddi.model.Node</class>
     <class>org.apache.juddi.model.ObjectType</class>
     <class>org.apache.juddi.model.ObjectTypeContent</class>
-    <class>org.apache.juddi.model.OverviewDoc</class>
-    <class>org.apache.juddi.model.OverviewDocDescr</class>
-    <class>org.apache.juddi.model.PersonName</class>
-    <class>org.apache.juddi.model.Phone</class>
-    <class>org.apache.juddi.model.Publisher</class>
-    <class>org.apache.juddi.model.PublisherAssertion</class>
-    <class>org.apache.juddi.model.PublisherAssertionId</class>
+    <class>org.apache.juddi.model.OverviewDoc</class>
+    <class>org.apache.juddi.model.OverviewDocDescr</class>
+    <class>org.apache.juddi.model.PersonName</class>
+    <class>org.apache.juddi.model.Phone</class>
+    <class>org.apache.juddi.model.Publisher</class>
+    <class>org.apache.juddi.model.PublisherAssertion</class>
+    <class>org.apache.juddi.model.PublisherAssertionId</class>
     <class>org.apache.juddi.model.Reference</class>
-    <class>org.apache.juddi.model.ServiceCategoryBag</class>
-    <class>org.apache.juddi.model.ServiceDescr</class>
-    <class>org.apache.juddi.model.ServiceName</class>
+    <class>org.apache.juddi.model.ServiceCategoryBag</class>
+    <class>org.apache.juddi.model.ServiceDescr</class>
+    <class>org.apache.juddi.model.ServiceName</class>
     <class>org.apache.juddi.model.ServiceProjection</class>
     <class>org.apache.juddi.model.ServiceProjectionId</class>
     <class>org.apache.juddi.model.Signature</class>
@@ -57,29 +57,27 @@
     <class>org.apache.juddi.model.SignatureValue</class>
     <class>org.apache.juddi.model.SignedInfo</class>
     <class>org.apache.juddi.model.Subscription</class>
-    <class>org.apache.juddi.model.SubscriptionChunkToken</class>
+    <class>org.apache.juddi.model.SubscriptionChunkToken</class>
     <class>org.apache.juddi.model.SubscriptionMatch</class>
     <class>org.apache.juddi.model.TempKey</class>
-	<class>org.apache.juddi.model.TempKeyPK</class>
-    <class>org.apache.juddi.model.Tmodel</class>
-    <class>org.apache.juddi.model.TmodelCategoryBag</class>
-    <class>org.apache.juddi.model.TmodelDescr</class>
-    <class>org.apache.juddi.model.TmodelIdentifier</class>
-    <class>org.apache.juddi.model.TmodelInstanceInfo</class>
-    <class>org.apache.juddi.model.TmodelInstanceInfoDescr</class>
-    <class>org.apache.juddi.model.TransferToken</class>
-    <class>org.apache.juddi.model.TransferTokenKey</class>
-    <class>org.apache.juddi.model.UddiEntity</class>
-    <class>org.apache.juddi.model.UddiEntityPublisher</class>
+	<class>org.apache.juddi.model.TempKeyPK</class>
+    <class>org.apache.juddi.model.Tmodel</class>
+    <class>org.apache.juddi.model.TmodelCategoryBag</class>
+    <class>org.apache.juddi.model.TmodelDescr</class>
+    <class>org.apache.juddi.model.TmodelIdentifier</class>
+    <class>org.apache.juddi.model.TmodelInstanceInfo</class>
+    <class>org.apache.juddi.model.TmodelInstanceInfoDescr</class>
+    <class>org.apache.juddi.model.TransferToken</class>
+    <class>org.apache.juddi.model.TransferTokenKey</class>
+    <class>org.apache.juddi.model.UddiEntity</class>
+    <class>org.apache.juddi.model.UddiEntityPublisher</class>
 	<class>org.apache.juddi.model.ValueSetValues</class>
 
 	<class>org.apache.juddi.model.ChangeRecord</class>
-	<class>org.apache.juddi.model.CommunicationGraph</class>
 	<class>org.apache.juddi.model.Operator</class>
 	<class>org.apache.juddi.model.ReplicationConfiguration</class>
 	<class>org.apache.juddi.model.Edge</class>
 	<class>org.apache.juddi.model.ControlMessage</class>
-	<class>org.apache.juddi.model.ReplicationMessage</class>
 	
     <properties>
       <property name="hibernate.archive.autodetection" value="class"/>

http://git-wip-us.apache.org/repos/asf/juddi/blob/03dce361/juddiv3-war/JPA/Hibernate/WEB-INF/classes/META-INF/persistence.xml
----------------------------------------------------------------------
diff --git a/juddiv3-war/JPA/Hibernate/WEB-INF/classes/META-INF/persistence.xml b/juddiv3-war/JPA/Hibernate/WEB-INF/classes/META-INF/persistence.xml
index 24b8a0a..e762ef9 100644
--- a/juddiv3-war/JPA/Hibernate/WEB-INF/classes/META-INF/persistence.xml
+++ b/juddiv3-war/JPA/Hibernate/WEB-INF/classes/META-INF/persistence.xml
@@ -6,47 +6,47 @@
   <persistence-unit name="juddiDatabase" transaction-type="RESOURCE_LOCAL">
     <provider>org.hibernate.ejb.HibernatePersistence</provider>
     <jta-data-source>java:comp/env/jdbc/JuddiDS</jta-data-source>
-        <!-- entity classes -->
-    <class>org.apache.juddi.model.Address</class>
-    <class>org.apache.juddi.model.AddressLine</class>
-    <class>org.apache.juddi.model.AuthToken</class>
-    <class>org.apache.juddi.model.BindingCategoryBag</class>
-    <class>org.apache.juddi.model.BindingDescr</class>
-    <class>org.apache.juddi.model.BindingTemplate</class>
-    <class>org.apache.juddi.model.BusinessCategoryBag</class>
-    <class>org.apache.juddi.model.BusinessDescr</class>
-    <class>org.apache.juddi.model.BusinessEntity</class>
-    <class>org.apache.juddi.model.BusinessIdentifier</class>
-    <class>org.apache.juddi.model.BusinessName</class>
-    <class>org.apache.juddi.model.BusinessService</class>
+        <!-- entity classes -->
+    <class>org.apache.juddi.model.Address</class>
+    <class>org.apache.juddi.model.AddressLine</class>
+    <class>org.apache.juddi.model.AuthToken</class>
+    <class>org.apache.juddi.model.BindingCategoryBag</class>
+    <class>org.apache.juddi.model.BindingDescr</class>
+    <class>org.apache.juddi.model.BindingTemplate</class>
+    <class>org.apache.juddi.model.BusinessCategoryBag</class>
+    <class>org.apache.juddi.model.BusinessDescr</class>
+    <class>org.apache.juddi.model.BusinessEntity</class>
+    <class>org.apache.juddi.model.BusinessIdentifier</class>
+    <class>org.apache.juddi.model.BusinessName</class>
+    <class>org.apache.juddi.model.BusinessService</class>
     <class>org.apache.juddi.model.CanonicalizationMethod</class>
     <class>org.apache.juddi.model.CategoryBag</class>
     <class>org.apache.juddi.model.Clerk</class>
-    <class>org.apache.juddi.model.ClientSubscriptionInfo</class>
-    <class>org.apache.juddi.model.Contact</class>
-    <class>org.apache.juddi.model.ContactDescr</class>
-    <class>org.apache.juddi.model.DiscoveryUrl</class>
-    <class>org.apache.juddi.model.Email</class>
-    <class>org.apache.juddi.model.InstanceDetailsDescr</class>
-    <class>org.apache.juddi.model.InstanceDetailsDocDescr</class>
-    <class>org.apache.juddi.model.KeyedReference</class>
+    <class>org.apache.juddi.model.ClientSubscriptionInfo</class>
+    <class>org.apache.juddi.model.Contact</class>
+    <class>org.apache.juddi.model.ContactDescr</class>
+    <class>org.apache.juddi.model.DiscoveryUrl</class>
+    <class>org.apache.juddi.model.Email</class>
+    <class>org.apache.juddi.model.InstanceDetailsDescr</class>
+    <class>org.apache.juddi.model.InstanceDetailsDocDescr</class>
+    <class>org.apache.juddi.model.KeyedReference</class>
     <class>org.apache.juddi.model.KeyedReferenceGroup</class>
     <class>org.apache.juddi.model.KeyDataValue</class>
     <class>org.apache.juddi.model.KeyInfo</class>
-    <class>org.apache.juddi.model.Node</class>
+    <class>org.apache.juddi.model.Node</class>
     <class>org.apache.juddi.model.ObjectType</class>
     <class>org.apache.juddi.model.ObjectTypeContent</class>
-    <class>org.apache.juddi.model.OverviewDoc</class>
-    <class>org.apache.juddi.model.OverviewDocDescr</class>
-    <class>org.apache.juddi.model.PersonName</class>
-    <class>org.apache.juddi.model.Phone</class>
-    <class>org.apache.juddi.model.Publisher</class>
-    <class>org.apache.juddi.model.PublisherAssertion</class>
-    <class>org.apache.juddi.model.PublisherAssertionId</class>
+    <class>org.apache.juddi.model.OverviewDoc</class>
+    <class>org.apache.juddi.model.OverviewDocDescr</class>
+    <class>org.apache.juddi.model.PersonName</class>
+    <class>org.apache.juddi.model.Phone</class>
+    <class>org.apache.juddi.model.Publisher</class>
+    <class>org.apache.juddi.model.PublisherAssertion</class>
+    <class>org.apache.juddi.model.PublisherAssertionId</class>
     <class>org.apache.juddi.model.Reference</class>
-    <class>org.apache.juddi.model.ServiceCategoryBag</class>
-    <class>org.apache.juddi.model.ServiceDescr</class>
-    <class>org.apache.juddi.model.ServiceName</class>
+    <class>org.apache.juddi.model.ServiceCategoryBag</class>
+    <class>org.apache.juddi.model.ServiceDescr</class>
+    <class>org.apache.juddi.model.ServiceName</class>
     <class>org.apache.juddi.model.ServiceProjection</class>
     <class>org.apache.juddi.model.ServiceProjectionId</class>
     <class>org.apache.juddi.model.Signature</class>
@@ -56,20 +56,20 @@
     <class>org.apache.juddi.model.SignatureValue</class>
     <class>org.apache.juddi.model.SignedInfo</class>
     <class>org.apache.juddi.model.Subscription</class>
-    <class>org.apache.juddi.model.SubscriptionChunkToken</class>
+    <class>org.apache.juddi.model.SubscriptionChunkToken</class>
     <class>org.apache.juddi.model.SubscriptionMatch</class>
     <class>org.apache.juddi.model.TempKey</class>
-	<class>org.apache.juddi.model.TempKeyPK</class>
-    <class>org.apache.juddi.model.Tmodel</class>
-    <class>org.apache.juddi.model.TmodelCategoryBag</class>
-    <class>org.apache.juddi.model.TmodelDescr</class>
-    <class>org.apache.juddi.model.TmodelIdentifier</class>
-    <class>org.apache.juddi.model.TmodelInstanceInfo</class>
-    <class>org.apache.juddi.model.TmodelInstanceInfoDescr</class>
-    <class>org.apache.juddi.model.TransferToken</class>
-    <class>org.apache.juddi.model.TransferTokenKey</class>
-    <class>org.apache.juddi.model.UddiEntity</class>
-    <class>org.apache.juddi.model.UddiEntityPublisher</class>
+	<class>org.apache.juddi.model.TempKeyPK</class>
+    <class>org.apache.juddi.model.Tmodel</class>
+    <class>org.apache.juddi.model.TmodelCategoryBag</class>
+    <class>org.apache.juddi.model.TmodelDescr</class>
+    <class>org.apache.juddi.model.TmodelIdentifier</class>
+    <class>org.apache.juddi.model.TmodelInstanceInfo</class>
+    <class>org.apache.juddi.model.TmodelInstanceInfoDescr</class>
+    <class>org.apache.juddi.model.TransferToken</class>
+    <class>org.apache.juddi.model.TransferTokenKey</class>
+    <class>org.apache.juddi.model.UddiEntity</class>
+    <class>org.apache.juddi.model.UddiEntityPublisher</class>
 	<class>org.apache.juddi.model.ValueSetValues</class>
 
 	<class>org.apache.juddi.model.ChangeRecord</class>
@@ -78,8 +78,7 @@
 	<class>org.apache.juddi.model.ReplicationConfiguration</class>
 	<class>org.apache.juddi.model.Edge</class>
 	<class>org.apache.juddi.model.ControlMessage</class>
-	<class>org.apache.juddi.model.ReplicationMessage</class>
-
+	
     <properties>
       <property name="hibernate.archive.autodetection" value="class"/>
       <property name="hibernate.hbm2ddl.auto" value="update"/>

http://git-wip-us.apache.org/repos/asf/juddi/blob/03dce361/juddiv3-war/JPA/OpenJPA/WEB-INF/classes/META-INF/persistence.xml
----------------------------------------------------------------------
diff --git a/juddiv3-war/JPA/OpenJPA/WEB-INF/classes/META-INF/persistence.xml b/juddiv3-war/JPA/OpenJPA/WEB-INF/classes/META-INF/persistence.xml
index 1faa54a..c542732 100644
--- a/juddiv3-war/JPA/OpenJPA/WEB-INF/classes/META-INF/persistence.xml
+++ b/juddiv3-war/JPA/OpenJPA/WEB-INF/classes/META-INF/persistence.xml
@@ -72,14 +72,10 @@
     <class>org.apache.juddi.model.UddiEntityPublisher</class>
 	<class>org.apache.juddi.model.ValueSetValues</class>
 	<class>org.apache.juddi.model.ChangeRecord</class>
-	<class>org.apache.juddi.model.CommunicationGraph</class>
 	<class>org.apache.juddi.model.Edge</class>
 	<class>org.apache.juddi.model.Operator</class>
 	<class>org.apache.juddi.model.ReplicationConfiguration</class>
 	
-	<class>org.apache.juddi.model.ReplicationMessage</class>
-	
-
     <properties>
       <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(SchemaAction='add')"/>
       <property name="openjpa.Log" value="DefaultLevel=WARN, Tool=INFO"/>

http://git-wip-us.apache.org/repos/asf/juddi/blob/03dce361/juddiv3-war/src/main/webapp/index.jsp
----------------------------------------------------------------------
diff --git a/juddiv3-war/src/main/webapp/index.jsp b/juddiv3-war/src/main/webapp/index.jsp
index 78f552a..649049b 100644
--- a/juddiv3-war/src/main/webapp/index.jsp
+++ b/juddiv3-war/src/main/webapp/index.jsp
@@ -114,7 +114,7 @@
                 <%
                 } else {
                 %>
-                <h2>jUDDI has NOT installed correctly!</h2>
+                <h2 color="red">jUDDI has NOT installed correctly!</h2>
                 <p />
                 <h3>Error Information</h3>
                 <p>
@@ -125,6 +125,31 @@
                     <li>config/juddi/nodeId, default = uddi:juddi.apache.org:node1</li>
                     <li>config/juddi/rootBusinessId, default = uddi:juddi.apache.org:businesses-asf</li>
                 </ul>
+                Configured values:
+                <table>
+                    <tr>
+                        <td><b>Root Partition:</b></td>
+                        <td><%= StringEscapeUtils.escapeHtml(rootPartition)%></td>
+                    </tr>
+
+                    <tr>
+                        <td><b>Node Id:</b></td>
+                        <td><%=StringEscapeUtils.escapeHtml(nodeId)%></td>
+                    </tr>
+                    <tr>
+                        <td><b>Root Business Key:</b></td>
+                        <td><%= StringEscapeUtils.escapeHtml(rootBusiness)%></td>
+                    </tr>
+                    <tr>
+                        <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>
 
                 <%                    }
                 %>


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


[5/9] juddi git commit: JUDDI-241 get/set replication cfg now works for all sub elements. notify changes works, however getChangeRecords fails when called from within the tomcat container.

Posted by al...@apache.org.
http://git-wip-us.apache.org/repos/asf/juddi/blob/22a846dd/juddiv3-war/JPA/Hibernate-JBoss/WEB-INF/classes/META-INF/persistence.xml
----------------------------------------------------------------------
diff --git a/juddiv3-war/JPA/Hibernate-JBoss/WEB-INF/classes/META-INF/persistence.xml b/juddiv3-war/JPA/Hibernate-JBoss/WEB-INF/classes/META-INF/persistence.xml
index b8cde50..5b2cdb0 100644
--- a/juddiv3-war/JPA/Hibernate-JBoss/WEB-INF/classes/META-INF/persistence.xml
+++ b/juddiv3-war/JPA/Hibernate-JBoss/WEB-INF/classes/META-INF/persistence.xml
@@ -77,6 +77,8 @@
 	<class>org.apache.juddi.model.ReplicationConfiguration</class>
 	<class>org.apache.juddi.model.Edge</class>
 	<class>org.apache.juddi.model.ControlMessage</class>
+    <class>org.apache.juddi.model.ReplicationConfigurationNode</class>
+    <class>org.apache.juddi.model.EdgeReceiverAlternate</class>
 
     <properties>
       <property name="hibernate.archive.autodetection" value="class"/>

http://git-wip-us.apache.org/repos/asf/juddi/blob/22a846dd/juddiv3-war/JPA/Hibernate-JBossAS7Up/WEB-INF/classes/META-INF/persistence.xml
----------------------------------------------------------------------
diff --git a/juddiv3-war/JPA/Hibernate-JBossAS7Up/WEB-INF/classes/META-INF/persistence.xml b/juddiv3-war/JPA/Hibernate-JBossAS7Up/WEB-INF/classes/META-INF/persistence.xml
index 70cde98..d310f35 100644
--- a/juddiv3-war/JPA/Hibernate-JBossAS7Up/WEB-INF/classes/META-INF/persistence.xml
+++ b/juddiv3-war/JPA/Hibernate-JBossAS7Up/WEB-INF/classes/META-INF/persistence.xml
@@ -78,6 +78,8 @@
 	<class>org.apache.juddi.model.ReplicationConfiguration</class>
 	<class>org.apache.juddi.model.Edge</class>
 	<class>org.apache.juddi.model.ControlMessage</class>
+    <class>org.apache.juddi.model.ReplicationConfigurationNode</class>
+    <class>org.apache.juddi.model.EdgeReceiverAlternate</class>
 	
     <properties>
       <property name="hibernate.archive.autodetection" value="class"/>

http://git-wip-us.apache.org/repos/asf/juddi/blob/22a846dd/juddiv3-war/JPA/Hibernate/WEB-INF/classes/META-INF/persistence.xml
----------------------------------------------------------------------
diff --git a/juddiv3-war/JPA/Hibernate/WEB-INF/classes/META-INF/persistence.xml b/juddiv3-war/JPA/Hibernate/WEB-INF/classes/META-INF/persistence.xml
index e762ef9..5cb247d 100644
--- a/juddiv3-war/JPA/Hibernate/WEB-INF/classes/META-INF/persistence.xml
+++ b/juddiv3-war/JPA/Hibernate/WEB-INF/classes/META-INF/persistence.xml
@@ -78,6 +78,8 @@
 	<class>org.apache.juddi.model.ReplicationConfiguration</class>
 	<class>org.apache.juddi.model.Edge</class>
 	<class>org.apache.juddi.model.ControlMessage</class>
+    <class>org.apache.juddi.model.ReplicationConfigurationNode</class>
+    <class>org.apache.juddi.model.EdgeReceiverAlternate</class>
 	
     <properties>
       <property name="hibernate.archive.autodetection" value="class"/>

http://git-wip-us.apache.org/repos/asf/juddi/blob/22a846dd/juddiv3-war/JPA/OpenJPA/WEB-INF/classes/META-INF/persistence.xml
----------------------------------------------------------------------
diff --git a/juddiv3-war/JPA/OpenJPA/WEB-INF/classes/META-INF/persistence.xml b/juddiv3-war/JPA/OpenJPA/WEB-INF/classes/META-INF/persistence.xml
index c542732..9594254 100644
--- a/juddiv3-war/JPA/OpenJPA/WEB-INF/classes/META-INF/persistence.xml
+++ b/juddiv3-war/JPA/OpenJPA/WEB-INF/classes/META-INF/persistence.xml
@@ -75,6 +75,9 @@
 	<class>org.apache.juddi.model.Edge</class>
 	<class>org.apache.juddi.model.Operator</class>
 	<class>org.apache.juddi.model.ReplicationConfiguration</class>
+     <class>org.apache.juddi.model.ControlMessage</class>
+    <class>org.apache.juddi.model.ReplicationConfigurationNode</class>
+    <class>org.apache.juddi.model.EdgeReceiverAlternate</class>
 	
     <properties>
       <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(SchemaAction='add')"/>

http://git-wip-us.apache.org/repos/asf/juddi/blob/22a846dd/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 09768e2..4782fe0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -31,7 +31,7 @@
 		<sourceReleaseAssemblyDescriptor>source-release</sourceReleaseAssemblyDescriptor>
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
-		<cxf.version>2.7.5</cxf.version>
+		<cxf.version>2.7.13</cxf.version>
 		<springframework.version>3.2.2.RELEASE</springframework.version>
 	</properties>
 

http://git-wip-us.apache.org/repos/asf/juddi/blob/22a846dd/uddi-ws/pom.xml
----------------------------------------------------------------------
diff --git a/uddi-ws/pom.xml b/uddi-ws/pom.xml
index 278f914..fedb9ca 100644
--- a/uddi-ws/pom.xml
+++ b/uddi-ws/pom.xml
@@ -1,31 +1,31 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
- * Copyright 2001-2009 The Apache Software Foundation.
- *
- * Licensed 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.
- *
- */ -->
+* Copyright 2001-2009 The Apache Software Foundation.
+*
+* Licensed 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.
+*
+*/ -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<parent>
-		<groupId>org.apache.juddi</groupId>
-		<artifactId>juddi-parent</artifactId>
-		<version>3.2.1-SNAPSHOT</version>
-	</parent>
-	<artifactId>uddi-ws</artifactId>
-	<packaging>bundle</packaging>
-	<name>UDDIv2 and v3 WS Stubs and Schema Bindings Generated from WSDL</name>
-	<profiles>
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.juddi</groupId>
+        <artifactId>juddi-parent</artifactId>
+        <version>3.2.1-SNAPSHOT</version>
+    </parent>
+    <artifactId>uddi-ws</artifactId>
+    <packaging>bundle</packaging>
+    <name>UDDIv2 and v3 WS Stubs and Schema Bindings Generated from WSDL</name>
+    <profiles>
         <profile>
             <id>regenerate-source</id>
             <build>
@@ -53,13 +53,20 @@
             </build>
         </profile>
     </profiles>
-	<dependencies>
-		 <dependency>
-          <groupId>org.apache.geronimo.specs</groupId>
-          <artifactId>geronimo-jaxws_2.2_spec</artifactId>
-          <version>1.0</version>
-          <type>jar</type>
-          <scope>provided</scope>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-jaxws_2.2_spec</artifactId>
+            <version>1.0</version>
+            <type>jar</type>
+            <scope>provided</scope>
         </dependency>
-	</dependencies>
+        
+        <dependency>
+            <scope>test</scope>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-databinding-jaxb</artifactId>
+            <version>${cxf.version}</version>
+        </dependency>
+    </dependencies>
 </project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/juddi/blob/22a846dd/uddi-ws/src/main/java/org/apache/juddi/repl_v3/EdgeExt.java
----------------------------------------------------------------------
diff --git a/uddi-ws/src/main/java/org/apache/juddi/repl_v3/EdgeExt.java b/uddi-ws/src/main/java/org/apache/juddi/repl_v3/EdgeExt.java
deleted file mode 100644
index 35bf0a0..0000000
--- a/uddi-ws/src/main/java/org/apache/juddi/repl_v3/EdgeExt.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2013 The Apache Software Foundation.
- *
- * Licensed 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.
- */
-
-package org.apache.juddi.repl_v3;
-
-import org.uddi.repl_v3.CommunicationGraph;
-
-/**
- *
- * @author Alex O'Ree
- */
-public class EdgeExt extends CommunicationGraph.Edge {
-
-        private String replicationUrl;
-
-        public String getReplicationUrl() {
-                return replicationUrl;
-        }
-
-        public void setReplicationUrl(String replicationUrl) {
-                this.replicationUrl = replicationUrl;
-        }
-}

http://git-wip-us.apache.org/repos/asf/juddi/blob/22a846dd/uddi-ws/src/main/java/org/uddi/api_v3/GetAuthToken.java
----------------------------------------------------------------------
diff --git a/uddi-ws/src/main/java/org/uddi/api_v3/GetAuthToken.java b/uddi-ws/src/main/java/org/uddi/api_v3/GetAuthToken.java
index 1eb6f5a..05b55ad 100644
--- a/uddi-ws/src/main/java/org/uddi/api_v3/GetAuthToken.java
+++ b/uddi-ws/src/main/java/org/uddi/api_v3/GetAuthToken.java
@@ -14,8 +14,6 @@
  * limitations under the License.
  *
  */
-
-
 package org.uddi.api_v3;
 
 import java.io.Serializable;
@@ -26,12 +24,14 @@ import javax.xml.bind.annotation.XmlAttribute;
 import javax.xml.bind.annotation.XmlTransient;
 import javax.xml.bind.annotation.XmlType;
 
-
 /**
- * <p>Java class for get_authToken complex type.
- * 
- * <p>The following schema fragment specifies the expected content contained within this class.
- * 
+ * <p>
+ * Java class for get_authToken complex type.
+ *
+ * <p>
+ * The following schema fragment specifies the expected content contained within
+ * this class.
+ *
  * <pre>
  * &lt;complexType name="get_authToken">
  *   &lt;complexContent>
@@ -42,66 +42,70 @@ import javax.xml.bind.annotation.XmlType;
  *   &lt;/complexContent>
  * &lt;/complexType>
  * </pre>
- * 
- * 
+ *
+ *
  */
 @XmlAccessorType(XmlAccessType.FIELD)
 @XmlType(name = "get_authToken")
-public class GetAuthToken implements Serializable{
-	@XmlTransient
-	private static final long serialVersionUID = -2736132681478711038L;
-	@XmlAttribute(required = true)
-    protected String userID;
-    @XmlAttribute(required = true)
-    protected String cred;
+public class GetAuthToken implements Serializable {
+
+        public GetAuthToken() {
+        }
+
+        /**
+         * @since 3.3
+         * @param username
+         * @param password 
+         */
+        public GetAuthToken(String username, String password) {
+                this.userID = username;
+                this.cred = password;
+        }
+        @XmlTransient
+        private static final long serialVersionUID = -2736132681478711038L;
+        @XmlAttribute(required = true)
+        protected String userID;
+        @XmlAttribute(required = true)
+        protected String cred;
 
-    /**
-     * Gets the value of the userID property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
-     */
-    public String getUserID() {
-        return userID;
-    }
+        /**
+         * Gets the value of the userID property.
+         *
+         * @return possible object is {@link String }
+         *
+         */
+        public String getUserID() {
+                return userID;
+        }
 
-    /**
-     * Sets the value of the userID property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
-     */
-    public void setUserID(String value) {
-        this.userID = value;
-    }
+        /**
+         * Sets the value of the userID property.
+         *
+         * @param value allowed object is {@link String }
+         *
+         */
+        public void setUserID(String value) {
+                this.userID = value;
+        }
 
-    /**
-     * Gets the value of the cred property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
-     */
-    public String getCred() {
-        return cred;
-    }
+        /**
+         * Gets the value of the cred property.
+         *
+         * @return possible object is {@link String }
+         *
+         */
+        public String getCred() {
+                return cred;
+        }
 
-    /**
-     * Sets the value of the cred property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
-     */
-    public void setCred(String value) {
-        this.cred = value;
-    }
+        /**
+         * Sets the value of the cred property.
+         *
+         * @param value allowed object is {@link String }
+         *
+         */
+        public void setCred(String value) {
+                this.cred = value;
+        }
 
-}
-
\ No newline at end of file
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/juddi/blob/22a846dd/uddi-ws/src/main/java/org/uddi/repl_v3/CommunicationGraph.java
----------------------------------------------------------------------
diff --git a/uddi-ws/src/main/java/org/uddi/repl_v3/CommunicationGraph.java b/uddi-ws/src/main/java/org/uddi/repl_v3/CommunicationGraph.java
index 688dfb2..d9836e9 100644
--- a/uddi-ws/src/main/java/org/uddi/repl_v3/CommunicationGraph.java
+++ b/uddi-ws/src/main/java/org/uddi/repl_v3/CommunicationGraph.java
@@ -77,6 +77,7 @@ public class CommunicationGraph implements Serializable{
     protected List<String> node;
     @XmlElement(required = true)
     protected List<String> controlledMessage;
+    @XmlElement(required = false)
     protected List<CommunicationGraph.Edge> edge;
 
     /**

http://git-wip-us.apache.org/repos/asf/juddi/blob/22a846dd/uddi-ws/src/main/java/org/uddi/repl_v3/Operator.java
----------------------------------------------------------------------
diff --git a/uddi-ws/src/main/java/org/uddi/repl_v3/Operator.java b/uddi-ws/src/main/java/org/uddi/repl_v3/Operator.java
index c8848b3..6f4e70c 100644
--- a/uddi-ws/src/main/java/org/uddi/repl_v3/Operator.java
+++ b/uddi-ws/src/main/java/org/uddi/repl_v3/Operator.java
@@ -14,8 +14,6 @@
  * limitations under the License.
  *
  */
-
-
 package org.uddi.repl_v3;
 
 import java.io.Serializable;
@@ -31,12 +29,30 @@ import javax.xml.bind.annotation.XmlType;
 import org.uddi.api_v3.Contact;
 import org.w3._2000._09.xmldsig_.KeyInfoType;
 
-
 /**
- * <p>Java class for anonymous complex type.
- * 
- * <p>The following schema fragment specifies the expected content contained within this class.
- * 
+ * The operator elements in a Replication Configuration Structure are a list of
+ * the nodes and established paths of communication between the nodes within a
+ * registry. The communication paths and general replication topology
+ * considerations are discussed later in this specification.
+ * <br><br>
+ * The operatorNodeID contains a unique key that is used to uniquely identify
+ * this node throughout the UDDI registry. The value used MUST match the
+ * businessKey of the Node Business Entity as referenced in Section 6.2.2
+ * Self-Registration of Node Business Entity. The contact or contacts listed
+ * provide information about humans who should be contacted in the face of
+ * administrative and technical situations of various sorts. . The dsig:KeyInfo
+ * elements are intended to contain the certificate details if the
+ * soapReplicationURL makes use of Secure Sockets Layer 3.0 with mutual
+ * authentication as described in Section 7.5.5 Security Configuration.
+ *
+ *
+ * <p>
+ * Java class for anonymous complex type.
+ *
+ * <p>
+ * The following schema fragment specifies the expected content contained within
+ * this class.
+ *
  * <pre>
  * &lt;complexType>
  *   &lt;complexContent>
@@ -52,162 +68,150 @@ import org.w3._2000._09.xmldsig_.KeyInfoType;
  *   &lt;/complexContent>
  * &lt;/complexType>
  * </pre>
- * 
- * 
+ *
+ *
  */
 @XmlAccessorType(XmlAccessType.FIELD)
 @XmlType(name = "", propOrder = {
-    "operatorNodeID",
-    "operatorStatus",
-    "contact",
-    "soapReplicationURL",
-    "keyInfo"
+        "operatorNodeID",
+        "operatorStatus",
+        "contact",
+        "soapReplicationURL",
+        "keyInfo"
 })
 @XmlRootElement(name = "operator")
-public class Operator implements Serializable{
-	@XmlTransient
-	private static final long serialVersionUID = 3012475870316361941L;
-	@XmlElement(required = true)
-    protected String operatorNodeID;
-    @XmlElement(required = true)
-    protected OperatorStatusType operatorStatus;
-    @XmlElement(namespace = "urn:uddi-org:api_v3", required = true)
-    protected List<Contact> contact;
-    @XmlElement(required = true)
-    @XmlSchemaType(name = "anyURI")
-    protected String soapReplicationURL;
-    @XmlElement(name = "KeyInfo", namespace = "http://www.w3.org/2000/09/xmldsig#")
-    protected List<KeyInfoType> keyInfo;
+public class Operator implements Serializable {
 
-    /**
-     * Gets the value of the operatorNodeID property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
-     */
-    public String getOperatorNodeID() {
-        return operatorNodeID;
-    }
+        @XmlTransient
+        private static final long serialVersionUID = 3012475870316361941L;
+        @XmlElement(required = true)
+        protected String operatorNodeID;
+        @XmlElement(required = true)
+        protected OperatorStatusType operatorStatus;
+        @XmlElement(namespace = "urn:uddi-org:api_v3", required = true)
+        protected List<Contact> contact;
+        @XmlElement(required = true)
+        @XmlSchemaType(name = "anyURI")
+        protected String soapReplicationURL;
+        @XmlElement(name = "KeyInfo", namespace = "http://www.w3.org/2000/09/xmldsig#")
+        protected List<KeyInfoType> keyInfo;
+
+        /**
+         * Gets the value of the operatorNodeID property.
+         *
+         * @return possible object is {@link String }
+         *
+         */
+        public String getOperatorNodeID() {
+                return operatorNodeID;
+        }
 
-    /**
-     * Sets the value of the operatorNodeID property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
-     */
-    public void setOperatorNodeID(String value) {
-        this.operatorNodeID = value;
-    }
+        /**
+         * Sets the value of the operatorNodeID property.
+         *
+         * @param value allowed object is {@link String }
+         *
+         */
+        public void setOperatorNodeID(String value) {
+                this.operatorNodeID = value;
+        }
 
-    /**
-     * Gets the value of the operatorStatus property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link OperatorStatusType }
-     *     
-     */
-    public OperatorStatusType getOperatorStatus() {
-        return operatorStatus;
-    }
+        /**
+         * Gets the value of the operatorStatus property.
+         *
+         * @return possible object is {@link OperatorStatusType }
+         *
+         */
+        public OperatorStatusType getOperatorStatus() {
+                return operatorStatus;
+        }
 
-    /**
-     * Sets the value of the operatorStatus property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link OperatorStatusType }
-     *     
-     */
-    public void setOperatorStatus(OperatorStatusType value) {
-        this.operatorStatus = value;
-    }
+        /**
+         * Sets the value of the operatorStatus property.
+         *
+         * @param value allowed object is {@link OperatorStatusType }
+         *
+         */
+        public void setOperatorStatus(OperatorStatusType value) {
+                this.operatorStatus = value;
+        }
 
-    /**
-     * Gets the value of the contact property.
-     * 
-     * <p>
-     * This accessor method returns a reference to the live list,
-     * not a snapshot. Therefore any modification you make to the
-     * returned list will be present inside the JAXB object.
-     * This is why there is not a <CODE>set</CODE> method for the contact property.
-     * 
-     * <p>
-     * For example, to add a new item, do as follows:
-     * <pre>
-     *    getContact().add(newItem);
-     * </pre>
-     * 
-     * 
-     * <p>
-     * Objects of the following type(s) are allowed in the list
+        /**
+         * Gets the value of the contact property.
+         *
+         * <p>
+         * This accessor method returns a reference to the live list, not a
+         * snapshot. Therefore any modification you make to the returned list
+         * will be present inside the JAXB object. This is why there is not a
+         * <CODE>set</CODE> method for the contact property.
+         *
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getContact().add(newItem);
+         * </pre>
+         *
+         *
+         * <p>
+         * Objects of the following type(s) are allowed in the list
      * {@link Contact }
-     * 
-     * 
-     */
-    public List<Contact> getContact() {
-        if (contact == null) {
-            contact = new ArrayList<Contact>();
+         *
+         *
+         */
+        public List<Contact> getContact() {
+                if (contact == null) {
+                        contact = new ArrayList<Contact>();
+                }
+                return this.contact;
         }
-        return this.contact;
-    }
 
-    /**
-     * Gets the value of the soapReplicationURL property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
-     */
-    public String getSoapReplicationURL() {
-        return soapReplicationURL;
-    }
+        /**
+         * Gets the value of the soapReplicationURL property.
+         *
+         * @return possible object is {@link String }
+         *
+         */
+        public String getSoapReplicationURL() {
+                return soapReplicationURL;
+        }
 
-    /**
-     * Sets the value of the soapReplicationURL property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
-     */
-    public void setSoapReplicationURL(String value) {
-        this.soapReplicationURL = value;
-    }
+        /**
+         * Sets the value of the soapReplicationURL property.
+         *
+         * @param value allowed object is {@link String }
+         *
+         */
+        public void setSoapReplicationURL(String value) {
+                this.soapReplicationURL = value;
+        }
 
-    /**
-     * Gets the value of the keyInfo property.
-     * 
-     * <p>
-     * This accessor method returns a reference to the live list,
-     * not a snapshot. Therefore any modification you make to the
-     * returned list will be present inside the JAXB object.
-     * This is why there is not a <CODE>set</CODE> method for the keyInfo property.
-     * 
-     * <p>
-     * For example, to add a new item, do as follows:
-     * <pre>
-     *    getKeyInfo().add(newItem);
-     * </pre>
-     * 
-     * 
-     * <p>
-     * Objects of the following type(s) are allowed in the list
+        /**
+         * Gets the value of the keyInfo property.
+         *
+         * <p>
+         * This accessor method returns a reference to the live list, not a
+         * snapshot. Therefore any modification you make to the returned list
+         * will be present inside the JAXB object. This is why there is not a
+         * <CODE>set</CODE> method for the keyInfo property.
+         *
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getKeyInfo().add(newItem);
+         * </pre>
+         *
+         *
+         * <p>
+         * Objects of the following type(s) are allowed in the list
      * {@link KeyInfoType }
-     * 
-     * 
-     */
-    public List<KeyInfoType> getKeyInfo() {
-        if (keyInfo == null) {
-            keyInfo = new ArrayList<KeyInfoType>();
+         *
+         *
+         */
+        public List<KeyInfoType> getKeyInfo() {
+                if (keyInfo == null) {
+                        keyInfo = new ArrayList<KeyInfoType>();
+                }
+                return this.keyInfo;
         }
-        return this.keyInfo;
-    }
 
-}
-
\ No newline at end of file
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/juddi/blob/22a846dd/uddi-ws/src/main/java/org/uddi/repl_v3/ReplicationConfiguration.java
----------------------------------------------------------------------
diff --git a/uddi-ws/src/main/java/org/uddi/repl_v3/ReplicationConfiguration.java b/uddi-ws/src/main/java/org/uddi/repl_v3/ReplicationConfiguration.java
index a96a06e..5ff9279 100644
--- a/uddi-ws/src/main/java/org/uddi/repl_v3/ReplicationConfiguration.java
+++ b/uddi-ws/src/main/java/org/uddi/repl_v3/ReplicationConfiguration.java
@@ -15,7 +15,6 @@
  *
  */
 
-
 package org.uddi.repl_v3;
 
 import java.io.Serializable;
@@ -26,6 +25,7 @@ import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlSeeAlso;
 import javax.xml.bind.annotation.XmlTransient;
 import javax.xml.bind.annotation.XmlType;
 import org.uddi.api_v3.Contact;
@@ -79,11 +79,21 @@ import org.w3._2000._09.xmldsig_.SignatureType;
     "maximumTimeToGetChanges",
     "signature"
 })
+@XmlSeeAlso({
+        org.uddi.api_v3.ObjectFactory.class,
+        org.uddi.custody_v3.ObjectFactory.class,
+        org.apache.juddi.ObjectFactory.class,
+        org.apache.juddi.api_v3.ObjectFactory.class,
+        org.uddi.repl_v3.ObjectFactory.class,
+        org.w3._2000._09.xmldsig_.ObjectFactory.class
+        
+        }
+)
 @XmlRootElement(name = "replicationConfiguration")
 public class ReplicationConfiguration implements Serializable{
 	@XmlTransient
 	private static final long serialVersionUID = 621260248291581845L;
-	protected long serialNumber;
+    protected long serialNumber;
     @XmlElement(required = true)
     protected String timeOfConfigurationUpdate;
     @XmlElement(required = true)
@@ -317,7 +327,7 @@ public class ReplicationConfiguration implements Serializable{
      * 
      */
     @XmlAccessorType(XmlAccessType.FIELD)
-    @XmlType(name = "", propOrder = {
+    @XmlType(name = "", namespace="urn:uddi-org:repl_v3", propOrder = {
         "contact"
     })
     public static class RegistryContact {
@@ -352,4 +362,3 @@ public class ReplicationConfiguration implements Serializable{
     }
 
 }
-
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/juddi/blob/22a846dd/uddi-ws/src/main/java/org/uddi/v3_service/UDDIReplicationPortType.java
----------------------------------------------------------------------
diff --git a/uddi-ws/src/main/java/org/uddi/v3_service/UDDIReplicationPortType.java b/uddi-ws/src/main/java/org/uddi/v3_service/UDDIReplicationPortType.java
index 33f5416..2dda681 100644
--- a/uddi-ws/src/main/java/org/uddi/v3_service/UDDIReplicationPortType.java
+++ b/uddi-ws/src/main/java/org/uddi/v3_service/UDDIReplicationPortType.java
@@ -66,7 +66,7 @@ import org.uddi.repl_v3.TransferCustody;
  * Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  * </span></span>get_highWaterMarks</p>
  */
-@WebService(name = "UDDI_Replication_PortType", targetNamespace = "urn:uddi-org:v3_service")
+@WebService(name = "UDDI_Replication_PortType", targetNamespace = "urn:uddi-org:repl_v3_portType")
 @XmlSeeAlso({
     org.uddi.custody_v3.ObjectFactory.class,
     org.uddi.repl_v3.ObjectFactory.class,
@@ -155,16 +155,20 @@ public interface UDDIReplicationPortType extends Remote {
      * code. Error reporting SHALL be that specified by Section 4.8 – Success
      * and Error Reporting of this specification.
      */
-    @WebMethod(operationName = "get_changeRecords", action = "get_changeRecords")
+ @WebMethod(operationName = "get_changeRecords", action = "get_changeRecords")
     @WebResult(name = "changeRecord", targetNamespace = "urn:uddi-org:repl_v3")
     @RequestWrapper(localName = "get_changeRecords", targetNamespace = "urn:uddi-org:repl_v3", className = "org.uddi.repl_v3.GetChangeRecords")
     @ResponseWrapper(localName = "changeRecords", targetNamespace = "urn:uddi-org:repl_v3", className = "org.uddi.repl_v3.ChangeRecords")
     public List<ChangeRecord> getChangeRecords(
-            @WebParam(name = "requestingNode", targetNamespace = "urn:uddi-org:repl_v3") String requestingNode,
-            @WebParam(name = "changesAlreadySeen", targetNamespace = "urn:uddi-org:repl_v3") HighWaterMarkVectorType changesAlreadySeen,
-            @WebParam(name = "responseLimitCount", targetNamespace = "urn:uddi-org:repl_v3") BigInteger responseLimitCount,
-            @WebParam(name = "responseLimitVector", targetNamespace = "urn:uddi-org:repl_v3") HighWaterMarkVectorType responseLimitVector)
-            throws DispositionReportFaultMessage, RemoteException;
+        @WebParam(name = "requestingNode", targetNamespace = "urn:uddi-org:repl_v3")
+        String requestingNode,
+        @WebParam(name = "changesAlreadySeen", targetNamespace = "urn:uddi-org:repl_v3")
+        HighWaterMarkVectorType changesAlreadySeen,
+        @WebParam(name = "responseLimitCount", targetNamespace = "urn:uddi-org:repl_v3")
+        BigInteger responseLimitCount,
+        @WebParam(name = "responseLimitVector", targetNamespace = "urn:uddi-org:repl_v3")
+        HighWaterMarkVectorType responseLimitVector)
+        throws DispositionReportFaultMessage, RemoteException;
 
     /**
      * <p class="MsoBodyText">Nodes can inform other nodes that they have new
@@ -221,8 +225,9 @@ public interface UDDIReplicationPortType extends Remote {
     @WebMethod(operationName = "notify_changeRecordsAvailable", action = "notify_changeRecordsAvailable")
     @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
     public void notifyChangeRecordsAvailable(
-            @WebParam(name = "notify_changeRecordsAvailable", targetNamespace = "urn:uddi-org:repl_v3", partName = "body") NotifyChangeRecordsAvailable body)
-            throws DispositionReportFaultMessage, RemoteException;
+        @WebParam(name = "notify_changeRecordsAvailable", targetNamespace = "urn:uddi-org:repl_v3", partName = "body")
+        NotifyChangeRecordsAvailable body)
+        throws DispositionReportFaultMessage,RemoteException;
 
     /**
      * This UDDI API message provides the means by which the current existence
@@ -241,8 +246,9 @@ public interface UDDIReplicationPortType extends Remote {
     @WebResult(name = "operatorNodeID", targetNamespace = "urn:uddi-org:repl_v3", partName = "body")
     @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
     public String doPing(
-            @WebParam(name = "do_ping", targetNamespace = "urn:uddi-org:repl_v3", partName = "body") DoPing body)
-            throws DispositionReportFaultMessage, RemoteException;
+        @WebParam(name = "do_ping", targetNamespace = "urn:uddi-org:repl_v3", partName = "body")
+        DoPing body)
+        throws DispositionReportFaultMessage, RemoteException;
 
     /**
      * This UDDI API message provides a means to obtain a list of highWaterMark
@@ -283,7 +289,7 @@ public interface UDDIReplicationPortType extends Remote {
     @RequestWrapper(localName = "get_highWaterMarks", targetNamespace = "urn:uddi-org:repl_v3", className = "org.uddi.repl_v3.GetHighWaterMarks")
     @ResponseWrapper(localName = "highWaterMarks", targetNamespace = "urn:uddi-org:repl_v3", className = "org.uddi.repl_v3.HighWaterMarkVectorType")
     public List<ChangeRecordIDType> getHighWaterMarks()
-            throws DispositionReportFaultMessage, RemoteException;
+        throws DispositionReportFaultMessage, RemoteException;
 
     /**
      * Invoked by the target node in a custody transfer operation in response to
@@ -414,7 +420,7 @@ public interface UDDIReplicationPortType extends Remote {
     @WebMethod(operationName = "transfer_custody", action = "transfer_custody")
     @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
     public void transferCustody(
-            @WebParam(name = "transfer_custody", targetNamespace = "urn:uddi-org:repl_v3", partName = "body") TransferCustody body)
-            throws DispositionReportFaultMessage, RemoteException;
-}
-
\ No newline at end of file
+        @WebParam(name = "transfer_custody", targetNamespace = "urn:uddi-org:repl_v3", partName = "body")
+        TransferCustody body)
+        throws DispositionReportFaultMessage, RemoteException;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/juddi/blob/22a846dd/uddi-ws/src/test/java/org/apache/juddi/api_v3/GetPublisherDetailTest.java
----------------------------------------------------------------------
diff --git a/uddi-ws/src/test/java/org/apache/juddi/api_v3/GetPublisherDetailTest.java b/uddi-ws/src/test/java/org/apache/juddi/api_v3/GetPublisherDetailTest.java
index a855c82..924aa6f 100644
--- a/uddi-ws/src/test/java/org/apache/juddi/api_v3/GetPublisherDetailTest.java
+++ b/uddi-ws/src/test/java/org/apache/juddi/api_v3/GetPublisherDetailTest.java
@@ -16,8 +16,11 @@ package org.apache.juddi.api_v3;
 
 import java.io.StringReader;
 import java.io.StringWriter;
+import java.text.SimpleDateFormat;
 import java.util.ArrayList;
+import java.util.Date;
 import java.util.List;
+import javax.xml.bind.JAXB;
 
 import javax.xml.bind.JAXBContext;
 import javax.xml.bind.JAXBElement;
@@ -33,7 +36,13 @@ import static junit.framework.Assert.assertTrue;
 
 import org.junit.Test;
 import org.uddi.api_v3.AuthToken;
+import org.uddi.api_v3.Contact;
 import org.uddi.api_v3.ObjectFactory;
+import org.uddi.api_v3.PersonName;
+import org.uddi.repl_v3.CommunicationGraph;
+import org.uddi.repl_v3.Operator;
+import org.uddi.repl_v3.OperatorStatusType;
+import org.uddi.repl_v3.ReplicationConfiguration;
 
 /**
  * Testing marshalling functionality, making sure UTF-8 is handled correctly.
@@ -85,5 +94,29 @@ public class GetPublisherDetailTest {
 			fail("No exception should be thrown");
 		}
 	}
+        
+        @Test
+        public void marshallReplicationMessage() throws Exception{
+                ReplicationConfiguration r = new ReplicationConfiguration();
+                r.setCommunicationGraph(new CommunicationGraph());
+                        Operator op = new Operator();
+                        op.setOperatorNodeID("a node");
+                        op.setSoapReplicationURL("http://localhost/services/replication");
+                        
+                        op.getContact().add(new Contact());
+                        op.getContact().get(0).getPersonName().add(new PersonName("Unknown", null));
+                        op.setOperatorStatus(OperatorStatusType.NORMAL);
+                        
+                        r.getOperator().add(op);
+                        r.getCommunicationGraph().getNode().add("a node");
+                        r.getCommunicationGraph().getControlledMessage().add("*");
+                        r.setSerialNumber(0);
+                        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddkkmmZ");
+                        r.setTimeOfConfigurationUpdate(sdf.format(new Date()));
+                        r.setRegistryContact(new org.uddi.repl_v3.ReplicationConfiguration.RegistryContact());
+                        r.getRegistryContact().setContact(new Contact());
+                        r.getRegistryContact().getContact().getPersonName().add(new PersonName("Unknown", null));
+                                JAXB.marshal(r, System.out);
+        }
 	
 }


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