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/01/06 03:18:39 UTC

svn commit: r1555648 [1/13] - in /juddi/trunk: ./ docs/examples/auth/ juddi-client/src/main/java/org/apache/juddi/v3/client/config/ juddi-core-openjpa/ juddi-core/src/main/java/org/apache/juddi/api/impl/ juddi-core/src/main/java/org/apache/juddi/subscr...

Author: alexoree
Date: Mon Jan  6 02:18:37 2014
New Revision: 1555648

URL: http://svn.apache.org/r1555648
Log:
JUDDI-583 merging 3.3 branch TCK-Runner and the associated changes to make it functional
JUDDI-633 example added, see CompareByTModelInstanceInfoQOS

Added:
    juddi/trunk/juddi-examples/more-uddi-samples/src/main/java/org/apache/juddi/samples/CompareByTModelInstanceInfoQOS.java
      - copied, changed from r1555612, juddi/trunk/juddi-examples/more-uddi-samples/src/main/java/org/apache/juddi/samples/SearchByQos.java
    juddi/trunk/juddi-tck-runner/   (with props)
    juddi/trunk/juddi-tck-runner/juddiv3.xml
    juddi/trunk/juddi-tck-runner/pom.xml
    juddi/trunk/juddi-tck-runner/readme.txt
    juddi/trunk/juddi-tck-runner/src/
    juddi/trunk/juddi-tck-runner/src/main/
    juddi/trunk/juddi-tck-runner/src/main/java/
    juddi/trunk/juddi-tck-runner/src/main/java/org/
    juddi/trunk/juddi-tck-runner/src/main/java/org/apache/
    juddi/trunk/juddi-tck-runner/src/main/java/org/apache/juddi/
    juddi/trunk/juddi-tck-runner/src/main/java/org/apache/juddi/tckrunner/
    juddi/trunk/juddi-tck-runner/src/main/java/org/apache/juddi/tckrunner/App.java
    juddi/trunk/juddi-tck-runner/src/test/
    juddi/trunk/juddi-tck-runner/src/test/java/
    juddi/trunk/juddi-tck-runner/src/test/java/org/
    juddi/trunk/juddi-tck-runner/src/test/java/org/apache/
    juddi/trunk/juddi-tck-runner/src/test/java/org/apache/juddi/
    juddi/trunk/juddi-tck-runner/src/test/java/org/apache/juddi/tckrunner/
    juddi/trunk/juddi-tck-runner/src/test/java/org/apache/juddi/tckrunner/AppTest.java
    juddi/trunk/juddi-tck-runner/tck.properties
    juddi/trunk/juddi-tck-runner/uddi.xml
    juddi/trunk/uddi-tck-base/src/main/java/org/apache/juddi/v3/tck/TckCommon.java
    juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/subscriptionnotifier/listenerServiceSMTP-external.xml
    juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/JUDDI_100_ClientSubscriptionInfoIntegrationTest.java
    juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_030_BusinessEntityLoadIntegrationTest.java
    juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_040_BusinessServiceLoadIntegrationTest.java
    juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_090_SubscriptionListenerExternalTest.java
    juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_160_RESTIntergrationTest.java
    juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_170_ValueSetValidation.java
Removed:
    juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/JUDDI_100_ClientSubscriptionInfoTest.java
    juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_001_UDDIServiceTest.java
    juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_030_BusinessEntityLoadTest.java
    juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_040_BusinessServiceLoadTest.java
