cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r834232 - in /cxf/trunk: api/ api/src/main/build-resources/ common/schemas/src/main/resources/META-INF/ common/schemas/src/main/resources/schemas/configuration/ common/xjc/dv/src/main/java/org/apache/cxf/xjc/dv/ rt/transports/http-jetty/src...
Date Mon, 09 Nov 2009 21:06:33 GMT
Author: dkulp
Date: Mon Nov  9 21:06:33 2009
New Revision: 834232

URL: http://svn.apache.org/viewvc?rev=834232&view=rev
Log:
[CXF-1647, CXF-2324, CXF-2039, CXF-2113] Introduce "ParameterizedXXXX"
types for use in the schema derived configuration things to allow
the primitive things to be properly schema validated, but also allow
some level of schema validation.

Added:
    cxf/trunk/common/schemas/src/main/resources/schemas/configuration/parameterized-types.xsd   (with props)
    cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/bean.properties   (with props)
    cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans-props.xml   (with props)
Modified:
    cxf/trunk/api/pom.xml
    cxf/trunk/api/src/main/build-resources/catalog.cat
    cxf/trunk/common/schemas/src/main/resources/META-INF/spring.schemas
    cxf/trunk/common/schemas/src/main/resources/schemas/configuration/security.xsd
    cxf/trunk/common/xjc/dv/src/main/java/org/apache/cxf/xjc/dv/DefaultValuePlugin.java
    cxf/trunk/rt/transports/http-jetty/src/main/build-resources/catalog.cat
    cxf/trunk/rt/transports/http-jetty/src/main/resources/schemas/configuration/http-jetty.xsd
    cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/ApplicationContextTest.java
    cxf/trunk/rt/transports/http/pom.xml
    cxf/trunk/rt/transports/http/src/main/build-resources/catalog.cat
    cxf/trunk/rt/transports/http/src/main/resources/schemas/wsdl/http-conf.xsd
    cxf/trunk/rt/transports/jms/pom.xml
    cxf/trunk/rt/transports/jms/src/main/build-resources/catalog.cat
    cxf/trunk/rt/transports/jms/src/main/resources/schemas/wsdl/jms.xsd
    cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDL11Validator.java

Modified: cxf/trunk/api/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/api/pom.xml?rev=834232&r1=834231&r2=834232&view=diff
==============================================================================
--- cxf/trunk/api/pom.xml (original)
+++ cxf/trunk/api/pom.xml Mon Nov  9 21:06:33 2009
@@ -154,6 +154,10 @@
                                 <xsdOption>
                                     <xsd>${basedir}/target/schemas/schemas/configuration/security.xsd</xsd>
                                     <bindingFile>${basedir}/target/schemas/schemas/configuration/security.xjb</bindingFile>
+                                    <catalog>${basedir}/src/main/build-resources/catalog.cat</catalog>
+                                    <extensionArgs>
+                                         <extensionArg>-Xdv</extensionArg>
+                                     </extensionArgs>
                                 </xsdOption>
                                 <xsdOption>
                                     <xsd>${basedir}/target/schemas/schemas/wsdl/ws-addr-wsdl.xsd</xsd>

Modified: cxf/trunk/api/src/main/build-resources/catalog.cat
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/build-resources/catalog.cat?rev=834232&r1=834231&r2=834232&view=diff
==============================================================================
--- cxf/trunk/api/src/main/build-resources/catalog.cat (original)
+++ cxf/trunk/api/src/main/build-resources/catalog.cat Mon Nov  9 21:06:33 2009
@@ -20,4 +20,5 @@
 
 SYSTEM "http://schemas.xmlsoap.org/wsdl/" "../../../target/schemas/schemas/wsdl/wsdl.xsd"
 SYSTEM "http://schemas.xmlsoap.org/wsdl/2003-02-11.xsd" "../../../target/schemas/schemas/wsdl/wsdl.xsd"
+SYSTEM "http://cxf.apache.org/schemas/configuration/parameterized-types.xsd" "../../../target/schemas/schemas/configuration/parameterized-types.xsd"
 

Modified: cxf/trunk/common/schemas/src/main/resources/META-INF/spring.schemas
URL: http://svn.apache.org/viewvc/cxf/trunk/common/schemas/src/main/resources/META-INF/spring.schemas?rev=834232&r1=834231&r2=834232&view=diff
==============================================================================
--- cxf/trunk/common/schemas/src/main/resources/META-INF/spring.schemas (original)
+++ cxf/trunk/common/schemas/src/main/resources/META-INF/spring.schemas Mon Nov  9 21:06:33 2009
@@ -24,4 +24,5 @@
 http\://schemas.xmlsoap.org/ws/2004/08/addressing=schemas/wsdl/addressing.xsd
 
 http\://cxf.apache.org/schemas/configuration/security.xsd=schemas/configuration/security.xsd
+http\://cxf.apache.org/schemas/configuration/parameterized-types.xsd=schemas/configuration/parameterized-types.xsd
 

