Author: dkulp
Date: Thu Apr 3 18:12:56 2008
New Revision: 644569
URL: http://svn.apache.org/viewvc?rev=644569&view=rev
Log:
Merged revisions 644568 via svnmerge from
https://svn.apache.org/repos/asf/incubator/cxf/trunk
........
r644568 | dkulp | 2008-04-03 21:05:12 -0400 (Thu, 03 Apr 2008) | 2 lines
[CXF-1229] Fix problems with validation of param names when wrapper mode is
turned off
........
Added:
incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf918/bug2.wsdl
- copied unchanged from r644568,
incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf918/bug2.wsdl
Modified:
incubator/cxf/branches/2.0.x-fixes/ (props changed)
incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/validator/WrapperStyleNameCollisionValidator.java
incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java
Propchange: incubator/cxf/branches/2.0.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified:
incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/validator/WrapperStyleNameCollisionValidator.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/validator/WrapperStyleNameCollisionValidator.java?rev=644569&r1=644568&r2=644569&view=diff
==============================================================================
---
incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/validator/WrapperStyleNameCollisionValidator.java
(original)
+++
incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/validator/WrapperStyleNameCollisionValidator.java
Thu Apr 3 18:12:56 2008
@@ -32,6 +32,7 @@
import org.apache.cxf.service.model.ServiceInfo;
import org.apache.cxf.tools.common.ToolContext;
import org.apache.cxf.tools.validator.ServiceValidator;
+import org.apache.cxf.tools.wsdlto.frontend.jaxws.customization.JAXWSBinding;
import
org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.ProcessorUtil;
import
org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.WrapperElement;
@@ -65,7 +66,26 @@
private boolean isValidOperation(OperationInfo operation) {
ToolContext context = service.getProperty(ToolContext.class.getName(),
ToolContext.class);
+ boolean valid = false;
if (operation.getUnwrappedOperation() == null) {
+ valid = true;
+ }
+
+ JAXWSBinding binding =
(JAXWSBinding)operation.getExtensor(JAXWSBinding.class);
+ if (binding != null && !binding.isEnableWrapperStyle()) {
+ valid = true;
+ }
+ binding = operation.getInterface().getExtensor(JAXWSBinding.class);
+ if (binding != null && !binding.isEnableWrapperStyle()) {
+ valid = true;
+ }
+ binding = operation.getInterface().getService()
+ .getDescription().getExtensor(JAXWSBinding.class);
+ if (binding != null && !binding.isEnableWrapperStyle()) {
+ valid = true;
+ }
+
+ if (valid) {
return true;
}
Modified:
incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java?rev=644569&r1=644568&r2=644569&view=diff
==============================================================================
---
incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java
(original)
+++
incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java
Thu Apr 3 18:12:56 2008
@@ -679,6 +679,13 @@
assertEquals(msg.toString().trim(), e.getMessage().trim());
}
}
+ @Test
+ public void testNonWrapperStyleNameCollision() throws Exception {
+ env.put(ToolConstants.CFG_WSDLURL,
+ getLocation("/wsdl2java_wsdl/cxf918/bug2.wsdl"));
+ processor.setContext(env);
+ processor.execute();
+ }
@Test
public void testParameterOrderNoOutputMessage() throws Exception {