cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject svn commit: r570761 - in /incubator/cxf/trunk/tools: javato/test/src/test/resources/java2wsdl_wsdl/ wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/ wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal...
Date Wed, 29 Aug 2007 11:35:51 GMT
Author: mmao
Date: Wed Aug 29 04:35:50 2007
New Revision: 570761

URL: http://svn.apache.org/viewvc?rev=570761&view=rev
Log:
CXF-918 
 Add a serviceModel validator to check the same name diffrent type in wrapper style


Added:
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/WrapperElement.java
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/validator/WrapperStyleNameCollisionValidator.java
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf918/
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf918/bug.wsdl
Modified:
    incubator/cxf/trunk/tools/javato/test/src/test/resources/java2wsdl_wsdl/doc_wrapped_simple.wsdl
    incubator/cxf/trunk/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ProcessorUtil.java
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/validator/Messages.properties
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/resources/META-INF/service.validator.xml
    incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf939/bug.wsdl

Modified: incubator/cxf/trunk/tools/javato/test/src/test/resources/java2wsdl_wsdl/doc_wrapped_simple.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/test/src/test/resources/java2wsdl_wsdl/doc_wrapped_simple.wsdl?rev=570761&r1=570760&r2=570761&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/javato/test/src/test/resources/java2wsdl_wsdl/doc_wrapped_simple.wsdl
(original)
+++ incubator/cxf/trunk/tools/javato/test/src/test/resources/java2wsdl_wsdl/doc_wrapped_simple.wsdl
Wed Aug 29 04:35:50 2007
@@ -24,7 +24,7 @@
 			<element name="getPrice">
 			    <complexType>
 			       <sequence>
-			          <element name="responseType" type="xs:string"/>
+			          <element name="requestType" type="xs:string"/>
 			       </sequence>
 			     </complexType>
                         </element>