Added: cxf/trunk/common/schemas/src/main/resources/schemas/configuration/parameterized-types.xsd
URL: http://svn.apache.org/viewvc/cxf/trunk/common/schemas/src/main/resources/schemas/configuration/parameterized-types.xsd?rev=834232&view=auto
==============================================================================
--- cxf/trunk/common/schemas/src/main/resources/schemas/configuration/parameterized-types.xsd (added)
+++ cxf/trunk/common/schemas/src/main/resources/schemas/configuration/parameterized-types.xsd Mon Nov  9 21:06:33 2009
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you 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.
+-->
+<xs:schema targetNamespace="http://cxf.apache.org/configuration/parameterized-types" 
+           xmlns:tns="http://cxf.apache.org/configuration/parameterized-types" 
+           xmlns:xs="http://www.w3.org/2001/XMLSchema" 
+           xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
+  		   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           elementFormDefault="qualified" 
+           attributeFormDefault="unqualified"
+           xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+           jaxb:version="2.0">
+
+    
+    <xs:simpleType name="ParameterizedValue">
+    	<xs:restriction base="xs:string">
+    		<xs:pattern value="[$#](\{.*\}|\(.*\)|\[.*\])"/>
+    	</xs:restriction>
+    </xs:simpleType>
+    
+    <xs:simpleType name="ParameterizedUShort">
+    	<xs:annotation>
+	        <xs:appinfo>
+    	        <jaxb:class ref="java.lang.Integer"/>
+        	</xs:appinfo>
+        </xs:annotation>
+        <xs:union memberTypes="xs:unsignedShort tns:ParameterizedValue"/>
+    </xs:simpleType>
+    <xs:simpleType name="ParameterizedInt">
+    	<xs:annotation>
+	        <xs:appinfo>
+    	        <jaxb:class ref="java.lang.Integer"/>
+        	</xs:appinfo>
+        </xs:annotation>
+        <xs:union memberTypes="xs:int tns:ParameterizedValue"/>
+    </xs:simpleType>
+    <xs:simpleType name="ParameterizedUInt">
+    	<xs:annotation>
+	        <xs:appinfo>
+    	        <jaxb:class ref="java.lang.Long"/>
+        	</xs:appinfo>
+        </xs:annotation>
+        <xs:union memberTypes="xs:unsignedInt tns:ParameterizedValue"/>
+    </xs:simpleType>
+    <xs:simpleType name="ParameterizedLong">
+    	<xs:annotation>
+	        <xs:appinfo>
+    	        <jaxb:class ref="java.lang.Long"/>
+        	</xs:appinfo>
+        </xs:annotation>
+        <xs:union memberTypes="xs:long tns:ParameterizedValue"/>
+    </xs:simpleType>
+    <xs:simpleType name="ParameterizedBoolean">
+    	<xs:annotation>
+	        <xs:appinfo>
+    	        <jaxb:class ref="java.lang.Boolean"/>
+        	</xs:appinfo>
+        </xs:annotation>
+        <xs:union memberTypes="xs:boolean tns:ParameterizedValue"/>
+    </xs:simpleType>
+    
+    
+ </xs:schema>

Propchange: cxf/trunk/common/schemas/src/main/resources/schemas/configuration/parameterized-types.xsd
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/common/schemas/src/main/resources/schemas/configuration/parameterized-types.xsd
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/common/schemas/src/main/resources/schemas/configuration/parameterized-types.xsd
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: cxf/trunk/common/schemas/src/main/resources/schemas/configuration/security.xsd
URL: http://svn.apache.org/viewvc/cxf/trunk/common/schemas/src/main/resources/schemas/configuration/security.xsd?rev=834232&r1=834231&r2=834232&view=diff
==============================================================================
--- cxf/trunk/common/schemas/src/main/resources/schemas/configuration/security.xsd (original)
+++ cxf/trunk/common/schemas/src/main/resources/schemas/configuration/security.xsd Mon Nov  9 21:06:33 2009
@@ -26,6 +26,7 @@
            xmlns:tns="http://cxf.apache.org/configuration/security"
            xmlns:beans="http://www.springframework.org/schema/beans"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xmlns:pt="http://cxf.apache.org/configuration/parameterized-types" 
            xsi:schemaLocation="
                http://www.springframework.org/schema/beans
                http://www.springframework.org/schema/beans/spring-beans.xsd"
@@ -33,6 +34,9 @@
 
     <xs:import namespace="http://www.springframework.org/schema/beans"/>
     
+    <xs:import namespace="http://cxf.apache.org/configuration/parameterized-types"
+               schemaLocation="http://cxf.apache.org/schemas/configuration/parameterized-types.xsd"/>
+    
     <xs:complexType name="AuthorizationPolicy">
         <xs:annotation>
             <xs:documentation>
@@ -99,14 +103,14 @@
     </xs:complexType>
     
     <xs:complexType name="ClientAuthentication">
-        <xs:attribute name="want"     type="xs:boolean">
+        <xs:attribute name="want"     type="pt:ParameterizedBoolean">
           <xs:annotation>
             <xs:documentation>
             This attribute specifies if client authentication should be requested.
             </xs:documentation>
           </xs:annotation>
         </xs:attribute>
-        <xs:attribute name="required" type="xs:boolean">
+        <xs:attribute name="required" type="pt:ParameterizedBoolean">
           <xs:annotation>
             <xs:documentation>
             This attribute specifies if client authentication should be required.
@@ -429,7 +433,7 @@
               </xs:annotation>
            </xs:element>
         </xs:all>
-           <xs:attribute name="disableCNCheck" type="xs:boolean" default="false">
+           <xs:attribute name="disableCNCheck" type="pt:ParameterizedBoolean" default="false">
              <xs:annotation>
                 <xs:documentation>
                 This attribute specifies if JSSE should omit checking if the

Modified: cxf/trunk/common/xjc/dv/src/main/java/org/apache/cxf/xjc/dv/DefaultValuePlugin.java
URL: http://svn.apache.org/viewvc/cxf/trunk/common/xjc/dv/src/main/java/org/apache/cxf/xjc/dv/DefaultValuePlugin.java?rev=834232&r1=834231&r2=834232&view=diff
==============================================================================
--- cxf/trunk/common/xjc/dv/src/main/java/org/apache/cxf/xjc/dv/DefaultValuePlugin.java (original)
+++ cxf/trunk/common/xjc/dv/src/main/java/org/apache/cxf/xjc/dv/DefaultValuePlugin.java Mon Nov  9 21:06:33 2009
@@ -56,7 +56,7 @@
 import org.apache.cxf.common.logging.LogUtils;
 
 /**
- * Modifies the JAXB code model to initialise fields mapped from schema elements 
+ * Modifies the JAXB code model to initialize fields mapped from schema elements 
  * with their default value.
  */
 public class DefaultValuePlugin {
@@ -105,11 +105,10 @@
                 // Use XML schema object model to determine if field is mapped
                 // from an element (attributes default values are handled
                 // natively) and get its default value.
-
                 XmlString xmlDefaultValue = null;
                 XSType xsType = null;
                 boolean isElement = false;
-
+                boolean isRequiredAttr = true;
                 if (f.getPropertyInfo().getSchemaComponent() instanceof XSParticle) {
                     XSParticle particle = (XSParticle)f.getPropertyInfo().getSchemaComponent();
                     XSTerm term = particle.getTerm();
@@ -126,6 +125,7 @@
                     XSAttributeDecl decl = attributeUse.getDecl();
                     xmlDefaultValue = decl.getDefaultValue();                        
                     xsType = decl.getType();
+                    isRequiredAttr = attributeUse.isRequired();
                 }
 
                 
@@ -143,19 +143,30 @@
                     }
                 }
 
