cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t..@apache.org
Subject svn commit: r492388 - in /incubator/cxf/trunk: rt/databinding/jaxb/ rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/ testutils/ testutils/src/main/resources/wsdl/jaxb/
Date Thu, 04 Jan 2007 02:39:56 GMT
Author: tli
Date: Wed Jan  3 18:39:54 2007
New Revision: 492388

URL: http://svn.apache.org/viewvc?view=rev&rev=492388
Log:
CXF-29 add unit test for JAXB attribute default value

Added:
    incubator/cxf/trunk/testutils/src/main/resources/wsdl/jaxb/
    incubator/cxf/trunk/testutils/src/main/resources/wsdl/jaxb/misc_test.xsd   (with props)
Modified:
    incubator/cxf/trunk/rt/databinding/jaxb/pom.xml
    incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/JAXBEncoderDecoderTest.java
    incubator/cxf/trunk/testutils/pom.xml

Modified: incubator/cxf/trunk/rt/databinding/jaxb/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/jaxb/pom.xml?view=diff&rev=492388&r1=492387&r2=492388
==============================================================================
--- incubator/cxf/trunk/rt/databinding/jaxb/pom.xml (original)
+++ incubator/cxf/trunk/rt/databinding/jaxb/pom.xml Wed Jan  3 18:39:54 2007
@@ -122,7 +122,10 @@
             <scope>test</scope>
         </dependency>
  
-
+        <dependency>
+            <groupId>jaxme</groupId>
+            <artifactId>jaxme2</artifactId>
+        </dependency>
 
         <dependency>
             <groupId>woodstox</groupId>

Modified: incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/JAXBEncoderDecoderTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/JAXBEncoderDecoderTest.java?view=diff&rev=492388&r1=492387&r2=492388
==============================================================================
--- incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/JAXBEncoderDecoderTest.java
(original)
+++ incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/JAXBEncoderDecoderTest.java
Wed Jan  3 18:39:54 2007
@@ -48,6 +48,8 @@
 import junit.framework.TestCase;
 
 import org.apache.cxf.interceptor.Fault;
+import org.apache.cxf.jaxb_misc.Base64WithDefaultValueType;
+import org.apache.cxf.jaxb_misc.ObjectFactory;
 import org.apache.cxf.service.model.MessagePartInfo;
 import org.apache.cxf.staxutils.StaxStreamFilter;
 import org.apache.cxf.testutil.common.TestUtil;
@@ -367,6 +369,12 @@
             assertTrue(cls.equals(paramTypes[idx]));
             idx++;
         }
+    }
+    
+    public void testDefaultValueConverter() throws Exception {
+        Base64WithDefaultValueType testData = (new ObjectFactory()).createBase64WithDefaultValueType();
+        byte[] checkValue = testData.getAttributeWithDefaultValue();
+        assertNotNull(checkValue);
     }
 }
 

Modified: incubator/cxf/trunk/testutils/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/pom.xml?view=diff&rev=492388&r1=492387&r2=492388
==============================================================================
--- incubator/cxf/trunk/testutils/pom.xml (original)
+++ incubator/cxf/trunk/testutils/pom.xml Wed Jan  3 18:39:54 2007
@@ -135,7 +135,28 @@
                     </execution>
                 </executions>
             </plugin>
-
+            <plugin>
+                <groupId>org.apache.cxf</groupId>
+                <artifactId>cxf-common-xsd</artifactId>
+                <version>${project.version}</version>
+                <executions>
+                    <execution>
+                        <id>generate-sources</id>
+                        <phase>generate-sources</phase>
+                        <configuration>
+                            <sourceRoot>${basedir}/target/generated/src/main/java</sourceRoot>
                           
+                            <xsdOptions>
+                                <xsdOption>
+                                    <xsd>${basedir}/src/main/resources/wsdl/jaxb/misc_test.xsd</xsd>
+                                </xsdOption>
+                            </xsdOptions>
+                        </configuration>
+                        <goals>
+                            <goal>xsdtojava</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
             <plugin>
                 <groupId>org.apache.cxf</groupId>
                 <artifactId>cxf-codegen-plugin</artifactId>
@@ -145,7 +166,12 @@
                         <id>generate-sources</id>
                         <phase>generate-sources</phase>
                         <configuration>
-                            <sourceRoot>${basedir}/target/generated/src/main/java</sourceRoot>
+                            <sourceRoot>${basedir}/target/generated/src/main/java</sourceRoot>
                           
+                            <xsdOptions>
+                                <xsdOption>
+                                    <xsd>${basedir}/src/main/resources/wsdl/jaxb/misc_test.xsd</xsd>
+                                </xsdOption>
+                            </xsdOptions>                            
                             <wsdlOptions>
                                 <wsdlOption>
                                     <wsdl>${basedir}/src/main/resources/wsdl/hello_world.wsdl</wsdl>

Added: incubator/cxf/trunk/testutils/src/main/resources/wsdl/jaxb/misc_test.xsd
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/src/main/resources/wsdl/jaxb/misc_test.xsd?view=auto&rev=492388
==============================================================================
--- incubator/cxf/trunk/testutils/src/main/resources/wsdl/jaxb/misc_test.xsd (added)
+++ incubator/cxf/trunk/testutils/src/main/resources/wsdl/jaxb/misc_test.xsd Wed Jan  3 18:39:54
2007
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://cxf.apache.org/jaxb_misc"
+    xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://cxf.apache.org/jaxb_misc">
+    <xs:complexType name="Base64WithDefaultValueType">
+        <xs:sequence>
+            <xs:element name="EndPart" type="xs:string" />
+        </xs:sequence>
+        <xs:attribute name="AttributeWithDefaultValue" type="xs:base64Binary" default="1223"
/>
+    </xs:complexType>
+</schema>
\ No newline at end of file

Propchange: incubator/cxf/trunk/testutils/src/main/resources/wsdl/jaxb/misc_test.xsd
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/testutils/src/main/resources/wsdl/jaxb/misc_test.xsd
------------------------------------------------------------------------------
    svn:mime-type = text/xml



Mime
View raw message