axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From barre...@apache.org
Subject svn commit: r502315 - /webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/validator/EndpointDescriptionValidator.java
Date Thu, 01 Feb 2007 18:53:21 GMT
Author: barrettj
Date: Thu Feb  1 10:53:20 2007
New Revision: 502315

URL: http://svn.apache.org/viewvc?view=rev&rev=502315
Log:
Temporarily remove validation between WSDL binding type and JAX-WS binding type annotation
pending resolution of TCK test issues.

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=502315&r1=502314&r2=502315
==============================================================================
--- 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
Thu Feb  1 10:53:20 2007
@@ -27,6 +27,8 @@
 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;
 
 /**
  * 
@@ -36,6 +38,8 @@
     EndpointDescriptionJava endpointDescJava;
     EndpointDescriptionWSDL endpointDescWSDL;
     
+    private static final Log log = LogFactory.getLog(EndpointDescriptionValidator.class);
+    
     public EndpointDescriptionValidator(EndpointDescription toValidate) {
         endpointDesc = toValidate;
         endpointDescJava = (EndpointDescriptionJava) endpointDesc;
@@ -63,14 +67,23 @@
     }
 
     private boolean validateWSDLBindingType() {
-        // TODO: The getWSDLBindingType is not getting the correct value; it needs to return
the
-        //       <soap:binding transport> value
+        // 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
-            addValidationFailure(this, "Annotation binding type is null and did not have
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");
             isBindingValid = false;
         }
         // Validate that the annotation value specified is valid.
@@ -79,7 +92,8 @@
                  !SOAPBinding.SOAP12HTTP_BINDING.equals(bindingType) &&
                  !SOAPBinding.SOAP12HTTP_MTOM_BINDING.equals(bindingType) &&
                  !HTTPBinding.HTTP_BINDING.equals(bindingType)) {
-            addValidationFailure(this, "Invalid annotation binding value specified: " + bindingType);
+            TEMPORARY_validation_message = "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
@@ -90,7 +104,8 @@
         else if (!EndpointDescriptionWSDL.SOAP11_WSDL_BINDING.equals(wsdlBindingType) &&
                  !EndpointDescriptionWSDL.SOAP12_WSDL_BINDING.equals(wsdlBindingType) &&
                  !EndpointDescriptionWSDL.HTTP_WSDL_BINDING.equals(wsdlBindingType)) {
-            addValidationFailure(this, "Invalid wsdl binding value specified: " + wsdlBindingType);
+            TEMPORARY_validation_message = "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
@@ -111,12 +126,20 @@
         // 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()) {
-            addValidationFailure(this, "The HTTPBinding can not be specified for SEI-based
endpoints");
+            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");
             isBindingValid = false;
         }
         else {
-            addValidationFailure(this, "Invalid binding; wsdl = " + wsdlBindingType + ",
annotation = " + bindingType);
+            TEMPORARY_validation_message = "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


Mime
View raw message