-                if (null == xmlDefaultValue || null == xmlDefaultValue.value) {
-                    continue;
+                JExpression dvExpr = null;
+                if (null != xmlDefaultValue && null != xmlDefaultValue.value) {
+                    dvExpr = getDefaultValueExpression(f, co, outline, xsType, isElement,
+                                                       xmlDefaultValue, false);
                 }
-                
-                JExpression dvExpr = 
-                    getDefaultValueExpression(f, co, outline, xsType, isElement, xmlDefaultValue);
-                
-                if (null == dvExpr) {
+                 
+                if (null == dvExpr
+                    && !isElement && !isRequiredAttr
+                    && xsType != null && xsType.getOwnerSchema() != null
+                    && !"http://www.w3.org/2001/XMLSchema"
+                        .equals(xsType.getOwnerSchema().getTargetNamespace())) {
+                    //non-primitive attribute, may still be able to convert it, but need to do
+                    //a bunch more checks and changes to setters and isSet and such
+                    dvExpr = 
+                        getDefaultValueExpression(f, co, outline, xsType, isElement, xmlDefaultValue, true);
+                    
+                    updateSetter(co, f, co.implClass);
+                    updateGetter(co, f, co.implClass, dvExpr, true);                    
+                    
+                } else if (null == dvExpr) {
                     continue;
+                } else {
+                    updateGetter(co, f, co.implClass, dvExpr, false);                    
                 }
-                
-                updateGetter(co, f, co.implClass, dvExpr);               
-                
             }
         }
 
@@ -168,11 +179,14 @@
                                           Outline outline,
                                           XSType xsType,
                                           boolean isElement,
-                                          XmlString xmlDefaultValue
-                                          ) {
+                                          XmlString xmlDefaultValue,
+                                          boolean unbox) {
         JType type = f.getRawType();
         String typeName = type.fullName();
-        String defaultValue = xmlDefaultValue.value;
+        String defaultValue = xmlDefaultValue == null ? null : xmlDefaultValue.value;
+        if (defaultValue == null) {
+            return null;
+        }
 
         JExpression dv = null;
         
@@ -230,12 +244,39 @@
             if (cls.getClassType() == ClassType.ENUM) {
                 dv = cls.staticInvoke("fromValue").arg(defaultValue);
             }
+        } else if (unbox) {
+            typeName = type.unboxify().fullName();
+            if ("int".equals(typeName)) {
+                dv = JExpr.lit(Integer.valueOf(defaultValue).intValue());
+            } else if ("long".equals(typeName)) {
+                dv = JExpr.lit(Long.valueOf(defaultValue).longValue());
+            } else if ("short".equals(typeName)) {
+                dv = JExpr.lit(Short.valueOf(defaultValue).shortValue());
+            } else if ("boolean".equals(typeName)) {
+                dv = JExpr.lit(Boolean.valueOf(defaultValue).booleanValue());
+            } else if ("double".equals(typeName)) {
+                dv = JExpr.lit(Double.valueOf(defaultValue).doubleValue());
+            } else if ("float".equals(typeName)) {
+                dv = JExpr.lit(Float.valueOf(defaultValue).floatValue());
+            } else if ("byte".equals(typeName)) {
+                dv = JExpr.lit(Byte.valueOf(defaultValue).byteValue());
+            } else {
+                dv = getDefaultValueExpression(f,
+                                               co,
+                                               outline,
+                                               xsType,
+                                               true,
+                                               xmlDefaultValue,
+                                               false);
+            }
         }
         // TODO: GregorianCalendar, ...
         return dv;
     }
     
