You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2012/03/02 16:52:59 UTC
svn commit: r1296263 - in /cxf/branches/2.3.x-fixes: ./
rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/
tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/
Author: dkulp
Date: Fri Mar 2 15:52:58 2012
New Revision: 1296263
URL: http://svn.apache.org/viewvc?rev=1296263&view=rev
Log:
Merged revisions 1295054 via svn merge from
https://svn.us.apache.org/repos/asf/cxf/branches/2.4.x-fixes
........
r1295054 | ema | 2012-02-29 05:22:39 -0500 (Wed, 29 Feb 2012) | 16 lines
Merged revisions 1295052 via svnmerge from
https://svn.apache.org/repos/asf/cxf/branches/2.5.x-fixes
................
r1295052 | ema | 2012-02-29 18:07:21 +0800 (Wed, 29 Feb 2012) | 9 lines
Merged revisions 1295026 via svnmerge from
https://svn.apache.org/repos/asf/cxf/trunk
........
r1295026 | ema | 2012-02-29 17:17:24 +0800 (Wed, 29 Feb 2012) | 1 line
[CXF-4147]:Wrong wsdl generated from impl class annotated with BARE
........
................
........
Added:
cxf/branches/2.3.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/HelloBare.java
- copied unchanged from r1295054, cxf/branches/2.4.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/HelloBare.java
Modified:
cxf/branches/2.3.x-fixes/ (props changed)
cxf/branches/2.3.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
cxf/branches/2.3.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/SimpleMessages.properties
cxf/branches/2.3.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java
Propchange: cxf/branches/2.3.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: cxf/branches/2.3.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java?rev=1296263&r1=1296262&r2=1296263&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java (original)
+++ cxf/branches/2.3.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java Fri Mar 2 15:52:58 2012
@@ -1478,8 +1478,15 @@ public class ReflectionServiceFactoryBea
continue;
}
if (isInParam(method, j)) {
- final QName q = getInParameterName(op, method, j);
- MessagePartInfo part = inMsg.addMessagePart(getInPartName(op, method, j));
+ QName q = getInParameterName(op, method, j);
+ QName partName = getInPartName(op, method, j);
+ if (!isRPC(method) && !isWrapped(method)
+ && inMsg.getMessagePartsMap().containsKey(partName)) {
+ LOG.log(Level.WARNING, "INVALID_BARE_METHOD", getServiceClass() + "." + method.getName());
+ partName = new QName(partName.getNamespaceURI(), partName.getLocalPart() + j);
+ q = new QName(q.getNamespaceURI(), q.getLocalPart() + j);
+ }
+ MessagePartInfo part = inMsg.addMessagePart(partName);
Modified: cxf/branches/2.3.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/SimpleMessages.properties
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/SimpleMessages.properties?rev=1296263&r1=1296262&r2=1296263&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/SimpleMessages.properties (original)
+++ cxf/branches/2.3.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/SimpleMessages.properties Fri Mar 2 15:52:58 2012
@@ -35,4 +35,5 @@ XSD_VALIDATION_ERROR= Error in W3C XML S
COULD_NOT_UNWRAP=Could not unwrap Operation {0} to match method "{1}"
NO_WSDL_PROVIDED=WSDL is required for services created from class {0}, but no WSDL location specified.
NO_FAULT_PART = Could not find a fault part for {0}. The fault message must have a single part.
+INVALID_BARE_METHOD= Method {0} is configured as BARE but there are more than one parameters with wrong @Webparam annotated or without @WebParam annotated.
Modified: cxf/branches/2.3.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.3.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java?rev=1296263&r1=1296262&r2=1296263&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java (original)
+++ cxf/branches/2.3.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java Fri Mar 2 15:52:58 2012
@@ -654,4 +654,25 @@ public class JavaToProcessorTest extends
assertTrue(wsdlContent.indexOf("<soap:fault name=\"Exception\" use=\"literal\"/>") != -1);
}
+
+ //CXF-4147
+ @Test
+ public void testBareWithoutWebParam() throws Exception {
+ env.put(ToolConstants.CFG_OUTPUTFILE, output.getPath() + "/cxf4147.wsdl");
+ env.put(ToolConstants.CFG_CLASSNAME, "org.apache.cxf.tools.java2wsdl.processor.HelloBare");
+ env.put(ToolConstants.CFG_VERBOSE, ToolConstants.CFG_VERBOSE);
+ try {
+ processor.setEnvironment(env);
+ processor.process();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ File wsdlFile = new File(output, "cxf4147.wsdl");
+ assertTrue(wsdlFile.exists());
+ String wsdlContent = getStringFromFile(wsdlFile).replaceAll(" ", " ");
+ assertTrue(wsdlContent.indexOf("xsd:element name=\"add\" nillable=\"true\" type=\"xsd:int\"") != -1);
+ assertTrue(wsdlContent.indexOf("xsd:element name=\"add1\" nillable=\"true\" type=\"xsd:string\"")
+ != -1);
+ assertTrue(wsdlContent.indexOf("wsdl:part name=\"add1\" element=\"tns:add1\"") != -1);
+ }
}