Modified: incubator/cxf/trunk/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java?rev=570761&r1=570760&r2=570761&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java
(original)
+++ incubator/cxf/trunk/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java
Wed Aug 29 04:35:50 2007
@@ -539,6 +539,7 @@
 
     public void validate(final ServiceInfo service) throws ToolException {
         for (ServiceValidator validator : getServiceValidators()) {
+            service.setProperty(ToolContext.class.getName(), context);
             validator.setService(service);
             if (!validator.isValid()) {
                 throw new ToolException(validator.getErrorMessage());

Modified: incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java?rev=570761&r1=570760&r2=570761&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java
(original)
+++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java
Wed Aug 29 04:35:50 2007
@@ -187,7 +187,7 @@
         }
         MessagePartInfo part = inputParts.iterator().next();
 
-        List<QName> wrappedElements = ProcessorUtil.getWrappedElement(context, part.getElementQName());
+        List<QName> wrappedElements = ProcessorUtil.getWrappedElementQNames(context,
part.getElementQName());
         if (wrappedElements == null || wrappedElements.size() == 0) {
             return;
         }
@@ -292,11 +292,11 @@
         List<QName> outputWrapElement = null;
 
         if (inputPart != null) {
-            inputWrapElement = ProcessorUtil.getWrappedElement(context, inputPart.getElementQName());
+            inputWrapElement = ProcessorUtil.getWrappedElementQNames(context, inputPart.getElementQName());
         }
 
         if (outputPart != null) {
-            outputWrapElement = ProcessorUtil.getWrappedElement(context, outputPart.getElementQName());
+            outputWrapElement = ProcessorUtil.getWrappedElementQNames(context, outputPart.getElementQName());
         }
 
         if (inputWrapElement == null || outputWrapElement.size() == 0) {

Modified: incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ProcessorUtil.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ProcessorUtil.java?rev=570761&r1=570760&r2=570761&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ProcessorUtil.java
(original)
+++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ProcessorUtil.java
Wed Aug 29 04:35:50 2007
@@ -342,9 +342,17 @@
         }
         return clone;
     }
-    
-    public static List<QName> getWrappedElement(ToolContext context, QName partElement)
{
+
+    public static List<QName> getWrappedElementQNames(ToolContext context, QName partElement)
{
         List<QName> qnames = new ArrayList<QName>();
+        for (WrapperElement element : getWrappedElement(context, partElement)) {
+            qnames.add(element.getElementName());
+        }
+        return qnames;
+    }
+
+    public static List<WrapperElement> getWrappedElement(ToolContext context, QName
partElement) {
+        List<WrapperElement> qnames = new ArrayList<WrapperElement>();
         
         ServiceInfo serviceInfo = (ServiceInfo)context.get(ServiceInfo.class);
         XmlSchemaCollection schema = (XmlSchemaCollection)serviceInfo
@@ -378,9 +386,9 @@
                 XmlSchemaElement subElement = (XmlSchemaElement)ite.next();
 
                 if (subElement.getQName() != null) {
-                    qnames.add(subElement.getQName());
+                    qnames.add(new WrapperElement(subElement.getQName(), subElement.getSchemaTypeName()));
                 } else {
-                    qnames.add(subElement.getRefName());
+                    qnames.add(new WrapperElement(subElement.getRefName(), subElement.getSchemaTypeName()));
                 }
             }
         }

Added: incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/WrapperElement.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/WrapperElement.java?rev=570761&view=auto
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/WrapperElement.java
(added)
+++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/WrapperElement.java
Wed Aug 29 04:35:50 2007
@@ -0,0 +1,57 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal;
+
+import javax.xml.namespace.QName;
+
+public final class WrapperElement {
+
+    private QName elementName;
+
+    private QName schemaTypeName;
+
+    public WrapperElement() {
+    }
+
+    public WrapperElement(QName en, QName tn) {
+        this.elementName = en;
+        this.schemaTypeName = tn;
+    }
+
+    public QName getElementName() {
+        return elementName;
+    }
+
+    public void setElementName(final QName newElementName) {
+        this.elementName = newElementName;
+    }
+
+    public QName getSchemaTypeName() {
+        return schemaTypeName;
+    }
+
+    public void setSchemaTypeName(final QName newSchemaTypeName) {
+        this.schemaTypeName = newSchemaTypeName;
+    }
+
+    public String toString() {
+        return elementName.toString() + " " + schemaTypeName.toString();
+    }
+}

Modified: incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/validator/Messages.properties
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/validator/Messages.properties?rev=570761&r1=570760&r2=570761&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/validator/Messages.properties
(original)
+++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/validator/Messages.properties
Wed Aug 29 04:35:50 2007
@@ -1 +1,2 @@
-NON_UNIQUE_BODY = Non unique body parts! In a port, operations must have unique operation
signaure on the wire for successful dispatch. In port {0}, Operations \"{1}\" and \"{2}\"
have the same request body block {3}  
\ No newline at end of file
+NON_UNIQUE_BODY = Non unique body parts! In a port, operations must have unique operation
signaure on the wire for successful dispatch. In port {0}, Operations \"{1}\" and \"{2}\"
have the same request body block {3}  
+WRAPPER_STYLE_NAME_COLLISION = Element {0} has Having the same name with different types[{1}
-- {2}],  In wrapper style, there is a collision as per the spec.
\ No newline at end of file

Added: incubator/cxf/trunk/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/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/validator/WrapperStyleNameCollisionValidator.java?rev=570761&view=auto
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/validator/WrapperStyleNameCollisionValidator.java
(added)
+++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/validator/WrapperStyleNameCollisionValidator.java
Wed Aug 29 04:35:50 2007
@@ -0,0 +1,117 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.tools.wsdlto.frontend.jaxws.validator;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.logging.Logger;
+import javax.xml.namespace.QName;
+
+import org.apache.cxf.common.i18n.Message;
+import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.service.model.InterfaceInfo;
+import org.apache.cxf.service.model.MessagePartInfo;
+import org.apache.cxf.service.model.OperationInfo;
+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.processor.internal.ProcessorUtil;
+import org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.WrapperElement;
+
+public class WrapperStyleNameCollisionValidator extends ServiceValidator {
+    public static final Logger LOG = LogUtils.getL7dLogger(WrapperStyleNameCollisionValidator.class);
+
+    public WrapperStyleNameCollisionValidator() {
+    }
+
+    public WrapperStyleNameCollisionValidator(ServiceInfo s) {
+        this.service = s;
+    }
+
+    @Override
+    public boolean isValid() {
+        return checkNameColllision();
+    }
+
+    private boolean checkNameColllision() {
+        InterfaceInfo interfaceInfo = service.getInterface();
+        if (interfaceInfo != null) {
+            for (OperationInfo operation : interfaceInfo.getOperations()) {
+                if (!isValidOperation(operation)) {
+                    return false;
+                }
+            }
+        }
+        return true;
+    }
+
+    private boolean isValidOperation(OperationInfo operation) {
+        ToolContext context = service.getProperty(ToolContext.class.getName(), ToolContext.class);
+
+        if (operation.getUnwrappedOperation() == null) {
+            return true;
+        }
+
+        MessagePartInfo input = null;
+        MessagePartInfo output = null;
+        if (operation.getInput() != null
+            && operation.getInput().getMessageParts().size() == 1) {
+            input = operation.getInput().getMessageParts().iterator().next();
+        }
+
+        if (operation.getOutput() != null
+            && operation.getOutput().getMessageParts().size() == 1) {
+            output = operation.getOutput().getMessageParts().iterator().next();
+        }
+
+        Map<QName, QName> names = new HashMap<QName, QName>();
+        if (input != null) {
+            for (WrapperElement element : ProcessorUtil.getWrappedElement(context, input.getElementQName()))
{
+                if (names.containsKey(element.getElementName())
+                    &&  names.get(element.getElementName()).equals(element.getSchemaTypeName()))
{
+                    handleErrors(names.get(element.getElementName()), element);
+                    return false;
+                } else {
+                    names.put(element.getElementName(), element.getSchemaTypeName());
+                }
+            }
+        }
+
+        if (output != null) {
+            for (WrapperElement element : ProcessorUtil.getWrappedElement(context, 
+                                                                          output.getElementQName()))
{
+                if (names.containsKey(element.getElementName())
+                    &&  !names.get(element.getElementName()).equals(element.getSchemaTypeName()))
{
+                    handleErrors(names.get(element.getElementName()), element);
+                    return false;
+                } else {
+                    names.put(element.getElementName(), element.getSchemaTypeName());
+                }
+            }
+        }
+        return true;
+    }
+
+    private void handleErrors(QName e1, WrapperElement e2) {
+        Message msg = new Message("WRAPPER_STYLE_NAME_COLLISION", LOG, 
+                                  e2.getElementName(), e1, e2.getSchemaTypeName());
+        addErrorMessage(msg.toString());
+    }
+}

Modified: incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/resources/META-INF/service.validator.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/resources/META-INF/service.validator.xml?rev=570761&r1=570760&r2=570761&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/resources/META-INF/service.validator.xml
(original)
+++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/resources/META-INF/service.validator.xml
Wed Aug 29 04:35:50 2007
@@ -20,4 +20,5 @@
 <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
 <properties>
     <entry key="UniqueBodyValidator">org.apache.cxf.tools.wsdlto.frontend.jaxws.validator.UniqueBodyValidator</entry>
+    <entry key="WrapperStyleNameCollisionValidator">org.apache.cxf.tools.wsdlto.frontend.jaxws.validator.WrapperStyleNameCollisionValidator</entry>
 </properties>

Modified: incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java?rev=570761&r1=570760&r2=570761&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java
(original)
+++ incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java
Wed Aug 29 04:35:50 2007
@@ -645,4 +645,24 @@
             assertEquals(msg.toString().trim(), e.getMessage().trim());
         }
     }
