You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by em...@apache.org on 2013/06/26 08:33:50 UTC
svn commit: r1496781 - in /cxf/branches/2.5.x-fixes: ./
rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/
tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/
tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/
Author: ema
Date: Wed Jun 26 06:33:49 2013
New Revision: 1496781
URL: http://svn.apache.org/r1496781
Log:
Merged revisions 1496771 via svnmerge from
https://svn.apache.org/repos/asf/cxf/branches/2.6.x-fixes
................
r1496771 | ema | 2013-06-26 14:20:41 +0800 (Wed, 26 Jun 2013) | 16 lines
Merged revisions 1496753 via svnmerge from
https://svn.apache.org/repos/asf/cxf/branches/2.7.x-fixes
................
r1496753 | ema | 2013-06-26 14:02:52 +0800 (Wed, 26 Jun 2013) | 9 lines
Merged revisions 1496744 via svnmerge from
https://svn.apache.org/repos/asf/cxf/trunk
........
r1496744 | ema | 2013-06-26 13:52:00 +0800 (Wed, 26 Jun 2013) | 1 line
[CXF-5089]:java2ws generate both ref and nillabe attributes in a schema element
........
................
................
Added:
cxf/branches/2.5.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/Echo3.java
- copied unchanged from r1496771, cxf/branches/2.6.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/Echo3.java
cxf/branches/2.5.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/Echo3Impl.java
- copied unchanged from r1496771, cxf/branches/2.6.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/Echo3Impl.java
cxf/branches/2.5.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/OrderException2.java
- copied unchanged from r1496771, cxf/branches/2.6.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/OrderException2.java
cxf/branches/2.5.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/OrderItem.java
- copied unchanged from r1496771, cxf/branches/2.6.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/OrderItem.java
Modified:
cxf/branches/2.5.x-fixes/ (props changed)
cxf/branches/2.5.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java
cxf/branches/2.5.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java
Propchange: cxf/branches/2.5.x-fixes/
------------------------------------------------------------------------------
Merged /cxf/branches/2.7.x-fixes:r1496753
Merged /cxf/trunk:r1496744
Merged /cxf/branches/2.6.x-fixes:r1496771
Propchange: cxf/branches/2.5.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: cxf/branches/2.5.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java?rev=1496781&r1=1496780&r2=1496781&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java (original)
+++ cxf/branches/2.5.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java Wed Jun 26 06:33:49 2013
@@ -617,6 +617,7 @@ class JAXBSchemaInitializer extends Serv
QName ename = new QName(beanInfo.getElementNamespaceURI(null),
beanInfo.getElementLocalName(null));
XmlSchemaElement el2 = schemas.getElementByQName(ename);
+ el.setNillable(false);
el.getRef().setTargetQName(el2.getQName());
} else {
el.setName(name.getLocalPart());
Modified: cxf/branches/2.5.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java?rev=1496781&r1=1496780&r2=1496781&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java (original)
+++ cxf/branches/2.5.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java Wed Jun 26 06:33:49 2013
@@ -778,6 +778,27 @@ public class JavaToProcessorTest extends
}
@Test
+ public void testExceptionRefNillable() throws Exception {
+ env.put(ToolConstants.CFG_OUTPUTFILE, output.getPath() + "/exception-ref-nillable.wsdl");
+ env.put(ToolConstants.CFG_CLASSNAME, "org.apache.cxf.tools.fortest.exception.Echo3Impl");
+ env.put(ToolConstants.CFG_VERBOSE, ToolConstants.CFG_VERBOSE);
+ try {
+ processor.setEnvironment(env);
+ processor.process();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ File wsdlFile = new File(output, "exception-ref-nillable.wsdl");
+ assertTrue(wsdlFile.exists());
+ String wsdlContent = getStringFromFile(wsdlFile).replaceAll(" ", " ");
+ int refElement = wsdlContent.indexOf("<xs:element ref=\"tns:item\"/>");
+ assertTrue(refElement > -1);
+
+ }
+
+
+ @Test
public void testCXF4877() throws Exception {
env.put(ToolConstants.CFG_OUTPUTFILE, output.getPath() + "/testwsdl.wsdl");
env.put(ToolConstants.CFG_CLASSNAME, "org.apache.cxf.tools.fortest.cxf4877.HelloImpl");
@@ -791,6 +812,4 @@ public class JavaToProcessorTest extends
//if the test works, this won't throw an exception. CXF-4877 generated bad XML at this point
StaxUtils.read(new FileInputStream(wsdlFile));
}
-
-
}