-    private void updateGetter(ClassOutline co, FieldOutline fo, JDefinedClass dc, JExpression dvExpr) {
+    private void updateGetter(ClassOutline co, FieldOutline fo, 
+                              JDefinedClass dc, JExpression dvExpr,
+                              boolean remapRet) {
 
         String fieldName = fo.getPropertyInfo().getName(false);
         JType type = fo.getRawType();
@@ -248,6 +289,9 @@
         JDocComment doc = method.javadoc();
         int mods = method.mods().getValue();
         JType mtype = method.type();
+        if (remapRet) {
+            mtype = mtype.unboxify();
+        }
 
         if (LOG.isLoggable(Level.FINE)) {
             LOG.fine("Updating getter: " + getterName);
@@ -260,11 +304,55 @@
         method.javadoc().append(doc);
 
         JFieldRef fr = JExpr.ref(fieldName);
+        if (dvExpr != null) {
+            JExpression test = JOp.eq(JExpr._null(), fr);
+            JConditional jc =  method.body()._if(test);
+            jc._then()._return(dvExpr);
+            jc._else()._return(fr);
+        } else {
+            method.body()._return(fr);
+        }
+    }
+    private void updateSetter(ClassOutline co, FieldOutline fo, 
+                              JDefinedClass dc) {
 
-        JExpression test = JOp.eq(JExpr._null(), fr);
-        JConditional jc =  method.body()._if(test);
-        jc._then()._return(dvExpr);
-        jc._else()._return(fr);
+        String fieldName = fo.getPropertyInfo().getName(false);
+        JType type = fo.getRawType();
+        String typeName = type.fullName();
+
+        String getterName = ("java.lang.Boolean".equals(typeName) ? "is" : "get")
+                            + fo.getPropertyInfo().getName(true);
+        JMethod method = dc.getMethod(getterName, new JType[0]);
+        JType mtype = method.type();
+        String setterName = "set" + fo.getPropertyInfo().getName(true);
+        method = dc.getMethod(setterName, new JType[] {mtype});
+        if (LOG.isLoggable(Level.FINE)) {
+            LOG.fine("Updating setter: " + setterName);
+        }
+        JDocComment doc = method.javadoc();
+        // remove existing method and define new one
+        dc.methods().remove(method);
+
+        int mods = method.mods().getValue();
+        mtype = mtype.unboxify();
+        method = dc.method(mods, method.type(), setterName);
+        
+        method.javadoc().append(doc);
+        method.param(mtype, "value");
+
+        JFieldRef fr = JExpr.ref(fieldName);
+        method.body().assign(fr, JExpr.ref("value"));
+        
+        method = dc.method(mods, method.type(), "unset" + fo.getPropertyInfo().getName(true));
+        method.body().assign(fr, JExpr._null());
+        
+        method = dc.getMethod("isSet" + fo.getPropertyInfo().getName(true), new JType[0]);
+        if (method != null) {
+            //move to end
+            dc.methods().remove(method);
+            dc.methods().add(method);
+        }
+        
     }
 
 }

Modified: cxf/trunk/rt/transports/http-jetty/src/main/build-resources/catalog.cat
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http-jetty/src/main/build-resources/catalog.cat?rev=834232&r1=834231&r2=834232&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http-jetty/src/main/build-resources/catalog.cat (original)
+++ cxf/trunk/rt/transports/http-jetty/src/main/build-resources/catalog.cat Mon Nov  9 21:06:33 2009
@@ -20,5 +20,6 @@
 
 SYSTEM "http://schemas.xmlsoap.org/wsdl/" "../../../../../../common/schemas/src/main/resources/schemas/wsdl/wsdl.xsd"
 SYSTEM "http://cxf.apache.org/schemas/configuration/security.xsd" "../../../../../../common/schemas/src/main/resources/schemas/configuration/security.xsd"
+SYSTEM "http://cxf.apache.org/schemas/configuration/parameterized-types.xsd" "../../../../../../common/schemas/src/main/resources/schemas/configuration/parameterized-types.xsd"
 SYSTEM "http://cxf.apache.org/schemas/wsdl/http-conf.xsd"         "../../../../../../rt/transports/http/src/main/resources/schemas/wsdl/http-conf.xsd"
 SYSTEM "http://cxf.apache.org/schemas/configuration/http-jetty.xsd" "schemas/configuration/http-jetty.xsd"

Modified: cxf/trunk/rt/transports/http-jetty/src/main/resources/schemas/configuration/http-jetty.xsd
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http-jetty/src/main/resources/schemas/configuration/http-jetty.xsd?rev=834232&r1=834231&r2=834232&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http-jetty/src/main/resources/schemas/configuration/http-jetty.xsd (original)
+++ cxf/trunk/rt/transports/http-jetty/src/main/resources/schemas/configuration/http-jetty.xsd Mon Nov  9 21:06:33 2009
@@ -26,6 +26,7 @@
            xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
            xmlns:sec="http://cxf.apache.org/configuration/security"
   		   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  		   xmlns:ptp="http://cxf.apache.org/configuration/parameterized-types" 
   		   xsi:schemaLocation="
   		     http://www.springframework.org/schema/beans
   		       http://www.springframework.org/schema/beans/spring-beans.xsd"
@@ -36,17 +37,18 @@
 
     <xs:import namespace="http://cxf.apache.org/configuration/security"
                schemaLocation="http://cxf.apache.org/schemas/configuration/security.xsd"/>
-    
+    <xs:import namespace="http://cxf.apache.org/configuration/parameterized-types"
+               schemaLocation="http://cxf.apache.org/schemas/configuration/parameterized-types.xsd"/>
     
     <!-- Is this really supposed to be supperceeded by http-conf:HTTPListenerPolicy? -->
     <xs:complexType name="ThreadingParametersType">
-       <xs:attribute name="minThreads" type="xs:unsignedShort">
+       <xs:attribute name="minThreads" type="ptp:ParameterizedUShort">
           <xs:annotation>
              <xs:documentation>Specifies the minimum number of threads available to the Jetty instance for processing requests.</xs:documentation>
           </xs:annotation>
        </xs:attribute>
-       <xs:attribute name="maxThreads" type="xs:unsignedShort">
-                    <xs:annotation>
+       <xs:attribute name="maxThreads" type="ptp:ParameterizedUShort">
+       <xs:annotation>
              <xs:documentation>Specifies the maximum number of threads available to the Jetty instance for processing requests.</xs:documentation>
           </xs:annotation>
        </xs:attribute>
@@ -118,11 +120,11 @@
          </xs:choice>         
          <xs:element name="connector" type="xsd:anyType" minOccurs="0"/>
          <xs:element name="handlers" type="xsd:anyType" minOccurs="0"/>
-         <xs:element name="sessionSupport" type="xsd:boolean" minOccurs="0"/>
-         <xs:element name="reuseAddress" type="xsd:boolean" minOccurs="0" />          
+         <xs:element name="sessionSupport" type="ptp:ParameterizedBoolean" minOccurs="0"/>
+         <xs:element name="reuseAddress" type="ptp:ParameterizedBoolean" minOccurs="0" />          
        </xs:sequence>
        
-       <xs:attribute name="port" type="xs:int" use="required">
+       <xs:attribute name="port" type="ptp:ParameterizedInt" use="required">
              <xs:annotation>
                 <xs:documentation>Specifies the port used by the Jetty instance.
                 You can specify a value of 0 for the port attribute. Any threading 
@@ -139,7 +141,7 @@
                 </xs:documentation>
              </xs:annotation>
        </xs:attribute>
-       <xs:attribute name="continuationsEnabled" type="xs:boolean">
+       <xs:attribute name="continuationsEnabled" type="ptp:ParameterizedBoolean">
            <xs:annotation>
                 <xs:documentation>Specifies if Jetty Continuations will be explicitly supported
                 by Jetty destinations. Continuations will be checked if this attribute is set to true or                            omitted, ignored otherwise</xs:documentation>

Modified: cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/ApplicationContextTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/ApplicationContextTest.java?rev=834232&r1=834231&r2=834232&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/ApplicationContextTest.java (original)
+++ cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/ApplicationContextTest.java Mon Nov  9 21:06:33 2009
@@ -77,10 +77,6 @@
         }
     }
     
-    // This test fails because I think it is trying to read the http-conf.xsd
-    // twice, failing on a duplicate name for 
-    //http://cxf.apache.org/transports/http/configuration,authorization
-    
     @Test
     public void testContext() throws Exception {
         String s4 = getClass()
@@ -90,7 +86,18 @@
             new String[] {S1, S2, S3, s4});
         
         //ctx.refresh();