Modified:
    juddi/trunk/docs/examples/auth/pom.xml
    juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/ClientConfig.java
    juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/UDDIClient.java
    juddi/trunk/juddi-core-openjpa/pom.xml
    juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/AuthenticatedService.java
    juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/JUDDIApiImpl.java
    juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDISecurityImpl.java
    juddi/trunk/juddi-core/src/main/java/org/apache/juddi/subscription/notify/SMTPNotifier.java
    juddi/trunk/juddi-core/src/main/java/org/apache/juddi/validation/ValidateNode.java
    juddi/trunk/juddi-core/src/main/java/org/apache/juddi/validation/ValidatePublish.java
    juddi/trunk/juddi-core/src/main/resources/messages.properties
    juddi/trunk/juddi-core/src/test/java/org/apache/juddi/api/impl/API_010_PublisherTest.java
    juddi/trunk/juddi-core/src/test/java/org/apache/juddi/api/impl/API_020_TmodelTest.java
    juddi/trunk/juddi-core/src/test/java/org/apache/juddi/api/impl/API_030_BusinessEntityTest.java
    juddi/trunk/juddi-core/src/test/java/org/apache/juddi/api/impl/API_040_BusinessServiceTest.java
    juddi/trunk/juddi-core/src/test/java/org/apache/juddi/api/impl/API_040_BusinessServiceTestPerformance.java
    juddi/trunk/juddi-core/src/test/java/org/apache/juddi/api/impl/API_051_BindingTemplateWSDLTest.java
    juddi/trunk/juddi-core/src/test/java/org/apache/juddi/api/impl/API_070_FindEntityTest.java
    juddi/trunk/juddi-core/src/test/java/org/apache/juddi/api/impl/API_080_SubscriptionTest.java
    juddi/trunk/juddi-core/src/test/java/org/apache/juddi/api/impl/API_090_SubscriptionListenerIntegrationTest.java
    juddi/trunk/juddi-core/src/test/java/org/apache/juddi/api/impl/API_091_RMISubscriptionListenerIntegrationTest.java
    juddi/trunk/juddi-core/src/test/java/org/apache/juddi/api/impl/API_100_ClientSubscriptionInfoTest.java
    juddi/trunk/juddi-core/src/test/java/org/apache/juddi/keygen/KeyGeneratorTest.java
    juddi/trunk/juddi-examples/more-uddi-samples/pom.xml
    juddi/trunk/juddi-examples/service-version/pom.xml
    juddi/trunk/juddi-migration-tool/pom.xml
    juddi/trunk/juddi-rest-cxf/src/main/java/org/apache/juddi/api/impl/rest/UDDIInquiryJAXRS.java
    juddi/trunk/juddiv3-war/JAX-WS/CXF/WEB-INF/beans.xml
    juddi/trunk/juddiv3-war/src/main/webapp/WEB-INF/classes/juddiv3.xml
    juddi/trunk/pom.xml
    juddi/trunk/uddi-tck-base/pom.xml
    juddi/trunk/uddi-tck-base/src/main/java/org/apache/juddi/v3/tck/TckBusiness.java
    juddi/trunk/uddi-tck-base/src/main/java/org/apache/juddi/v3/tck/TckBusinessService.java
    juddi/trunk/uddi-tck-base/src/main/java/org/apache/juddi/v3/tck/TckPublisher.java
    juddi/trunk/uddi-tck-base/src/main/java/org/apache/juddi/v3/tck/TckSecurity.java
    juddi/trunk/uddi-tck-base/src/main/java/org/apache/juddi/v3/tck/TckSubscription.java
    juddi/trunk/uddi-tck-base/src/main/java/org/apache/juddi/v3/tck/TckSubscriptionListener.java
    juddi/trunk/uddi-tck-base/src/main/java/org/apache/juddi/v3/tck/TckSubscriptionListenerRMI.java
    juddi/trunk/uddi-tck-base/src/main/java/org/apache/juddi/v3/tck/TckTModel.java
    juddi/trunk/uddi-tck-base/src/main/java/org/apache/juddi/v3/tck/UDDISubscriptionListenerImpl.java
    juddi/trunk/uddi-tck-base/src/main/resources/tck.properties
    juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/joepublisher/publisher.xml
    juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/subscriptionnotifier/listenerService.xml
    juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/subscriptionnotifier/subscription1.xml
    juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/subscriptionnotifier/subscription1RMI.xml
    juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/subscriptionnotifier/subscription1SMTP.xml
    juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/subscriptionnotifier/subscription2.xml
    juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/subscriptionnotifier/subscription2SMTP.xml
    juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/subscriptionnotifier/subscription3.xml
    juddi/trunk/uddi-tck-base/src/main/resources/uddi_data/subscriptionnotifier/subscription3SMTP.xml
    juddi/trunk/uddi-tck/pom.xml
    juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/bpel/BPEL_010_IntegrationTest.java
    juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/bpel/BPEL_020_IntegrationTest.java
    juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/JUDDI_010_PublisherIntegrationTest.java
    juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/JUDDI_091_RMISubscriptionListenerIntegrationTest.java
    juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_010_PublisherIntegrationTest.java
    juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_020_TmodelIntegrationTest.java
    juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_030_BusinessEntityIntegrationTest.java
    juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_040_BusinessServiceIntegrationTest.java
    juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_050_BindingTemplateIntegrationTest.java
    juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_060_PublisherAssertionIntegrationTest.java
    juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_070_FindEntityIntegrationTest.java
    juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_080_SubscriptionIntegrationTest.java
    juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_090_SubscriptionListenerIntegrationTest.java
    juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_110_FindBusinessIntegrationTest.java
    juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_120_CombineCategoryBagsFindServiceIntegrationTest.java
    juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_130_CombineCategoryBagsFindBusinessIntegrationTest.java
    juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_140_NegativePublicationIntegrationTest.java
    juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_141_JIRAIntegrationTest.java
    juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_150_CustodyTransferIntegrationTest.java

