cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andreasm...@apache.org
Subject svn commit: r448255 [3/3] - in /incubator/cxf/trunk: ./ api/ api/src/test/java/org/apache/cxf/wsdl/ api/src/test/resources/schemas/ api/src/test/resources/schemas/wsdl/ api/src/test/resources/wsdl/ common/ common/metacode/ common/metacode/src/main/reso...
Date Wed, 20 Sep 2006 16:23:44 GMT
Propchange: incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/configuration/jms-transport-base.xsd
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/configuration/jms-transport-base.xsd
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/configuration/jms-transport-base.xsd
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Copied: incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/wsdl/jms-conf.xsd
(from r447791, incubator/cxf/trunk/common/metacode/src/main/resources/schemas/wsdl/jms-conf.xsd)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/wsdl/jms-conf.xsd?view=diff&rev=448255&p1=incubator/cxf/trunk/common/metacode/src/main/resources/schemas/wsdl/jms-conf.xsd&r1=447791&p2=incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/wsdl/jms-conf.xsd&r2=448255
==============================================================================
--- incubator/cxf/trunk/common/metacode/src/main/resources/schemas/wsdl/jms-conf.xsd (original)
+++ incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/wsdl/jms-conf.xsd Wed
Sep 20 09:23:41 2006
@@ -24,7 +24,6 @@
            elementFormDefault="qualified" 
            attributeFormDefault="unqualified" 
            jaxb:version="2.0">
-    <xs:import namespace="http://schemas.xmlsoap.org/wsdl/" schemaLocation="wsdl.xsd"/>
     
     <xs:complexType name="JMSSessionPoolConfigPolicy">
         <xs:annotation>

Added: incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/wsdl/jms-context.xjb
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/wsdl/jms-context.xjb?view=auto&rev=448255
==============================================================================
--- incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/wsdl/jms-context.xjb
(added)
+++ incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/wsdl/jms-context.xjb
Wed Sep 20 09:23:41 2006
@@ -0,0 +1,28 @@
+<?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.
+-->
+<jaxb:bindings version="1.0" 
+  xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" 
+  xmlns:xs="http://www.w3.org/2001/XMLSchema" 
+  xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" 
+  jaxb:extensionBindingPrefixes="xjc">
+    <jaxb:bindings schemaLocation="jms-context.xsd" node="/xs:schema">
+        <jaxb:globalBindings generateIsSetMethod="true"/>
+    </jaxb:bindings>
+</jaxb:bindings>

Copied: incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/wsdl/jms-context.xsd
(from r447791, incubator/cxf/trunk/common/metacode/src/main/resources/schemas/wsdl/jms-context.xsd)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/wsdl/jms-context.xsd?view=diff&rev=448255&p1=incubator/cxf/trunk/common/metacode/src/main/resources/schemas/wsdl/jms-context.xsd&r1=447791&p2=incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/wsdl/jms-context.xsd&r2=448255
==============================================================================
--- incubator/cxf/trunk/common/metacode/src/main/resources/schemas/wsdl/jms-context.xsd (original)
+++ incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/wsdl/jms-context.xsd
Wed Sep 20 09:23:41 2006
@@ -24,7 +24,6 @@
            elementFormDefault="qualified" 
            attributeFormDefault="unqualified" 
            jaxb:version="2.0">
-    <xs:import namespace="http://schemas.xmlsoap.org/wsdl/" schemaLocation="wsdl.xsd"/>
     
     <xs:complexType name="JMSPropertyType">
         <xs:sequence>

Added: incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/wsdl/jms.xjb
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/wsdl/jms.xjb?view=auto&rev=448255
==============================================================================
--- incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/wsdl/jms.xjb (added)
+++ incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/wsdl/jms.xjb Wed Sep
20 09:23:41 2006
@@ -0,0 +1,34 @@
+<?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.
+-->
+<jaxb:bindings version="1.0" 
+  xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" 
+  xmlns:xs="http://www.w3.org/2001/XMLSchema" 
+  xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" 
+  jaxb:extensionBindingPrefixes="xjc">
+    <jaxb:bindings schemaLocation="../../../../../../../../common/metacode/src/main/resources/schemas/wsdl/wsdl.xsd"
node="/xs:schema">
+        <jaxb:schemaBindings>
+            <jaxb:package name="org.apache.cxf.wsdl"/>
+        </jaxb:schemaBindings>
+        <jaxb:globalBindings generateIsSetMethod="true"/>
+    </jaxb:bindings>
+    <jaxb:bindings schemaLocation="../../../../../../../../common/metacode/src/main/resources/schemas/wsdl/wsdl.xsd"
node="/xs:schema/xs:complexType[@name='tExtensibilityElement']">
+        <jaxb:class implClass="org.apache.cxf.wsdl.TExtensibilityElementImpl"/>
+    </jaxb:bindings>
+</jaxb:bindings>