+        checkContext(ctx);
+    }
+    @Test
+    public void testContextWithProperties() throws Exception {
+        String s4 = getClass()
+            .getResource("/org/apache/cxf/transport/http_jetty/spring/beans-props.xml").toString();
         
+        TestApplicationContext ctx = new TestApplicationContext(
+            new String[] {S1, S2, S3, s4});
+        checkContext(ctx);
+    }
+    private void checkContext(TestApplicationContext ctx) throws Exception {
         ConfigurerImpl cfg = new ConfigurerImpl(ctx);
         
         EndpointInfo info = getEndpointInfo("bla", "Foo", "http://localhost:9000");
@@ -170,4 +177,6 @@
         info2.setAddress(address);
         return info2;
     }
+    
+
 }

Added: cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/bean.properties
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/bean.properties?rev=834232&view=auto
==============================================================================
--- cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/bean.properties (added)
+++ cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/bean.properties Mon Nov  9 21:06:33 2009
@@ -0,0 +1,28 @@
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements. See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership. The ASF licenses this file
+#  to you 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.
+bar.connection.timeout=79
+foo.connection.timeout=97
+engine.port.zero=0
+engine.port.nine.zero=9000
+engine.port.nine.one=9001
+engine.port.nine.two=9002
+engine.port.nine.three=9003
+
+engine.port.zero.minThreads=21
+engine.port.zero.maxThreads=389
+engine.port.nine.one.minThreads=99
+engine.port.nine.one.maxThreads=777

Propchange: cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/bean.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/bean.properties
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/bean.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans-props.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans-props.xml?rev=834232&view=auto
==============================================================================
--- cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans-props.xml (added)
+++ cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans-props.xml Mon Nov  9 21:06:33 2009
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you 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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:beans="http://www.springframework.org/schema/beans"    
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:h="http://cxf.apache.org/transports/http/configuration"
+       xmlns:hj="http://cxf.apache.org/transports/http-jetty/configuration"
+       xmlns:sec="http://cxf.apache.org/configuration/security"
+       xsi:schemaLocation="
+		http://www.springframework.org/schema/beans 
+		    http://www.springframework.org/schema/beans/spring-beans.xsd
+		http://cxf.apache.org/configuration/security 
+		    http://cxf.apache.org/schemas/configuration/security.xsd
+		http://cxf.apache.org/transports/http/configuration 
+		    http://cxf.apache.org/schemas/configuration/http-conf.xsd
+		http://cxf.apache.org/transports/http-jetty/configuration 
+		    http://cxf.apache.org/schemas/configuration/http-jetty.xsd"
+>
+	<bean id="placeholderConfig"
+	      class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+	  <property name="location" value="org/apache/cxf/transport/http_jetty/spring/bean.properties"/>
+	</bean>
+	<bean id="placeholderConfig2"
+	      class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+	  <property name="location" value="org/apache/cxf/transport/http_jetty/spring/bean.properties"/>
+	  <property name="placeholderPrefix" value="$("/>
+	  <property name="placeholderSuffix" value=")"/>
+	</bean>
+	<bean id="placeholderConfig3"
+	      class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+	  <property name="location" value="org/apache/cxf/transport/http_jetty/spring/bean.properties"/>
+	  <property name="placeholderPrefix" value="#["/>
+	  <property name="placeholderSuffix" value="]"/>
+	</bean>
+    <h:destination name="{urn:test:ns}Foo.http-destination">
+      <h:server ContentEncoding="foobar"/>
+    </h:destination>
+    
+    <h:conduit name="{urn:test:ns}Foo.http-conduit">
+      <h:client ConnectionTimeout="${foo.connection.timeout}"/>
+    </h:conduit>
+
+    <h:conduit name="*Bar.http-conduit">
+      <h:client ConnectionTimeout="${bar.connection.timeout}"/>
+    </h:conduit>
+
+    <hj:engine-factory bus="cxf">
+       <hj:identifiedTLSServerParameters id="sample1">
+         <hj:tlsServerParameters jsseProvider="SUN" secureSocketProtocol="TLS">
+            <sec:clientAuthentication want="false" required="false"/>
+        </hj:tlsServerParameters>
+       </hj:identifiedTLSServerParameters>
+       
+	   <hj:identifiedThreadingParameters id="sampleThreading1">
+	      <hj:threadingParameters minThreads="111" maxThreads="120"/>
+	   </hj:identifiedThreadingParameters>
+       
+	   <hj:engine port="${engine.port.nine.zero}">
+	      <hj:threadingParametersRef id="sampleThreading1"/>	      
+	   </hj:engine>
+	   
+	   <hj:engine port="#[engine.port.zero]">
+	      <hj:threadingParameters minThreads="${engine.port.zero.minThreads}" maxThreads="${engine.port.zero.maxThreads}"/>
+	   </hj:engine>
+	   
+	   <hj:engine port="$(engine.port.nine.one)">
+	       <hj:threadingParameters minThreads="${engine.port.nine.one.minThreads}"
+	        maxThreads="${engine.port.nine.one.maxThreads}"/>	      
+	     <hj:connector>
+           <beans:bean class="org.mortbay.jetty.bio.SocketConnector">
+              <beans:property name = "port" value="${engine.port.nine.one}" />
+           </beans:bean>
+         </hj:connector>
+         <hj:handlers>
+           <beans:bean class="org.mortbay.jetty.handler.DefaultHandler"/>         
+         </hj:handlers>
+         <hj:sessionSupport>true</hj:sessionSupport>
+	  </hj:engine> 
+	  
+	  <hj:engine port="${engine.port.nine.two}">
+        <hj:tlsServerParameters>
+           <sec:clientAuthentication want="true" required="true"/>
+        </hj:tlsServerParameters>
+           <hj:threadingParametersRef id="sampleThreading1"/>
+      </hj:engine>
+      
+      <hj:engine port="${engine.port.nine.three}">
+         <hj:tlsServerParametersRef id="sample1"/>
+      </hj:engine>
+      
+	</hj:engine-factory>
+</beans>

