cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject svn commit: r602028 - in /incubator/cxf/trunk/tools/validator/src: main/java/org/apache/cxf/tools/validator/internal/ test/java/org/apache/cxf/tools/validator/internal/ test/java/org/apache/cxf/tools/validator/internal/resources/
Date Fri, 07 Dec 2007 08:54:47 GMT
Author: mmao
Date: Fri Dec  7 00:54:46 2007
New Revision: 602028

URL: http://svn.apache.org/viewvc?rev=602028&view=rev
Log:
CXF-1273
  WSDLRefValidator can not pass if the type is xsd:anyType


Added:
    incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/resources/anytype.wsdl
Modified:
    incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDLRefValidator.java
    incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/WSDLRefValidatorTest.java

Modified: incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDLRefValidator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDLRefValidator.java?rev=602028&r1=602027&r2=602028&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDLRefValidator.java
(original)
+++ incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDLRefValidator.java
Fri Dec  7 00:54:46 2007
@@ -559,8 +559,12 @@
                     schemaCollection.getElementByQName(new QName(WSDLConstants.NS_SCHEMA_XSD,
name));
                 partvalid = schemaEle != null ? true : false;
             } else {
+                if ("anyType".equals(name)) {
+                    return true;
+                }
                 XmlSchemaType schemaType =
                     schemaCollection.getTypeByQName(new QName(WSDLConstants.NS_SCHEMA_XSD,
name));
+
                 partvalid = schemaType != null ? true : false;
             }
 

Modified: incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/WSDLRefValidatorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/WSDLRefValidatorTest.java?rev=602028&r1=602027&r2=602028&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/WSDLRefValidatorTest.java
(original)
+++ incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/WSDLRefValidatorTest.java
Fri Dec  7 00:54:46 2007
@@ -140,4 +140,15 @@
             assertEquals(expected, e.getMessage());
         }
     }
+
+    @Test
+    public void testXSDAnyType() throws Exception {
+        String wsdl = getClass().getResource("resources/anytype.wsdl").toURI().toString();
+        try {
+            WSDLRefValidator validator = new WSDLRefValidator(wsdl);
+            assertTrue(validator.isValid());
+        } catch (Exception e) {
+            fail("Valid wsdl, no exception should be thrown" + e.getMessage());
+        }
+    }
 }

Added: incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/resources/anytype.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/resources/anytype.wsdl?rev=602028&view=auto
==============================================================================
--- incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/resources/anytype.wsdl
(added)
+++ incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/resources/anytype.wsdl
Fri Dec  7 00:54:46 2007
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8" ?> 
+<wsdl:definitions name="BaseDataTypesRpcLitService" targetNamespace="http://tempuri.org/"

+		  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
+		  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
+		  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+		  xmlns:tns="http://tempuri.org/">
+
+    <wsdl:message name="IBaseDataTypesRpcLit_RetObject_InputMessage">
+	<wsdl:part name="inObject" type="xsd:anyType" /> 
+    </wsdl:message>
+    <wsdl:message name="IBaseDataTypesRpcLit_RetObject_OutputMessage">
+	<wsdl:part name="RetObjectResult" type="xsd:anyType" /> 
+    </wsdl:message>
+
+    <wsdl:portType name="IBaseDataTypesRpcLit">
+	<wsdl:operation name="RetObject">
+	    <wsdl:input message="tns:IBaseDataTypesRpcLit_RetObject_InputMessage" /> 
+	    <wsdl:output message="tns:IBaseDataTypesRpcLit_RetObject_OutputMessage" /> 
+	</wsdl:operation>
+    </wsdl:portType>
+    <wsdl:binding name="BasicHttpBinding_IBaseDataTypesRpcLit" type="tns:IBaseDataTypesRpcLit">
+	<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc" /> 
+
+	<wsdl:operation name="RetObject">
+	    <soap:operation soapAction="http://tempuri.org/IBaseDataTypesRpcLit/RetObject" style="rpc"
/> 
+	    <wsdl:input>
+		<soap:body use="literal" namespace="http://tempuri.org/" /> 
+	    </wsdl:input>
+	    <wsdl:output>
+		<soap:body use="literal" namespace="http://tempuri.org/" /> 
+	    </wsdl:output>
+	</wsdl:operation>
+    </wsdl:binding>
+    <wsdl:service name="BaseDataTypesRpcLitService">
+	<wsdl:port name="BasicHttpBinding_IBaseDataTypesRpcLit" binding="tns:BasicHttpBinding_IBaseDataTypesRpcLit">
+	    <soap:address location="http://131.107.72.15/SoapWsdl_BaseDataTypes_XmlFormatter_Service_Indigo/BaseDataTypesRpcLit.svc"/>
+	</wsdl:port>
+    </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file



Mime
View raw message