Copied: incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/wsdl/jms.xsd (from
r447791, incubator/cxf/trunk/common/metacode/src/main/resources/schemas/wsdl/jms.xsd)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/wsdl/jms.xsd?view=diff&rev=448255&p1=incubator/cxf/trunk/common/metacode/src/main/resources/schemas/wsdl/jms.xsd&r1=447791&p2=incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/wsdl/jms.xsd&r2=448255
==============================================================================
--- incubator/cxf/trunk/common/metacode/src/main/resources/schemas/wsdl/jms.xsd (original)
+++ incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/wsdl/jms.xsd Wed Sep
20 09:23:41 2006
@@ -18,7 +18,7 @@
   under the License.
 -->
 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 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" elementFormDefault="qualified" jaxb:version="2.0">
-    <xs:import namespace="http://schemas.xmlsoap.org/wsdl/" schemaLocation="wsdl.xsd"/>
+    <xs:import namespace="http://schemas.xmlsoap.org/wsdl/" schemaLocation="../../../../../../../../common/metacode/src/main/resources/schemas/wsdl/wsdl.xsd"/>
     <xs:simpleType name="DestinationStyleType">
         <xs:restriction base="xs:string">
             <xs:enumeration value="queue"/>

Modified: incubator/cxf/trunk/tools/xjc/cfg/src/main/java/org/apache/cxf/xjc/cfg/ConfigurableBeansPlugin.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/xjc/cfg/src/main/java/org/apache/cxf/xjc/cfg/ConfigurableBeansPlugin.java?view=diff&rev=448255&r1=448254&r2=448255
==============================================================================
--- incubator/cxf/trunk/tools/xjc/cfg/src/main/java/org/apache/cxf/xjc/cfg/ConfigurableBeansPlugin.java
(original)
+++ incubator/cxf/trunk/tools/xjc/cfg/src/main/java/org/apache/cxf/xjc/cfg/ConfigurableBeansPlugin.java
Wed Sep 20 09:23:41 2006
@@ -105,7 +105,7 @@
             
             // set default values
 
-            setDefaultValues(outline);      
+            setDefaultValues(outline, co);      
 
             // replace default getters by getters trying the registered providers
 
@@ -119,101 +119,99 @@
         return true;
     }
     