Modified: juddi/trunk/docs/examples/auth/pom.xml
URL: http://svn.apache.org/viewvc/juddi/trunk/docs/examples/auth/pom.xml?rev=1555648&r1=1555647&r2=1555648&view=diff
==============================================================================
--- juddi/trunk/docs/examples/auth/pom.xml (original)
+++ juddi/trunk/docs/examples/auth/pom.xml Mon Jan  6 02:18:37 2014
@@ -53,7 +53,7 @@
 		<dependency>
 			<groupId>junit</groupId>
 			<artifactId>junit</artifactId>
-			<version>4.5</version>
+			<version>4.11</version>
 			<scope>test</scope>
 		</dependency>
 	</dependencies>

Modified: juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/ClientConfig.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/ClientConfig.java?rev=1555648&r1=1555647&r2=1555648&view=diff
==============================================================================
--- juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/ClientConfig.java (original)
+++ juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/ClientConfig.java Mon Jan  6 02:18:37 2014
@@ -110,6 +110,10 @@ public class ClientConfig 
 		CompositeConfiguration compositeConfig = new CompositeConfiguration();
 		compositeConfig.addConfiguration(new SystemConfiguration());
 		//Properties from XML file
+                if (System.getProperty(UDDI_CONFIG_FILENAME_PROPERTY)!=null){
+                        log.info("Using system property config override");
+                        configurationFile = System.getProperty(UDDI_CONFIG_FILENAME_PROPERTY);
+                }
 		XMLConfiguration xmlConfig = null;
 		if (configurationFile!=null) {
 			xmlConfig = new XMLConfiguration(configurationFile);

Modified: juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/UDDIClient.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/UDDIClient.java?rev=1555648&r1=1555647&r2=1555648&view=diff
==============================================================================
--- juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/UDDIClient.java (original)
+++ juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/config/UDDIClient.java Mon Jan  6 02:18:37 2014
@@ -342,9 +342,12 @@ public class UDDIClient {
     }
 
     /**
+     * Returns the transport defined for the node with the given name "default".
+     * deprecated, use the getTransport(String nodeName) instead. Returns the
+     * "default" jUDDI nodes Transport.
      * @deprecated, use the getTransport(String nodeName) instead. Returns the
      * "default" jUDDI nodes Transport.
-     *
+     * Note: this will always return a new instance of Transport
      * @return
      * @throws ConfigurationException
      */
@@ -354,7 +357,7 @@ public class UDDIClient {
 
     /**
      * Returns the transport defined for the node with the given nodeName.
-     *
+     * Note: this will always return a new instance of Transport
      * @param nodeName
      * @return
      * @throws ConfigurationException

Modified: juddi/trunk/juddi-core-openjpa/pom.xml
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-core-openjpa/pom.xml?rev=1555648&r1=1555647&r2=1555648&view=diff
==============================================================================
--- juddi/trunk/juddi-core-openjpa/pom.xml (original)
+++ juddi/trunk/juddi-core-openjpa/pom.xml Mon Jan  6 02:18:37 2014
@@ -163,7 +163,7 @@
 		<dependency>
 			<groupId>junit</groupId>
 			<artifactId>junit</artifactId>
-			<version>4.5</version>
+			<version>4.11</version>
 			<scope>test</scope>
 		</dependency>
 		<dependency>

Modified: juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/AuthenticatedService.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/AuthenticatedService.java?rev=1555648&r1=1555647&r2=1555648&view=diff
==============================================================================
--- juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/AuthenticatedService.java (original)
+++ juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/AuthenticatedService.java Mon Jan  6 02:18:37 2014
@@ -17,11 +17,7 @@
 
 package org.apache.juddi.api.impl;
 
-import java.net.InetAddress;
-import java.net.UnknownHostException;
 import java.util.Date;
-import java.util.logging.Level;
-import java.util.logging.Logger;
 import javax.annotation.Resource;
 
 import javax.persistence.EntityManager;

Modified: juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/JUDDIApiImpl.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/JUDDIApiImpl.java?rev=1555648&r1=1555647&r2=1555648&view=diff
==============================================================================
--- juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/JUDDIApiImpl.java (original)
+++ juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/JUDDIApiImpl.java Mon Jan  6 02:18:37 2014
@@ -73,22 +73,27 @@ import org.uddi.v3_service.DispositionRe
 import org.uddi.v3_service.UDDISubscriptionPortType;
 
 /**
+ * Implements the jUDDI API service
+
  * @author <a href="mailto:jfaath@apache.org">Jeff Faath</a>
  * @author <a href="mailto:kstam@apache.org">Kurt T Stam</a>
+* @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")
 public class JUDDIApiImpl extends AuthenticatedService implements JUDDIApiPortType {
 
-	private Log log = LogFactory.getLog(this.getClass());
+private Log log = LogFactory.getLog(this.getClass());
 	
 	/**
 	 * Saves publisher(s) to the persistence layer.  This method is specific to jUDDI.
-	 */
+    */
 	public PublisherDetail savePublisher(SavePublisher body)
 			throws DispositionReportFaultMessage {
-
+        
+		
+		
 		EntityManager em = PersistenceManager.getEntityManager();
 		EntityTransaction tx = em.getTransaction();
 		try {

Modified: juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDISecurityImpl.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDISecurityImpl.java?rev=1555648&r1=1555647&r2=1555648&view=diff
==============================================================================
--- juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDISecurityImpl.java (original)
+++ juddi/trunk/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDISecurityImpl.java Mon Jan  6 02:18:37 2014
@@ -23,9 +23,7 @@ import java.util.UUID;
 import javax.jws.WebService;
 import javax.persistence.EntityManager;
 import javax.persistence.EntityTransaction;
-import javax.servlet.http.HttpServletRequest;
 import javax.xml.ws.WebServiceContext;
-import javax.xml.ws.handler.MessageContext;
 
 import org.uddi.api_v3.AuthToken;
 import org.uddi.api_v3.DiscardAuthToken;
@@ -33,9 +31,7 @@ import org.uddi.api_v3.GetAuthToken;
 import org.uddi.v3_service.DispositionReportFaultMessage;
 import org.uddi.v3_service.UDDISecurityPortType;
 
-import org.apache.juddi.api.util.PublicationQuery;
 import org.apache.juddi.api.util.QueryStatus;
-import org.apache.juddi.api.util.ReplicationQuery;
 import org.apache.juddi.api.util.SecurityQuery;
 import org.apache.juddi.config.PersistenceManager;
 import org.apache.juddi.mapping.MappingModelToApi;

Modified: juddi/trunk/juddi-core/src/main/java/org/apache/juddi/subscription/notify/SMTPNotifier.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/main/java/org/apache/juddi/subscription/notify/SMTPNotifier.java?rev=1555648&r1=1555647&r2=1555648&view=diff
==============================================================================
--- juddi/trunk/juddi-core/src/main/java/org/apache/juddi/subscription/notify/SMTPNotifier.java (original)
+++ juddi/trunk/juddi-core/src/main/java/org/apache/juddi/subscription/notify/SMTPNotifier.java Mon Jan  6 02:18:37 2014
@@ -98,6 +98,7 @@ public class SMTPNotifier implements Not
 					}
 				}
 				final String password = pwd;
+                                log.info("SMTP username = " + username + " from address = " + notificationEmailAddress);
 				session = Session.getInstance(getEMailProperties(), new javax.mail.Authenticator() {
 					protected PasswordAuthentication getPasswordAuthentication() {
 						return new PasswordAuthentication(username, password);
@@ -111,9 +112,10 @@ public class SMTPNotifier implements Not
 
 	public DispositionReport notifySubscriptionListener(NotifySubscriptionListener body) throws DispositionReportFaultMessage, RemoteException {
 
-		log.info("Sending notification email to " + notificationEmailAddress);
+		
 
 		try {
+                        log.info("Sending notification email to " + notificationEmailAddress + " from " + getEMailProperties().getProperty("mail.smtp.from", "jUDDI"));
 			if (session !=null && notificationEmailAddress != null) {
 				MimeMessage message = new MimeMessage(session);
 				InternetAddress address = new InternetAddress(notificationEmailAddress);

Modified: juddi/trunk/juddi-core/src/main/java/org/apache/juddi/validation/ValidateNode.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/main/java/org/apache/juddi/validation/ValidateNode.java?rev=1555648&r1=1555647&r2=1555648&view=diff
==============================================================================
--- juddi/trunk/juddi-core/src/main/java/org/apache/juddi/validation/ValidateNode.java (original)
+++ juddi/trunk/juddi-core/src/main/java/org/apache/juddi/validation/ValidateNode.java Mon Jan  6 02:18:37 2014
@@ -31,96 +31,98 @@ import org.uddi.v3_service.DispositionRe
 
 /**
  * @author <a href="mailto:kstam@apache.org">Kurt T Stam</a>
+ * @author <a href="mailto:alexoree@apache.org">Alex O'Ree</a>
  */
 public class ValidateNode extends ValidateUDDIApi {
 
-    public ValidateNode(UddiEntityPublisher publisher) {
-        super(publisher);
-    }
-
-    private static final Logger logger = Logger.getLogger(ValidateNode.class.getCanonicalName());
-    /*-------------------------------------------------------------------
-     validateSaveNode functions are specific to jUDDI.
-     --------------------------------------------------------------------*/
-    public void validateSaveNode(EntityManager em, org.apache.juddi.api_v3.SaveNode body) throws DispositionReportFaultMessage {
-
-        if (body == null) {
-            throw new FatalErrorException(new ErrorMessage("errors.NullInput"));
+        public ValidateNode(UddiEntityPublisher publisher) {
+                super(publisher);
         }
+        private static final Logger logger = Logger.getLogger(ValidateNode.class.getCanonicalName());
+        /*-------------------------------------------------------------------
+         validateSaveNode functions are specific to jUDDI.
+         --------------------------------------------------------------------*/
 
-        // No null or empty list
-        List<Node> nodes = body.getNode();
-        if (nodes == null) {
-            throw new ValueNotAllowedException(new ErrorMessage("errors.saveNodes.NoInput"));
-        }
+        public void validateSaveNode(EntityManager em, org.apache.juddi.api_v3.SaveNode body) throws DispositionReportFaultMessage {
 
-        for (Node clerk : body.getNode()) {
-            validateNode(clerk);
-        }
+                if (body == null) {
+                        throw new FatalErrorException(new ErrorMessage("errors.NullInput"));
+                }
 
-    }
+                // No null or empty list
+                List<Node> nodes = body.getNode();
+                if (nodes == null) {
+                        throw new ValueNotAllowedException(new ErrorMessage("errors.saveNodes.NoInput"));
+                }
 
-    public void validateNode(org.apache.juddi.api_v3.Node node) throws DispositionReportFaultMessage {
+                for (Node clerk : body.getNode()) {
+                        validateNode(clerk);
+                }
 
-        // No null input
-        if (node == null) {
-            throw new ValueNotAllowedException(new ErrorMessage("errors.node.NullInput"));
         }
 
-        String name = node.getName();
-        if (name == null || name.length() == 0 || node.getClientName().length() > 255) {
-            throw new ValueNotAllowedException(new ErrorMessage("errors.node.NoName"));
-        }
-        if (node.getDescription() == null || node.getDescription().length() == 0 || node.getDescription().length() > 255) {
-            throw new ValueNotAllowedException(new ErrorMessage("errors.node.NoDescription"));
-        }
-        if (node.getClientName() == null || node.getClientName().length() == 0 || node.getClientName().length() > 255) {
-            throw new ValueNotAllowedException(new ErrorMessage("errors.node.NoClientName"));
-        }
-        if (node.getCustodyTransferUrl() == null || node.getCustodyTransferUrl().length() == 0 || node.getClientName().length() > 255) {
-            throw new ValueNotAllowedException(new ErrorMessage("errors.node.NoNCT"));
-        }
-        if (node.getInquiryUrl() == null || node.getInquiryUrl().length() == 0 || node.getInquiryUrl().length() > 255) {
-            throw new ValueNotAllowedException(new ErrorMessage("errors.node.NoIN"));
-        }
-        if (node.getPublishUrl() == null || node.getPublishUrl().length() == 0 || node.getPublishUrl().length() > 255) {
-            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"));
-        }
-        if (node.getReplicationUrl()== null || node.getReplicationUrl().length() == 0 || node.getReplicationUrl().length() > 255) {
-            //throw new ValueNotAllowedException(new ErrorMessage("errors.node.NoSUBL"));
-            logger.log(Level.WARNING,"No replication url on save node request!");
-        }
-        if (node.getSubscriptionUrl() == null || node.getSubscriptionUrl().length() == 0 || node.getSubscriptionUrl().length() > 255) {
-            throw new ValueNotAllowedException(new ErrorMessage("errors.node.NoSUB"));
-        }
-        if (node.getProxyTransport() == null || node.getProxyTransport().length() == 0 || node.getProxyTransport().length() > 255) {
-            throw new ValueNotAllowedException(new ErrorMessage("errors.node.NoProxy"));
-        } else {
-            try {
-                //validate that the class exists and that it is of type
-                //org.apache.juddi.v3.client.transport.Transport
-                Class<?> forName = Class.forName(node.getProxyTransport());
-                Object j = forName.newInstance();
-                if (!(j instanceof org.apache.juddi.v3.client.transport.Transport)) {
-                    throw new ValueNotAllowedException(new ErrorMessage("errors.node.illegalProxyTransport"));
-                }
-            } catch (Exception ex) {
-                throw new ValueNotAllowedException(new ErrorMessage("errors.node.illegalProxyTransport"));
-            }
-        }
-        if (node.getFactoryInitial() == null || node.getFactoryInitial().length() == 0 || node.getFactoryInitial().length() > 255) {
-            //    throw new ValueNotAllowedException(new ErrorMessage("errors.node.NoName"));
-        }
-        if (node.getFactoryNamingProvider() == null || node.getFactoryNamingProvider().length() == 0 || node.getFactoryNamingProvider().length() > 255) {
-            //    throw new ValueNotAllowedException(new ErrorMessage("errors.node.NoName"));
-        }
-        if (node.getFactoryURLPkgs() == null || node.getFactoryURLPkgs().length() == 0 || node.getFactoryURLPkgs().length() > 255) {
-            //    throw new ValueNotAllowedException(new ErrorMessage("errors.node.NoName"));
-        }
+        public void validateNode(org.apache.juddi.api_v3.Node node) throws DispositionReportFaultMessage {
+
+                // No null input
+                if (node == null) {
+                        throw new ValueNotAllowedException(new ErrorMessage("errors.node.NullInput"));
+                }
 
+                String name = node.getName();
+                if (name == null || name.length() == 0 || name.length()>255 || node.getClientName()==null|| node.getClientName().length() > 255) {
+                        throw new ValueNotAllowedException(new ErrorMessage("errors.node.NoName"));
+                }
+                if (node.getDescription() == null || node.getDescription().length() == 0 || node.getDescription().length() > 255) {
+                        throw new ValueNotAllowedException(new ErrorMessage("errors.node.NoDescription"));
+                }
+                if (node.getClientName() == null || node.getClientName().length() == 0 || node.getClientName().length() > 255) {
+                        throw new ValueNotAllowedException(new ErrorMessage("errors.node.NoClientName"));
+                }
+                if (node.getCustodyTransferUrl() == null || node.getCustodyTransferUrl().length() == 0 || node.getClientName().length() > 255) {
+                        throw new ValueNotAllowedException(new ErrorMessage("errors.node.NoNCT"));
+                }
+                if (node.getInquiryUrl() == null || node.getInquiryUrl().length() == 0 || node.getInquiryUrl().length() > 255) {
+                        throw new ValueNotAllowedException(new ErrorMessage("errors.node.NoIN"));
+                }
+                if (node.getPublishUrl() == null || node.getPublishUrl().length() == 0 || node.getPublishUrl().length() > 255) {
+                        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"));
+                }
+                if (node.getReplicationUrl() == null || node.getReplicationUrl().length() == 0 || node.getReplicationUrl().length() > 255) {
+                        //throw new ValueNotAllowedException(new ErrorMessage("errors.node.NoSUBL"));
+                        //logger.log(Level.WARNING, "No replication url on save node request!");
+                }
+                if (node.getSubscriptionUrl() == null || node.getSubscriptionUrl().length() == 0 || node.getSubscriptionUrl().length() > 255) {
+                        throw new ValueNotAllowedException(new ErrorMessage("errors.node.NoSUB"));
+                }
+                if (node.getProxyTransport() == null || node.getProxyTransport().length() == 0 || node.getProxyTransport().length() > 255) {
+                        throw new ValueNotAllowedException(new ErrorMessage("errors.node.NoProxy"));
+                } else {
+                        try {
+                                //validate that the class exists and that it is of type
+                                //org.apache.juddi.v3.client.transport.Transport
+                                Class<?> forName = Class.forName(node.getProxyTransport());
+                                Object j = forName.newInstance();
+                                if (!(j instanceof org.apache.juddi.v3.client.transport.Transport)) {
+                                        throw new ValueNotAllowedException(new ErrorMessage("errors.node.illegalProxyTransport"));
+                                }
+                        } catch (Exception ex) {
+                                throw new ValueNotAllowedException(new ErrorMessage("errors.node.illegalProxyTransport"));
+                        }
+                }
+                if (node.getProxyTransport().equalsIgnoreCase(org.apache.juddi.v3.client.transport.RMITransport.class.getCanonicalName())) {
+                        if (node.getFactoryInitial() == null || node.getFactoryInitial().length() == 0 || node.getFactoryInitial().length() > 255) {
+                                throw new ValueNotAllowedException(new ErrorMessage("errors.node.NoRMIData"));
+                        }
+                        if (node.getFactoryNamingProvider() == null || node.getFactoryNamingProvider().length() == 0 || node.getFactoryNamingProvider().length() > 255) {
+                                throw new ValueNotAllowedException(new ErrorMessage("errors.node.NoRMIData"));
+                        }
+                        if (node.getFactoryURLPkgs() == null || node.getFactoryURLPkgs().length() == 0 || node.getFactoryURLPkgs().length() > 255) {
+                                throw new ValueNotAllowedException(new ErrorMessage("errors.node.NoRMIDataF"));
+                        }
+                }
 
-    }
+        }
 }



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