Propchange: cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans-props.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans-props.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/spring/beans-props.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: cxf/trunk/rt/transports/http/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http/pom.xml?rev=834232&r1=834231&r2=834232&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http/pom.xml (original)
+++ cxf/trunk/rt/transports/http/pom.xml Mon Nov  9 21:06:33 2009
@@ -87,6 +87,9 @@
                                     <xsd>${basedir}/src/main/resources/schemas/wsdl/http-conf.xsd</xsd>
                                     <bindingFile>${basedir}/src/main/resources/schemas/wsdl/http-conf.xjb</bindingFile>
                                     <catalog>${basedir}/src/main/build-resources/catalog.cat</catalog>
+                                    <extensionArgs>
+                                        <extensionArg>-Xdv</extensionArg>
+                                    </extensionArgs>
                                     <deleteDirs>
                                         <deleteDir>${basedir}/target/generated/src/main/java/org/apache/cxf/wsdl</deleteDir>
                                     </deleteDirs>

Modified: cxf/trunk/rt/transports/http/src/main/build-resources/catalog.cat
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http/src/main/build-resources/catalog.cat?rev=834232&r1=834231&r2=834232&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http/src/main/build-resources/catalog.cat (original)
+++ cxf/trunk/rt/transports/http/src/main/build-resources/catalog.cat Mon Nov  9 21:06:33 2009
@@ -20,5 +20,6 @@
 
 SYSTEM "http://schemas.xmlsoap.org/wsdl/" "../../../../../../common/schemas/src/main/resources/schemas/wsdl/wsdl.xsd"
 SYSTEM "http://schemas.xmlsoap.org/wsdl/2003-02-11.xsd" "../../../../../../common/schemas/src/main/resources/schemas/wsdl/wsdl.xsd"
+SYSTEM "http://cxf.apache.org/schemas/configuration/parameterized-types.xsd" "../../../../../../common/schemas/src/main/resources/schemas/configuration/parameterized-types.xsd"
 SYSTEM "http://cxf.apache.org/schemas/configuration/security.xsd" "../../../../../../common/schemas/src/main/resources/schemas/configuration/security.xsd"
 SYSTEM "http://cxf.apache.org/schemas/wsdl/http-conf.xsd" "schemas/wsdl/http-conf.xsd"

Modified: cxf/trunk/rt/transports/http/src/main/resources/schemas/wsdl/http-conf.xsd
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http/src/main/resources/schemas/wsdl/http-conf.xsd?rev=834232&r1=834231&r2=834232&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http/src/main/resources/schemas/wsdl/http-conf.xsd (original)
+++ cxf/trunk/rt/transports/http/src/main/resources/schemas/wsdl/http-conf.xsd Mon Nov  9 21:06:33 2009
@@ -20,6 +20,7 @@
 
 <xs:schema targetNamespace="http://cxf.apache.org/transports/http/configuration" 
            xmlns:http-conf="http://cxf.apache.org/transports/http/configuration" 
+           xmlns:ptp="http://cxf.apache.org/configuration/parameterized-types" 
            xmlns:xs="http://www.w3.org/2001/XMLSchema" 
            xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -30,9 +31,12 @@
 
     <xs:import namespace="http://schemas.xmlsoap.org/wsdl/" 
         schemaLocation="http://schemas.xmlsoap.org/wsdl/2003-02-11.xsd"/>
+    <xs:import namespace="http://cxf.apache.org/configuration/parameterized-types"
+        schemaLocation="http://cxf.apache.org/schemas/configuration/parameterized-types.xsd"/>
     
     <xs:element name="server" type="http-conf:HTTPServerPolicy"/>
     <xs:element name="client" type="http-conf:HTTPClientPolicy"/>
+    
     <xs:element name="contextMatchStrategy" type="xs:string" default="stem"/>
     <xs:element name="fixedParameterOrder"  type="xs:boolean" default="false"/>
     
@@ -163,7 +167,7 @@
         <xs:complexContent>
             <xs:extension base="wsdl:tExtensibilityElement">
 
-                <xs:attribute name="ConnectionTimeout" type="xs:unsignedInt" use="optional" default="30000">
+                <xs:attribute name="ConnectionTimeout" type="ptp:ParameterizedUInt" use="optional" default="30000">
                     <xs:annotation>
                         <xs:documentation>
                         Specifies the amount of time, in milliseconds, that the consumer will attempt to establish a connection before it times out. 0 is infinite.
@@ -171,7 +175,7 @@
                     </xs:annotation>      
                 </xs:attribute>
 
-                <xs:attribute name="ReceiveTimeout" type="xs:unsignedInt" use="optional" default="60000">
+                <xs:attribute name="ReceiveTimeout" type="ptp:ParameterizedUInt" use="optional" default="60000">
                     <xs:annotation>
                         <xs:documentation>
                         Specifies the amount of time, in milliseconds, that the consumer will wait for a response before it times out. 0 is infinite.
@@ -179,7 +183,7 @@
                     </xs:annotation>      
                 </xs:attribute>
 
-                <xs:attribute name="AutoRedirect" type="xs:boolean" use="optional" default="false">
+                <xs:attribute name="AutoRedirect" type="ptp:ParameterizedBoolean" use="optional" default="false">
                     <xs:annotation>
                         <xs:documentation>
                        Specifies if the consumer will automatically follow a server issued redirection.
@@ -188,7 +192,7 @@
                     </xs:annotation>      
                 </xs:attribute>
 
-                <xs:attribute name="MaxRetransmits" type="xs:int" use="optional" default="-1">
+                <xs:attribute name="MaxRetransmits" type="ptp:ParameterizedInt" use="optional" default="-1">
                     <xs:annotation>
                         <xs:documentation>
                         Specifies the maximum amount of retransmits that are allowed for redirects. Retransmits for 
@@ -202,7 +206,7 @@
                     </xs:annotation>      
                 </xs:attribute>
 
-                <xs:attribute name="AllowChunking" type="xs:boolean" use="optional" default="true">
+                <xs:attribute name="AllowChunking" type="ptp:ParameterizedBoolean" use="optional" default="true">
                     <xs:annotation>
                         <xs:documentation>
                         If true, the client is free to use chunking streams if it wants, but it is not 
@@ -211,7 +215,7 @@
                         </xs:documentation>
                     </xs:annotation>      
                 </xs:attribute>
-                <xs:attribute name="ChunkingThreshold" type="xs:int" use="optional" default="4096">
+                <xs:attribute name="ChunkingThreshold" type="ptp:ParameterizedInt" use="optional" default="4096">
                     <xs:annotation>
                         <xs:documentation>
                         If AllowChunking is true, this sets the threshold at which messages start