+
+    @Test
+    public void testWrapperStyleNameCollision() throws Exception {
+        try {
+            env.put(ToolConstants.CFG_WSDLURL,
+                    getLocation("/wsdl2java_wsdl/cxf918/bug.wsdl"));
+            processor.setContext(env);
+            processor.execute();
+        } catch (Exception e) {
+            String ns1 = "http://bugs.cxf/services/bug1";
+            String ns2 = "http://www.w3.org/2001/XMLSchema";
+            QName elementName = new QName(ns1, "theSameNameFieldDifferentDataType");
+            QName stringName = new QName(ns2, "string");
+            QName intName = new QName(ns2, "int");
+
+            Message msg = new Message("WRAPPER_STYLE_NAME_COLLISION", UniqueBodyValidator.LOG,

+                                      elementName, stringName, intName);
+            assertEquals(msg.toString().trim(), e.getMessage().trim());
+        }
+    }
 }

Added: incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf918/bug.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf918/bug.wsdl?rev=570761&view=auto
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf918/bug.wsdl
(added)
+++ incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf918/bug.wsdl
Wed Aug 29 04:35:50 2007
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License. You may obtain a copy of the License at
+ 
+  http://www.apache.org/licenses/LICENSE-2.0
+ 
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied. See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<wsdl:definitions 
+    xmlns:tns="http://bugs.cxf/services/bug1" 
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
+    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
+    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
+    targetNamespace="http://bugs.cxf/services/bug1" 
+    name="bug1">
+    
+    <!-- customizations with global scope below it shows the default customizations -->
+    <jaxws:bindings xmlns:jaxws="http://java.sun.com/xml/ns/jaxws">
+	<jaxws:enableWrapperStyle>true</jaxws:enableWrapperStyle>
+	<jaxws:enableAsyncMapping>false</jaxws:enableAsyncMapping>
+    </jaxws:bindings>
+
+    <wsdl:types>
+
+	<schema xmlns="http://www.w3.org/2001/XMLSchema" 
+		elementFormDefault="qualified" 
+		attributeFormDefault="qualified" 
+		targetNamespace="http://bugs.cxf/services/bug1">
+
+	    <xsd:complexType name="requestDataType">
+		<xsd:sequence>
+		    <xsd:element name="myString1" type="xsd:string" />
+		    <xsd:element name="theSameNameFieldTheSameDataType" type="xsd:string" />
+		    <xsd:element name="theSameNameFieldDifferentDataType" type="xsd:string" />
+		</xsd:sequence>
+	    </xsd:complexType>
+
+	    <xsd:complexType name="responseDataType">
+		<xsd:sequence>
+		    <xsd:element name="theSameNameFieldTheSameDataType" type="xsd:string" />
+		    <xsd:element name="theSameNameFieldDifferentDataType" type="xsd:int" minOccurs="0"
/>
+		    <xsd:element name="myString2" type="xsd:string" />
+		</xsd:sequence>
+	    </xsd:complexType>
+	    
+	    <element name="myBug1" type="tns:requestDataType" />
+	    <element name="myBug1Response" type="tns:responseDataType" />		
+	</schema>
+    </wsdl:types>
+    
+    <wsdl:message name="myBug1RequestMessage">
+	<wsdl:part name="parameters" element="tns:myBug1"/>
+    </wsdl:message>
+    <wsdl:message name="myBug1ResponseMessage">
+
+	<wsdl:part name="parameters" element="tns:myBug1Response"/>
+    </wsdl:message>
+    
+    <wsdl:portType name="myBug1Port">
+	<wsdl:operation name="myBug1">
+	    <wsdl:input message="tns:myBug1RequestMessage"/>
+	    <wsdl:output message="tns:myBug1ResponseMessage"/>
+	</wsdl:operation>
+    </wsdl:portType>
+
+    
+    <wsdl:binding name="myBug1PortSoapBinding" type="tns:myBug1Port">
+	<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+
+	<wsdl:operation name="myBug1">
+	    <soap:operation style="document"/>
+	    <wsdl:input>
+		<soap:body use="literal"/>
+	    </wsdl:input>
+	    <wsdl:output>
+
+		<soap:body use="literal"/>
+	    </wsdl:output>
+	</wsdl:operation>
+    </wsdl:binding>
+    <wsdl:service name="myBug1Service">
+	<wsdl:port name="myBug1" binding="tns:myBug1PortSoapBinding">
+	    <soap:address location="http://REPLACE_WITH_HOST_INFO/myBug1" />
+	</wsdl:port>
+    </wsdl:service>
+
+</wsdl:definitions>

Modified: incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf939/bug.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf939/bug.wsdl?rev=570761&r1=570760&r2=570761&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf939/bug.wsdl
(original)
+++ incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf939/bug.wsdl
Wed Aug 29 04:35:50 2007
@@ -1,4 +1,23 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License. You may obtain a copy of the License at
+ 
+  http://www.apache.org/licenses/LICENSE-2.0
+ 
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied. See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+
 <wsdl:definitions xmlns:tns="http://bugs.cxf/services/bug1" 
 		  xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
 		  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 



Mime
View raw message