You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by ba...@apache.org on 2007/02/13 20:39:21 UTC

svn commit: r507177 - /webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/validator/EndpointDescriptionValidator.java

Author: barrettj
Date: Tue Feb 13 11:39:20 2007
New Revision: 507177

URL: http://svn.apache.org/viewvc?view=rev&rev=507177
Log:
Re-enable the binding type validation check

Modified:
    webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/validator/EndpointDescriptionValidator.java

Modified: webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/validator/EndpointDescriptionValidator.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/validator/EndpointDescriptionValidator.java?view=diff&rev=507177&r1=507176&r2=507177
==============================================================================
--- webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/validator/EndpointDescriptionValidator.java (original)
+++ webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/validator/EndpointDescriptionValidator.java Tue Feb 13 11:39:20 2007
@@ -27,8 +27,6 @@
 import org.apache.axis2.jaxws.description.EndpointDescriptionJava;
 import org.apache.axis2.jaxws.description.EndpointDescriptionWSDL;
 import org.apache.axis2.jaxws.description.EndpointInterfaceDescription;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 
 /**
  * 
@@ -38,8 +36,6 @@
     EndpointDescriptionJava endpointDescJava;
     EndpointDescriptionWSDL endpointDescWSDL;
     
-    private static final Log log = LogFactory.getLog(EndpointDescriptionValidator.class);
-    
     public EndpointDescriptionValidator(EndpointDescription toValidate) {
         endpointDesc = toValidate;
         endpointDescJava = (EndpointDescriptionJava) endpointDesc;
@@ -67,23 +63,12 @@
     }
 
     private boolean validateWSDLBindingType() {
-        // REVIEW: We are currently bypassing these validation checks because there are several
-        // JAX-WS CTS tests that fail this validation.  Those tests are currently being 
-        // challenged.  Pending resolution of that challenge, we disable this validation check.
-        // Otherwise, the EAR containing the invalid modules will not load, causing the entire
-        // TCK to fail.  Once this issue is resolved, the commented out calls to 
-        // addValidationFailure(...) should be uncommented; 
-        // the TEMPORARY* variables, and the Log call should be removed.
-        boolean TEMPORARY_disableThisValidation = true;
-        String TEMPORARY_validation_message = null;
-        
         boolean isBindingValid = false;
         String bindingType = endpointDesc.getBindingType();
         String wsdlBindingType = endpointDescWSDL.getWSDLBindingType();
         if (bindingType == null) {
             // I don't think this can happen; the Description layer should provide a default
-            TEMPORARY_validation_message = "Annotation binding type is null and did not have a default";
-//            addValidationFailure(this, "Annotation binding type is null and did not have a default");
+            addValidationFailure(this, "Annotation binding type is null and did not have a default");
             isBindingValid = false;
         }
         // Validate that the annotation value specified is valid.
@@ -92,8 +77,7 @@
                  !SOAPBinding.SOAP12HTTP_BINDING.equals(bindingType) &&
                  !SOAPBinding.SOAP12HTTP_MTOM_BINDING.equals(bindingType) &&
                  !HTTPBinding.HTTP_BINDING.equals(bindingType)) {
-            TEMPORARY_validation_message = "Invalid annotation binding value specified: " + bindingType;
-//            addValidationFailure(this, "Invalid annotation binding value specified: " + bindingType);
+            addValidationFailure(this, "Invalid annotation binding value specified: " + bindingType);
             isBindingValid = false;
         }
         // If there's no WSDL, then there will be no WSDL Binding Type to validate against
@@ -104,8 +88,7 @@
         else if (!EndpointDescriptionWSDL.SOAP11_WSDL_BINDING.equals(wsdlBindingType) &&
                  !EndpointDescriptionWSDL.SOAP12_WSDL_BINDING.equals(wsdlBindingType) &&
                  !EndpointDescriptionWSDL.HTTP_WSDL_BINDING.equals(wsdlBindingType)) {
-            TEMPORARY_validation_message = "Invalid wsdl binding value specified: " + wsdlBindingType;
-//            addValidationFailure(this, "Invalid wsdl binding value specified: " + wsdlBindingType);
+            addValidationFailure(this, "Invalid wsdl binding value specified: " + wsdlBindingType);
             isBindingValid = false;
         }
         // Validate that the WSDL and annotations values indicate the same type of binding
@@ -126,20 +109,12 @@
         // The HTTP binding is not valid on a Java Bean SEI-based endpoint; only on a Provider based one.
         else if (wsdlBindingType.equals(EndpointDescriptionWSDL.HTTP_WSDL_BINDING) &&
                  endpointDesc.isEndpointBased()) {
-            TEMPORARY_validation_message = "The HTTPBinding can not be specified for SEI-based endpoints";
-//            addValidationFailure(this, "The HTTPBinding can not be specified for SEI-based endpoints");
+            addValidationFailure(this, "The HTTPBinding can not be specified for SEI-based endpoints");
             isBindingValid = false;
         }
         else {
-            TEMPORARY_validation_message = "Invalid binding; wsdl = " + wsdlBindingType + ", annotation = " + bindingType;
-//            addValidationFailure(this, "Invalid binding; wsdl = " + wsdlBindingType + ", annotation = " + bindingType);
+            addValidationFailure(this, "Invalid binding; wsdl = " + wsdlBindingType + ", annotation = " + bindingType);
             isBindingValid = false;
-        }
-        if (TEMPORARY_disableThisValidation) {
-            if (!isBindingValid) {
-                log.warn("Temporarily allowed validation failure: " + TEMPORARY_validation_message);
-            }
-            return true;
         }
         return isBindingValid;
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org