@@ -338,7 +342,7 @@
                         </xs:documentation>
                     </xs:annotation>      
                 </xs:attribute>
-                <xs:attribute name="ProxyServerPort" type="xs:int" use="optional">
+                <xs:attribute name="ProxyServerPort" type="ptp:ParameterizedInt" use="optional">
                     <xs:annotation>
                         <xs:documentation>
                         Specifies the port number used by the proxy server.

Modified: cxf/trunk/rt/transports/jms/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/jms/pom.xml?rev=834232&r1=834231&r2=834232&view=diff
==============================================================================
--- cxf/trunk/rt/transports/jms/pom.xml (original)
+++ cxf/trunk/rt/transports/jms/pom.xml Mon Nov  9 21:06:33 2009
@@ -145,6 +145,9 @@
                                     <deleteDirs>
                                         <deleteDir>${basedir}/target/generated/src/main/java/org/apache/cxf/wsdl</deleteDir>
                                     </deleteDirs>
+                                    <extensionArgs>
+                                         <extensionArg>-Xdv</extensionArg>
+                                     </extensionArgs>
                                 </xsdOption>
                                 <xsdOption>
                                     <xsd>${basedir}/src/main/resources/schemas/wsdl/jms-uri.xsd</xsd>
@@ -161,6 +164,18 @@
                         </goals>
                     </execution>
                 </executions>
+                <dependencies>
+                    <dependency>
+                        <groupId>org.apache.cxf</groupId>
+                        <artifactId>cxf-xjc-dv</artifactId>
+                        <version>${project.version}</version>
+                    </dependency>
+                    <dependency>
+                        <groupId>org.apache.cxf</groupId>
+                        <artifactId>cxf-common-utilities</artifactId>
+                        <version>${project.version}</version>
+                    </dependency>
+                </dependencies>
             </plugin>
             <plugin>
                 <groupId>org.codehaus.mojo</groupId>

Modified: cxf/trunk/rt/transports/jms/src/main/build-resources/catalog.cat
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/jms/src/main/build-resources/catalog.cat?rev=834232&r1=834231&r2=834232&view=diff
==============================================================================
--- cxf/trunk/rt/transports/jms/src/main/build-resources/catalog.cat (original)
+++ cxf/trunk/rt/transports/jms/src/main/build-resources/catalog.cat Mon Nov  9 21:06:33 2009
@@ -20,4 +20,6 @@
 
 SYSTEM "http://schemas.xmlsoap.org/wsdl/2003-02-11.xsd" "../../../../../../common/schemas/src/main/resources/schemas/wsdl/wsdl.xsd"
 SYSTEM "http://schemas.xmlsoap.org/wsdl/" "../../../../../../common/schemas/src/main/resources/schemas/wsdl/wsdl.xsd"
+SYSTEM "http://cxf.apache.org/schemas/configuration/parameterized-types.xsd" "../../../../../../common/schemas/src/main/resources/schemas/configuration/parameterized-types.xsd"
+
 

Modified: cxf/trunk/rt/transports/jms/src/main/resources/schemas/wsdl/jms.xsd
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/jms/src/main/resources/schemas/wsdl/jms.xsd?rev=834232&r1=834231&r2=834232&view=diff
==============================================================================
--- cxf/trunk/rt/transports/jms/src/main/resources/schemas/wsdl/jms.xsd (original)
+++ cxf/trunk/rt/transports/jms/src/main/resources/schemas/wsdl/jms.xsd Mon Nov  9 21:06:33 2009
@@ -21,11 +21,14 @@
   xmlns:jms="http://cxf.apache.org/transports/jms" 
   xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
   xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" 
-  targetNamespace="http://cxf.apache.org/transports/jms" 
+  targetNamespace="http://cxf.apache.org/transports/jms"
+  xmlns:pt="http://cxf.apache.org/configuration/parameterized-types" 
   elementFormDefault="qualified" jaxb:version="2.0">
   
     <xs:import namespace="http://schemas.xmlsoap.org/wsdl/"
         schemaLocation="http://schemas.xmlsoap.org/wsdl/2003-02-11.xsd"/>
+    <xs:import namespace="http://cxf.apache.org/configuration/parameterized-types"
+        schemaLocation="http://cxf.apache.org/schemas/configuration/parameterized-types.xsd"/>
     
     <!-- Valid wsdl elements -->
     <xs:element name="client" type="jms:ClientBehaviorPolicyType"/>
@@ -41,8 +44,8 @@
         </xs:annotation>
         <xs:complexContent>
             <xs:extension base="wsdl:tExtensibilityElement">
-        		<xs:attribute name="lowWaterMark" type="xs:int" default="20"/>
-        		<xs:attribute name="highWaterMark" type="xs:int" default="500" />
+        		<xs:attribute name="lowWaterMark" type="pt:ParameterizedInt" default="20"/>
+        		<xs:attribute name="highWaterMark" type="pt:ParameterizedInt" default="500" />
         	</xs:extension>
 		</xs:complexContent>
     </xs:complexType>
@@ -50,13 +53,13 @@
     <xs:complexType name="ClientConfig">
     	<xs:complexContent>
     		<xs:extension base="wsdl:tExtensibilityElement">
-    			<xs:attribute name="clientReceiveTimeout" type="xs:long"
+    			<xs:attribute name="clientReceiveTimeout" type="pt:ParameterizedLong"
     				default="60000" />
-    			<xs:attribute name="messageTimeToLive" type="xs:long"
+    			<xs:attribute name="messageTimeToLive" type="pt:ParameterizedLong"
     				default="0" />
                 <xs:attribute name="conduitSelectorPrefix" type="xs:string" use="optional"/>    				
-                <xs:attribute name="useConduitIdSelector" type="xs:boolean" use="optional"/>
-                <xs:attribute name="enforceSpec" type="xs:boolean" use="optional" default="true"/>
+                <xs:attribute name="useConduitIdSelector" type="pt:ParameterizedBoolean" use="optional"/>
+                <xs:attribute name="enforceSpec" type="pt:ParameterizedBoolean" use="optional" default="true"/>
     		</xs:extension>
     	</xs:complexContent>
     </xs:complexType>
