You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by tl...@apache.org on 2007/01/04 03:39:56 UTC
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/
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
Re: 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/
Posted by Andrea Smyth <an...@iona.com>.
Dan Diephouse wrote:
>>
>> -
>> + <dependency>
>> + <groupId>jaxme</groupId>
>> + <artifactId>jaxme2</artifactId>
>> + </dependency>
>>
>>
>>
> I'm confused - why do we have a dependency on jaxme?
>
>
It was there as a workaround for CXF-29 - but it seems this is fixed
with JAXB impl 2.0.3.
Andrea.
RE: 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/
Posted by "Li, Tao (Tom)" <Ta...@iona.com>.
Hi Dan,
Sorry for forgetting to remove the debug/compare code.
I will fix it ASAP.
Thanks a lot.
________________________________
From: Dan Diephouse [mailto:dan@envoisolutions.com]
Sent: Thu 1/4/2007 12:15 AM
To: cxf-dev@incubator.apache.org
Subject: Re: 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/
>
> -
> + <dependency>
> + <groupId>jaxme</groupId>
> + <artifactId>jaxme2</artifactId>
> + </dependency>
>
>
>
I'm confused - why do we have a dependency on jaxme?
--
Dan Diephouse
Envoi Solutions
http://envoisolutions.com <https://bosgate2.iona.com/http/0/envoisolutions.com> | http://netzooid.com/blog <https://bosgate2.iona.com/http/0/netzooid.com/blog>
Re: 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/
Posted by Dan Diephouse <da...@envoisolutions.com>.
>
> -
> + <dependency>
> + <groupId>jaxme</groupId>
> + <artifactId>jaxme2</artifactId>
> + </dependency>
>
>
>
I'm confused - why do we have a dependency on jaxme?
--
Dan Diephouse
Envoi Solutions
http://envoisolutions.com | http://netzooid.com/blog