-    private boolean setDefaultValues(Outline outline) {
-        for (ClassOutline co : outline.getClasses()) {
-            for (FieldOutline f : co.getDeclaredFields()) {
-
-                // Use XML schema object model to determine if field is mapped
-                // from an element or attribute with a default value
-                // and get its default value.
-
-                String fieldName = f.getPropertyInfo().getName(false);
-                XmlString xmlDefaultValue = null;
-                XSType xsType = null;    
-
-                if (f.getPropertyInfo().getSchemaComponent() instanceof XSParticle) {
-                    XSParticle particle = (XSParticle)f.getPropertyInfo().getSchemaComponent();
-                    XSTerm term = particle.getTerm();
-                    XSElementDecl element = null;
-
-                    if (term.isElementDecl()) {
-                        element = particle.getTerm().asElementDecl();
-                        xmlDefaultValue = element.getDefaultValue();                    
   
-                        xsType = element.getType();
-                    }
-                } else if (f.getPropertyInfo().getSchemaComponent() instanceof XSAttributeUse)
{
-                    XSAttributeUse attributeUse = (XSAttributeUse)f.getPropertyInfo().getSchemaComponent();
-                    XSAttributeDecl decl = attributeUse.getDecl();
-                    xmlDefaultValue = decl.getDefaultValue();                        
-                    xsType = decl.getType();
-                }
+    private boolean setDefaultValues(Outline outline, ClassOutline co) {
+        for (FieldOutline f : co.getDeclaredFields()) {
 
-                if (null == xmlDefaultValue) {
-                    continue;
-                }
-                
-                String defaultValue = xmlDefaultValue.value;
-                
-                if (null == defaultValue) {
-                    continue;
+            // Use XML schema object model to determine if field is mapped
+            // from an element or attribute with a default value
+            // and get its default value.
+
+            String fieldName = f.getPropertyInfo().getName(false);
+            XmlString xmlDefaultValue = null;
+            XSType xsType = null;    
+
+            if (f.getPropertyInfo().getSchemaComponent() instanceof XSParticle) {
+                XSParticle particle = (XSParticle)f.getPropertyInfo().getSchemaComponent();
+                XSTerm term = particle.getTerm();
+                XSElementDecl element = null;
+
+                if (term.isElementDecl()) {
+                    element = particle.getTerm().asElementDecl();
+                    xmlDefaultValue = element.getDefaultValue();                        
+                    xsType = element.getType();
                 }
+            } else if (f.getPropertyInfo().getSchemaComponent() instanceof XSAttributeUse)
{
+                XSAttributeUse attributeUse = (XSAttributeUse)f.getPropertyInfo().getSchemaComponent();
+                XSAttributeDecl decl = attributeUse.getDecl();
+                xmlDefaultValue = decl.getDefaultValue();                        
+                xsType = decl.getType();
+            }
 
-                JType type = f.getRawType();
-                String typeName = type.fullName();                
+            if (null == xmlDefaultValue) {
+                continue;
+            }
+            
+            String defaultValue = xmlDefaultValue.value;
+            
+            if (null == defaultValue) {
+                continue;
+            }
 
-                JDefinedClass impl = co.implClass;
-                Map<String, JFieldVar> fields = impl.fields();
-                JFieldVar var = fields.get(fieldName);
- 
-                if ("java.lang.Boolean".equals(typeName)) {
-                    var.init(JExpr.direct(Boolean.valueOf(defaultValue) ? "Boolean.TRUE"
: "Boolean.FALSE"));
-                } else if ("java.lang.Byte".equals(typeName)) {
-                    var.init(JExpr._new(type)
-                        .arg(JExpr.cast(type.unboxify(), 
-                            JExpr.lit(new Byte(Short.valueOf(defaultValue).byteValue())))));
-                } else if ("java.lang.Double".equals(typeName)) {
-                    var.init(JExpr._new(type)
-                        .arg(JExpr.lit(new Double(Double.valueOf(defaultValue).doubleValue()))));
-                } else if ("java.lang.Float".equals(typeName)) {
-                    var.init(JExpr._new(type)
-                             .arg(JExpr.lit(new Float(Float.valueOf(defaultValue).floatValue()))));
-                } else if ("java.lang.Integer".equals(typeName)) {
-                    var.init(JExpr._new(type)
-                        .arg(JExpr.lit(new Integer(Integer.valueOf(defaultValue).intValue()))));
-                } else if ("java.lang.Long".equals(typeName)) {
-                    var.init(JExpr._new(type)
-                        .arg(JExpr.lit(new Long(Long.valueOf(defaultValue).longValue()))));
-                } else if ("java.lang.Short".equals(typeName)) {
-                    var.init(JExpr._new(type)
-                        .arg(JExpr.cast(type.unboxify(), 
-                            JExpr.lit(new Short(Short.valueOf(defaultValue).shortValue())))));
-                } else if ("java.lang.String".equals(type.fullName())) {
-                    var.init(JExpr.lit(defaultValue));
-                } else if ("java.math.BigInteger".equals(type.fullName())) {
-                    var.init(JExpr._new(type).arg(JExpr.lit(defaultValue)));
-                } else if ("java.math.BigDecimal".equals(type.fullName())) {
-                    var.init(JExpr._new(type).arg(JExpr.lit(defaultValue)));
-                } else if ("byte[]".equals(type.fullName()) && xsType.isSimpleType())
{
-                    while (!"anySimpleType".equals(xsType.getBaseType().getName())) {
-                        xsType = xsType.getBaseType();
-                    }
-                    if ("base64Binary".equals(xsType.getName())) {
-                        var.init(outline.getCodeModel().ref(DatatypeConverter.class)
-                           .staticInvoke("parseBase64Binary").arg(defaultValue));
-                    } else if ("hexBinary".equals(xsType.getName())) {
-                        var.init(JExpr._new(outline.getCodeModel().ref(HexBinaryAdapter.class))
-                            .invoke("unmarshal").arg(defaultValue));
-                    }
-                } else if ("javax.xml.namespace.QName".equals(typeName)) {
-                    NamespaceContext nsc = new NamespaceContextAdapter(xmlDefaultValue);
-                    QName qn = DatatypeConverter.parseQName(xmlDefaultValue.value, nsc);
-                    var.init(JExpr._new(outline.getCodeModel().ref(QName.class))
-                        .arg(qn.getNamespaceURI())
-                        .arg(qn.getLocalPart())
-                        .arg(qn.getPrefix()));
+            JType type = f.getRawType();
+            String typeName = type.fullName();                
+
+            JDefinedClass impl = co.implClass;
+            Map<String, JFieldVar> fields = impl.fields();
+            JFieldVar var = fields.get(fieldName);
+
+            if ("java.lang.Boolean".equals(typeName)) {
+                var.init(JExpr.direct(Boolean.valueOf(defaultValue) ? "Boolean.TRUE" : "Boolean.FALSE"));
+            } else if ("java.lang.Byte".equals(typeName)) {
+                var.init(JExpr._new(type)
+                    .arg(JExpr.cast(type.unboxify(), 
+                        JExpr.lit(new Byte(Short.valueOf(defaultValue).byteValue())))));
+            } else if ("java.lang.Double".equals(typeName)) {
+                var.init(JExpr._new(type)
+                    .arg(JExpr.lit(new Double(Double.valueOf(defaultValue).doubleValue()))));
+            } else if ("java.lang.Float".equals(typeName)) {
+                var.init(JExpr._new(type)
+                         .arg(JExpr.lit(new Float(Float.valueOf(defaultValue).floatValue()))));
+            } else if ("java.lang.Integer".equals(typeName)) {
+                var.init(JExpr._new(type)
+                    .arg(JExpr.lit(new Integer(Integer.valueOf(defaultValue).intValue()))));
+            } else if ("java.lang.Long".equals(typeName)) {
+                var.init(JExpr._new(type)
+                    .arg(JExpr.lit(new Long(Long.valueOf(defaultValue).longValue()))));
+            } else if ("java.lang.Short".equals(typeName)) {
+                var.init(JExpr._new(type)
+                    .arg(JExpr.cast(type.unboxify(), 
+                        JExpr.lit(new Short(Short.valueOf(defaultValue).shortValue())))));
+            } else if ("java.lang.String".equals(type.fullName())) {
+                var.init(JExpr.lit(defaultValue));
+            } else if ("java.math.BigInteger".equals(type.fullName())) {
+                var.init(JExpr._new(type).arg(JExpr.lit(defaultValue)));
+            } else if ("java.math.BigDecimal".equals(type.fullName())) {
+                var.init(JExpr._new(type).arg(JExpr.lit(defaultValue)));
+            } else if ("byte[]".equals(type.fullName()) && xsType.isSimpleType())
{
+                while (!"anySimpleType".equals(xsType.getBaseType().getName())) {
+                    xsType = xsType.getBaseType();
+                }
+                if ("base64Binary".equals(xsType.getName())) {
+                    var.init(outline.getCodeModel().ref(DatatypeConverter.class)
+                       .staticInvoke("parseBase64Binary").arg(defaultValue));
+                } else if ("hexBinary".equals(xsType.getName())) {
+                    var.init(JExpr._new(outline.getCodeModel().ref(HexBinaryAdapter.class))
+                        .invoke("unmarshal").arg(defaultValue));
                 }
-                // TODO: GregorianCalendar, ...
+            } else if ("javax.xml.namespace.QName".equals(typeName)) {
+                NamespaceContext nsc = new NamespaceContextAdapter(xmlDefaultValue);
+                QName qn = DatatypeConverter.parseQName(xmlDefaultValue.value, nsc);
+                var.init(JExpr._new(outline.getCodeModel().ref(QName.class))
+                    .arg(qn.getNamespaceURI())
+                    .arg(qn.getLocalPart())
+                    .arg(qn.getPrefix()));
             }
+            // TODO: GregorianCalendar, ...
         }
 
         return true;



Mime
View raw message