@@ -64,7 +67,7 @@
     <xs:complexType name="ServerConfig">
 		<xs:complexContent>
             <xs:extension base="wsdl:tExtensibilityElement">
-        		<xs:attribute name="messageTimeToLive" type="xs:long" default="0" />
+        		<xs:attribute name="messageTimeToLive" type="pt:ParameterizedLong" default="0" />
         		<xs:attribute name="durableSubscriptionClientId" type="xs:string" />
 			</xs:extension>
 		</xs:complexContent>        	
@@ -87,22 +90,22 @@
         
         <!-- JMS Header properties -->
         <xs:attribute name="JMSCorrelationID" type="xs:string"/>
-        <xs:attribute name="JMSDeliveryMode" type="xs:int"/>
-        <xs:attribute name="JMSExpiration" type="xs:long"/>
+        <xs:attribute name="JMSDeliveryMode" type="pt:ParameterizedInt"/>
+        <xs:attribute name="JMSExpiration" type="pt:ParameterizedLong"/>
         <xs:attribute name="JMSMessageID" type="xs:string"/>
-        <xs:attribute name="JMSPriority" type="xs:int"/>
-        <xs:attribute name="JMSRedelivered" type="xs:boolean"/>
+        <xs:attribute name="JMSPriority" type="pt:ParameterizedInt"/>
+        <xs:attribute name="JMSRedelivered" type="pt:ParameterizedBoolean"/>
         <xs:attribute name="JMSReplyTo" type="xs:string"/>
-        <xs:attribute name="JMSTimeStamp" type="xs:long"/>
+        <xs:attribute name="JMSTimeStamp" type="pt:ParameterizedLong"/>
         <xs:attribute name="JMSType" type="xs:string"/>
-        <xs:attribute name="TimeToLive" type="xs:long"/>
+        <xs:attribute name="TimeToLive" type="pt:ParameterizedLong"/>
         
         <!-- JMS Message properties for SOAP over JMS specification  -->
         <xs:attribute name="SOAPJMSTargetService" type="xs:string"/>
     	<xs:attribute name="SOAPJMSBindingVersion" type="xs:string"/>
     	<xs:attribute name="SOAPJMSContentType" type="xs:string"/>
     	<xs:attribute name="SOAPJMSSOAPAction" type="xs:anyURI"/>
-    	<xs:attribute name="SOAPJMSIsFault" type="xs:boolean"/>
+    	<xs:attribute name="SOAPJMSIsFault" type="pt:ParameterizedBoolean"/>
     	<xs:attribute name="SOAPJMSRequestURI" type="xs:string"/>
     </xs:complexType>
     
@@ -124,7 +127,7 @@
      -->
     
     <xs:simpleType name="JMSClientReceiveTimeOut">
-        <xs:restriction base="xs:long"/>
+        <xs:restriction base="pt:ParameterizedLong"/>
     </xs:simpleType>
     
     <xs:simpleType name="DestinationStyleType">
@@ -248,8 +251,8 @@
     					</xs:documentation>
     				</xs:annotation>
     			</xs:attribute>
-    			<xs:attribute name="useJms11" type="xs:boolean" use="optional"/>
-    			<xs:attribute name="reconnectOnException" type="xs:boolean" use="optional"/>
+    			<xs:attribute name="useJms11" type="pt:ParameterizedBoolean" use="optional"/>
+    			<xs:attribute name="reconnectOnException" type="pt:ParameterizedBoolean" use="optional"/>
     		</xs:extension>
     	</xs:complexContent>
     </xs:complexType>
@@ -284,14 +287,14 @@
                         </xs:documentation>
                     </xs:annotation>
                 </xs:attribute>
-                <xs:attribute name="useMessageIDAsCorrelationID" type="xs:boolean" default="false">
+                <xs:attribute name="useMessageIDAsCorrelationID" type="pt:ParameterizedBoolean" default="false">
                     <xs:annotation>
                         <xs:documentation>
                           Flag to indicate whether to use JMS Message Id as correlation ID. It is serverside only so should go in ServerPolicy
                         </xs:documentation>
                     </xs:annotation>
                 </xs:attribute>
-                <xs:attribute name="transactional" type="xs:boolean" default="false">
+                <xs:attribute name="transactional" type="pt:ParameterizedBoolean" default="false">
                     <xs:annotation>
                         <xs:documentation>
                           Flag to specify whether to use JMS transaction support on server side.

Modified: cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDL11Validator.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDL11Validator.java?rev=834232&r1=834231&r2=834232&view=diff
==============================================================================
--- cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDL11Validator.java (original)
+++ cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDL11Validator.java Mon Nov  9 21:06:33 2009
@@ -45,6 +45,7 @@
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusFactory;
 import org.apache.cxf.catalog.OASISCatalogManager;
+import org.apache.cxf.common.classloader.ClassLoaderUtils;
 import org.apache.cxf.common.i18n.Message;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.common.util.StringUtils;
@@ -174,10 +175,23 @@
         return dir;
     }
 
+        
     protected List<InputSource> getDefaultSchemas() throws IOException {
         List<InputSource> xsdList = new ArrayList<InputSource>();
+        URL url = ClassLoaderUtils.getResource("/schemas/configuration/parameterized-types.xsd",
+                                               this.getClass());
+        if (url != null) {
+            InputSource is = new InputSource(url.openStream());
+            is.setSystemId(url.toString());
+            xsdList.add(is);
+        }
+        addDefaultSchemas(ToolConstants.CXF_SCHEMAS_DIR_INJAR, xsdList);
+        
+        return xsdList;
+    }
+    private void addDefaultSchemas(String location, List<InputSource> xsdList) throws IOException {
         ClassLoader clzLoader = Thread.currentThread().getContextClassLoader();
-        Enumeration<URL> urls = clzLoader.getResources(ToolConstants.CXF_SCHEMAS_DIR_INJAR);
+        Enumeration<URL> urls = clzLoader.getResources(location);
         while (urls.hasMoreElements()) {
             URL url = urls.nextElement();
             //from jar files 
@@ -238,7 +252,6 @@
         }
         
         sort(xsdList);
-        return xsdList;
     }
 
     private void sort(List<InputSource> list) {



Mime
View raw message